Category: Operating system


How To Install RED5 Server on Centos 5.3

In this how to i will describe how to install RED5 server on Centos 5.3. This how to can be used to install RED5 server on Centos 4 and Fedora 8 – 11 as well. RED5 is open source flash server written in java supports streaming audio/video, recording client streams, shared objects, live stream publishing etc.

1) Download and Install Java

RED5 server depends on Java. CentOS 5.3 comes with OpenJDK 1.6 and install it using yum.

yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel

2) Download and Install Ant & Ivy (Apache Project)

Ant will need to compile RED5 server code. Ant comes in binary form, so just download and install it in /usr/local directory.

cd /usr/src

wget http://mirrors.isu.net.sa/pub/apache//ant/binaries/apache-ant-1.8.2-bin.tar.bz2

tar jxvf apache-ant-1.8.2-bin.tar.bz2

mv apache-ant-1.8.2 /usr/local/ant

cd /usr/src

svn co https://svn.apache.org/repos/asf/ant/ivy/core/trunk ivy

cd ivy

ant jar

cp build/artifact/jars/ivy.jar /usr/local/ant/lib/

3) Export Variables for Ant and Java

export ANT_HOME=/usr/local/ant

export JAVA_HOME=/usr/lib/jvm/java

export PATH=$PATH:/usr/local/ant/bin

Also export these variables in /etc/bashrc to become available for every user login or for any terminal opens.

echo ‘export ANT_HOME=/usr/local/ant’ >> /etc/bashrc

echo ‘export JAVA_HOME=/usr/lib/jvm/java’ >> /etc/bashrc

echo ‘export PATH=$PATH:/usr/local/ant/bin’ >> /etc/bashrc

4) Download and Install RED5 Server

Here the latest version available for RED5 is 0.7 on site but download from google code using svn as the tarball of 0.7 on site is missing some of the files.

cd /usr/src

svn checkout http://red5.googlecode.com/svn/java/server/trunk/ red5

mv red5 /usr/local/

cd /usr/local/red5

ant prepare

ant dist

you will see a ton of lines, but you should get at last

BUILD SUCCESSFUL

that’s mean its install and now copy the conf directory from dist/ and test the red5 installation.

cp -r dist/conf .

./red5.sh

If it shows Installer service created in the last then everything is fine here, press ctrl+c and move to next step to create init script.

5) Init Script

Now we will create init script for red5 to start, stop and restart easily.

vi /etc/init.d/red5

download http://www.sohailriaz.com/downloads/red5.txt and copy / paste code in it. The init script code also be viewed below.

#!/bin/sh

# For RedHat and cousins:

# chkconfig: 2345 85 85

# description: Red5 flash streaming server

# processname: red5

PROG=red5

RED5_HOME=/usr/local/red5

DAEMON=$RED5_HOME/$PROG.sh

PIDFILE=/var/run/$PROG.pid

# Source function library

. /etc/rc.d/init.d/functions

[ -r /etc/sysconfig/red5 ] && . /etc/sysconfig/red5

RETVAL=0

case “$1″ in

start)

echo -n $”Starting $PROG: ”

cd $RED5_HOME

$DAEMON >/dev/null 2>/dev/null &

RETVAL=$?

if [ $RETVAL -eq 0 ]; then

echo $! > $PIDFILE

touch /var/lock/subsys/$PROG

fi

[ $RETVAL -eq 0 ] && success $”$PROG startup” || failure $”$PROG startup”

echo

;;

stop)

echo -n $”Shutting down $PROG: ”

killproc -p $PIDFILE

RETVAL=$?

echo

[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$PROG

;;

restart)

$0 stop

$0 start

;;

status)

status $PROG -p $PIDFILE

RETVAL=$?

;;

*)

echo $”Usage: $0 {start|stop|restart|status}”

RETVAL=1

esac

exit $RETVAL

Enable executable permission

chmod +x /etc/init.d/red5

Now start the service

/etc/init.d/red5 start

check status

/etc/init.d/red5 status

red5 (pid  XXXXX) is running…

again you can do stop, restart.

6) Test

Now test the RED5 installation by opening following URL in browser

http://yourip:5080/

you will see red5 page like this

red5_11

and demos can be find here.

http://yourip:5080/demos/

red5_21

You can use simple port tester tool that determines which ports the Flash Player is able to connect through to the Red5 server. Put your server address or IP in HOST when using port tester. You should get SUCCESS on RTMP or port 1935. If not please check your firewall.

http://yourip:5080/demos/port_tester.html

red5_3

7) ISSUE

When you run ./red5.sh, it will show you Installer service created. Thats mean everything runs fine and red5 server is up. But if you went to port_tester.swf using demos above or your application shows connections FAILS, this is an issue of RTMPT and RTMPTS. You can see it by running

/usr/local/red5/red5.sh

output trancated

[INFO] [main] org.red5.server.tomcat.TomcatLoader – RTMPT server bean was not found

[INFO] [main] org.red5.server.tomcat.TomcatLoader – RTMPS server bean was not found

output truncated

If you see this you have to uncomment the RTMPT and RTMPTS TomcatLoader in/usr/local/red5/conf/red5-core.xml

vi /usr/local/red5/conf/red5-core.xml

Search for a lines

<!– RTMPT –>

<!–

<bean id=”rtmpt.server” class=”org.red5.server.net.rtmpt.TomcatRTMPTLoader” init-method=”init” lazy-init=”true”>

Remove the <!– from start of <bean and –> from end of </bean>

Same goes for RTMPS

<!– RTMPS –>

<!–

<bean id=”rtmps.server” class=”org.red5.server.net.rtmps.TomcatRTMPSLoader” init-method=”init” lazy-init=”true”>

Remove the <!– from start of <bean and –> from end of </bean>

Restart the red5 services and connection fails problem will be fixed.

If you any question please use comments.

pixelstats trackingpixel

Cùng tìm hiểu Windows Experience Index (WEI)

Có lẽ nếu ai đã dùng window 7 chắc cũng không ít 1 lần thử dùng Windows Experience Index , 1 tính năng mới của microsoft đưa ra cho win 7. Sau đây là một ít thông tin về Windows Experience Index (WEI) dành cho các bạn quan tâm về thông số của nó.

Microsoft lần đầu tiên giới thiệu trước công chúng về Windows Experience Index trong Windows Vista như một công cụ để do hiệu suất của các thiết bị phần cứng trong máy tính. Nó bao gồm bộ xử lý trung tâm, bộ nhớ RAM, hiệu suất đồ họa và đĩa cứng, nó ước định và đưa ra các con số cho phần cứng của bạn, và số điểm nhỏ nhất được sử dụng như là điểm cơ bản (base score) của hệ thống. Nói chung, một máy tính có điểm (cơ bản) cao hơn sẽ có hiệu năng tốt hơn toàn diện so với máy tính có điểm (cơ bản) thấp hơn. Tương tự như thế, một phần cứng có điểm cao hơn sẽ cho hiệu năng tốt hơn so với phần cứng có điểm thấp hơn. Continue reading “Cùng tìm hiểu Windows Experience Index (WEI)” »

Enhance Windows Speech Recognition by Using Macros

In this article I will talk again about Windows Speech Recognition and how you can enhance its functionality by using macros. I will show you how to create macros which do things such as: insert specific blocks of text, run programs with specific parameters and send keystrokes to any application. You will also learn how to create aliases for existing Windows Speech Recognition commands which are are hard to remember and replace them with more meaningful voice commands. At the end I will detail how to create macros which execute more advanced commands such as searching weather information for a given location.

What is a Windows Speech Recognition Macro?

Windows Speech Recognition macro is a vocal command that can be used to execute more than one action. Think of a macro as an alias for more operations. For example, instead of dictating all letters from A to Z, you could just say ‘Type Alphabet’ andWindows Speech Recognition will type all letters of the alphabet for you. As you will see, Windows Speech Recognition macros can be used to do many useful things which will improve your productivity.
What to Install in Order to Use Windows Speech Recognition Macros

The first step is to download an application made by Microsoft called Windows Speech Recognition Macros. Before you download it, Microsoft will verify if you have a genuine copy of Windows. If you don’t, you won’t be able to download the application. If you do have a genuine copy of Windows Vista, then download the ‘WSRMacros.msi’ file found at the bottom of Microsoft’s download page. After you have finished the download, run the setup and install it.

Windows Speech Recognition Macros

Go to Start Menu -> Windows Speech Recognition Macros. The application can be also found in the folder ‘C:\Program Files\WSRMacros\’.

Windows Speech Recognition Macros

When you click on the shortcut, it will launch both Windows Speech Recognition and Windows Speech Recognition Macros. In the system tray, in the down right corner of your screen, you will see the Windows Speech Recognition Macros icon.

Windows Speech Recognition Macros
How to Create Windows Speech Recognition Macros

Once you have started the application, you can see the Windows Speech Recognition Macros in the down right corner of your screen. Right click and, in the contextual menu, click on New speech Macro. Alternatively you can double click on the Windows Speech Recognition Macro icon.

Windows Speech Recognition Macros

A new window called New Speech Macro will appear, with five available options from which to choose. Each of these options will let you create a macro which does a specific action. I will explain what you can do with these options and how they can make your day to day computer activities easier and less time consuming. To select an option, just click on its button.

Windows Speech Recognition Macros
Create Macros Which Insert Specific Blocks of Text

By clicking on the first option, called Insert Text, you will create a macro which can insert a specific text. For example, imagine having to sign yourself at the end of each e-mail. Instead of dictating With Respectyour name, your position in the company and other similar details, you could just say sign my name or something else more to your liking, and Windows Speech Recognition will type it all for you.

Once you click on the Insert Text button, the New Speech Macro window will pop-up. Now you have to specify the trigger and the text you want to insert. The trigger is a sign, in our case a voice command that is expected before the action can be done. For example, you need to say ‘Start listening’ (trigger) before Windows Speech Recognition starts listening (action trigger) to any of your commands. If you don’t say the trigger command, Windows Speech Recognition remains idle without doing anything.

The first field from the New Speech Macro window is the trigger field. Type or dictate the trigger, in our case ‘sign my name’. In the second field called the ‘action triggered’, you should type the text that will be inserted. This can be of any length. For this example, I typed With Respectnew linename and the remaining details.

Once you are done with the trigger and the action triggered, click on Next.

Windows Speech Recognition Macros

Now you are given the opportunity to recheck the trigger and the action triggered. Also, you can give a specific name to the macro file you are creating.

NOTE: Every macro is saved into a file and all macros are located by default in the ‘Documents -> Speech Macro’ folder. It is recommended NOT to change their location. By default, Windows Speech Recognition looks for macros in this folder and will load them and use them when triggered.

Leave the ‘Digitally sign’ option checked and click on the Create button.

Windows Speech Recognition Macros

A new window will appear coupled with an User Access Control (UAC) prompt, asking for your permission to continue. Afterwards, you will see a window called ‘Signing data with your private signature key’. Click on OK and you will be announced that your macro has been created.

Windows Speech Recognition Macros
Create Macros Which Run Programs

With this option you can create macros which open an application of your choice when you dictate a certain command. To create such a macro, when you are in the New Speech Macro window, choose the second option called ‘Run a Program’.

Windows Speech Recognition Macros

You are prompted for a voice trigger command and for the path to the application you wish to open. To select the application, click on the Browse button.

Windows Speech Recognition Macros

Look for the application you want to start when saying the trigger command and click on OK.

Windows Speech Recognition Macros

In the last field you can add command line arguments for the application you just selected. For example, in the screenshot below, I am making a macro which launches Mozilla Firefox so that, every time it starts, it loads our site.

Windows Speech Recognition Macros

When done, click on Next. Afterwards, you will see a window called ‘Signing data with your private signature key’. Click on OKand you will be announced that your macro has been created.
Create Macros Which Send Keystrokes

With this option you can create macros which send keystrokes to the computer when you dictate a certain command. Once theNew Speech Macro window appears, choose the third option called ‘Send Keystrokes’.

Windows Speech Recognition Macros

You are now prompted for a voice trigger command and the keys you wish to have pressed when the action is triggered. With this option you can create voice triggers for specific keyboard commands. Instead of ‘ALT+F4′ (close current application) you can dictate ‘close window’.

Enter the voice command that you want to use and the combination of keys that will be sent to the currently running application.

Windows Speech Recognition Macros

IMPORTANT: The keys between double braces -{{key}}- are really important and are called modifiers. As a rule, they will always be higher in precedence than all the other keys. The keys enclosed in single braces -{key}- are called non-modifiers. The rest of the keys are considered normal keys (letters or numbers) and they don’t need braces.

The keys that are mainly used for double or single braces are Ctrl, Alt, Shift, F1 to F9 , TAB, ESC and such keys. The last set of keys, normal ones such as a letters or numbers, won’t have any set of braces and they will be last in the sequence.

A modifier is a key that is pressed, awaits for another key to be pressed and then they are both released. This is used when using combination such as {{CTRL}} C (copy), {{CTRL}} V (paste), {{CTRL}}{{SHIFT}}{ESC}.

The keys that are enclosed in single braces are those that aren’t apart of simple numbers and letters and are also not pressed and kept pressed awaiting for another key.

It is important to keep the braces precedence to have a macro working properly. The order is {{all modifiers}} {all non-modifiers} normal keys . To better understand this, it is correct to use {{CTRL}}{{SHIFT}}{ESC} (notice that there is no modifier after the non-modifier), but incorrect to use {ESC}{{CTRL}}{{SHIFT}} or {{CTRL}}{ESC}{{SHIFT}}. The modifiers -{{keys}}- must always be put first.

When creating this type of macros be careful to the numbers of braces used for modifiers and non-modifiers keys and the order in which you write them. If there is one little mistake, the macros won’t function correctly and you will get an error message similar to the one below.

Windows Speech Recognition Macros
Create Alias Macros for Default Commands

With this option you can create a Speech Macro that emulates an existing Windows Speech Recognition command using a phrase of your own. If you want to know the complete list of Windows Speech Recognition, go to Control Panel -> Ease of Access -> Speech Recognition Options -> Open the Speech Reference Card. If you think that some of the commands are not really natural and easy to remember, you can use this option to define other commands which do the same thing but are easier to remember.

To quickly create such aliases, click on Emulate Recognition in the New Speech Macro window.

Windows Speech Recognition Macros

In the first field type the command you want to use. In the second, write the Windows Speech Recognition command that you want to emulate.

Windows Speech Recognition Macros

Review the macro you just created, specify the filename and click on Create.

Windows Speech Recognition Macros
Create Macros which Execute Advanced Commands

You can create also more advanced macros which execute commands stored as XML code. XML is a simple markup language designed for easy information sharing between computers, applications, etc. It is generally used to describe different kinds of data in a structured way.

Windows Speech Recognition Macros allows you to load and use advanced commands stored as XML files. This kind of XML macros can execute tasks such as searching the weather for a specific location or help you navigate through your PowerPoint slides. Microsoft provides you a small library of advanced macros which you can download and use. They can be found on theWindows Speech Recognition Macros download page.

To create such macros, click on Advanced in the New Speech Macro window.

Windows Speech Recognition Macros

Next, download the macros you want from the Windows Speech Recognition Macros download page. Open them using Notepad or any other text editor. If you don’t know how to do it, read our tutorial called How to open files using a different program than the default.

Then copy the whole text from Notepad, paste it into the New Speech Macro window and click on Next.

Windows Speech Recognition Macros

Then save your macro and you are done.
Conclusion

As you can see from this article, Windows Speech Recognition Macros is a very useful application which can simplify the way you use Windows Speech Recognition. If you have used it already don’t hesitate to share your experience with us and our readers. All will be happy to learn more about this application.

In previous articles I talked about how to use Windows Speech Recognition and how to take advantage of its advanced configuration options so that you can have a great experience. In this article I will talk about Windows Speech Recognition Profiles and how to easily backup and restore them any time you need to. As you will see for yourself, the procedure is very simple and involves using a small tool.
What a Speech Profile Is

A profile is basically the collection of all settings and information about how to recognize your voice when using Windows Speech Recognition. Before changing the language used or letting other persons use Windows Speech Recognition it is best to create a new profile so that your current one will remain unaltered. If another person will use Windows Speech Recognition and you don’t create another profile, it will alter the performance of the application and it is very likely to have worse results when working with it in the future.

How To Make a New Profile

To learn how to create a new profile, check out our previous article called Windows Speech Recognition: How To Benefit From its Advanced Configuration Options. In that article you will find a chapter called How To Create, Change or Remove Windows Speech Recognition Profiles. Carefully read and follow the instructions shown there.

Why Backup Speech Profiles

There are many reasons why you should backup your speech profile(s). First of all, in case your computer crashes and you need to reinstall Windows Vista, you will loose all the training and settings you made for Windows Speech Recognition. Having a backup is always handy as you can quickly restore everything once you reinstall your operating system. Also, if you have your profile saved you can also migrate it to another computer and use it there as well.

How To Backup and Restore a Speech Profile

First, you need to download a free application called the Speech Recognition Profile Manager Tool.

After the download is complete, run the SpProfileMgr.exe file. You will receive a security warning. Click on Run.

Speech Recognition Profile Manager Tool

Accept the license agreement and extract the application in a folder of your choosing. Now, go to the folder where you unpacked the program and run SpProfileMgr.exe.

Speech Recognition Profile Manager Tool

Once the application has opened, you are presented with two options: import and export.

If you previously saved a profile and want to add that profile, click on the Import button and load the file containing the previously backed up profile. To enable the newly imported profile as the default one, go to Control Panel -> Ease of Access -> Speech Recognition Options -> Advanced Speech Properties and check the profile you want. More information can be found in our previous article called Windows Speech Recognition: How To Benefit From its Advanced Configuration Options. There you will find a chapter called How To Create, Change or Remove Windows Speech Recognition Profiles. Carefully read and follow the instructions shown there.

The Export option can be used to create backups of your current profiles. Select the profile you want to backup, click on Export, select the folder where you want to save it and type the file name. When done, click on Save.

Speech Recognition Profile Manager Tool

IMPORTANT: It is necessary to close Windows Speech Recognition before attempting to import or export a profile. Once you have imported a profile you need to start the Set up a microphone wizard from within Control Panel for optimal use. To do that, go to Control Panel -> Ease of Access -> Speech Recognition Options -> Set up a microphone.

Speech Recognition Options

NOTE: If you want to import your profiles on other computers with Windows Vista installed, download the Speech Recognition Profile Manager Tool and follow the same instructions.

How To Install and Setup a Microphone

I always wanted to hear my voice. I tried recording on an old cassette but didn’t like the results and it was hard to rewind exactly at the point at which my voice was heard. Thankfully the technology evolved and now, with the help of microphones and computers, I can hear my voice crystal clear. However, to make a microphone work in Windows Vista, sometimes you need to do a few little extra steps than the regular plug and play. So, with that said, in this article we will show you how to quickly make your microphone work in Windows Vista.

Setting up the Microphone

Before you start communicating with your computer you need to have a microphone set up. To do this, plug the microphone into your computer. Generally, the color of the microphone jack has the same color as the slot you need to plug it into. If that is not the case, then consult the manual of the sound card and see what is the appropriate port for the microphone.

Next, click on the Start Menu button and click on Control Panel.

Microphone Setup

Once the Control Panel window opens, click on Hardware and Sound.

Microphone Setup

When you are in the Hardware and Sound list, click on em>Sound.

Microphone Setup

In the Sound window you have three tabs: click on the Recording tab.

Microphone Setup

Once you are in the Recording tab, right click on the microphone device you just plugged in and select the ‘Set as Default Device’option.

Microphone Setup

Now, to test and see if it really works, tap the microphone with your finger a few times. In the Sounds window, the empty lines next to the default microphone should fill up with a green color.

Microphone Setup

If you are in the Recording tab and you can’t see your microphone device, right click on any device shown in the Recording tab. In the contextual menu, click ‘Show Disabled devices’ if it isn’t marked with a check sign.

Microphone Setup

If you still can’t see your microphone, you might have not plugged it properly or you need to install a driver for it to work. In the first case, check to see if you have plugged it properly into your computer, plug it again or, if it is on a USB port, plug it in another USB port. As for the second case, use the drivers from the manufacturer’s site or from the CD that came along with the product.

Read the text aloud

At this point Windows Vista may still not recognize that the microphone has been activated. So we need to make Windows Vista aware of the tone and sound of our voice.

Important: The following steps will be also done in the Windows Speech Recognition article so, if you came to this article from that one, you can now go to that one and continue reading from there.

Open the Control Panel window and click on Ease of Access.

Microphone Setup

Now, in the Ease of Access window, click on Set up Microphone.

Microphone Setup

Choose the microphone device that you currently use and click on the Next button.

Microphone Setup

A few indications are given and, if they are followed, will give a better user experience. In my case, since I have selected the Headset microphone the indications are as shown in the image. Once you have read the advice given, click on the Next button.

If you accidentally selected the wrong device or want to go back to a previous page of the setup, click on the blue Back arrow positioned in the top left corner of the setup wizard.

Microphone Setup

Read the given text aloud and, afterwards, click on the Next button.

Microphone Setup

In some cases the microphone does not work in the wizard setup, although it might be enabled and functions properly according to the Recording tab. If this happens, close the wizard setup and, after you checked to see you have the correct microphone device enabled, open the setup wizard again.

In my case, for example, I have activated the microphone on the headset only when I got to this step and it doesn’t seem to work. A few taps on the microphone shows me that it works in the Recording tab, but does not work in the setup wizard, so I must restart the wizard setup.

Microphone Setup

Now, assuming you read the text and clicked on the Next button, the wizard setup will tell you that the microphone has been set up and also you will be prompted about setting up the Speech Recognition by pressing the Finish button.

Microphone Setup

If you encountered any problems while setting up your microphone and you managed to solve them, let us know about it. Others might find useful the solution you have found.

In this article I will talk once more about Windows Speech Recognition and how to benefit from all its advanced configuration options. I will show you how to create new speech profiles and how to manage them, how to add vocabularies or change the existing ones used by the tool. Other topics that will be covered include: how to change the language used by Windows Speech Recognition, how to work with speech dictionaries, audible cues, and how to dictate in other applications.

How To Work with Speech Dictionaries, Audible Cues, and How To Dictate Everywhere

I will start with some basic configuration options which can prove to be very useful when working with Windows Speech Recognition. To get to these options, start the application and right click on it or on its taskbar icon.

Windows Speech Recognition

In the Options menu there are four options, as you can see in the screenshot below:

Windows Speech Recognition

  • ‘Play audible feedback’ – every time you start, stop, make a mistake, or an important action related to Windows Speech Recognition, a distinct sound cue will be heard. This way, the application draws your attention if something important has happened. There are two kind of sound cues: one is used when you start or stop the application while the other one is used to signal problems when you dictate wrong words and commands that have not been understood by the application. In order to differentiate and understand why you hear a sound cue, you can read the text that appears in the application’s message zone. If you want to hear the sounds cues, leave this option checked.
  • Windows Speech Recognition

  • ‘Run at startup’ – will make the application always start when Windows Vista starts. This option is good if you decide to useWindows Speech Recognition on a daily basis. By leaving this option checked you won’t have to manually start it every time you want to use it.
  • ‘Speak text in correcting dialog’ – this is an interesting option which you can use to improve the application. When this option is enabled, each time you correct something you dictated, when using the correction dialog, Windows Speech Recognitionwill play the sound of your voice that was assigned to that word. For example, if I were to say tutorials and the application would understand tutorial, I would say correct tutorial. In the correction dialog I will hear my voice as it was recorded by the application when it was written. Now, I can change the word identified with the voice I heard myself saying and will make the application improve itself. Although this is an interesting option, the improvements are automatically done even when you don’t use it. Therefore, the only thing the option offers is the feedback you receive when hearing your own voice while dictating the word you are correcting.
  • ‘Enable dictation everywhere’ – if you leave this option checked, you can dictate in any application be it with support for speech recognition or not. However, if an application doesn’t offer support for speech recognition, you can only dictate text. You cannot make more advanced actions such as copy, undo, redo. As a reminder, to work with Windows Speech Recognition in an application, it needs to offer support for the Text Service Framework. Windows Vista can be commanded with Windows Speech Recognition because it uses this framework.

Other important configuration options can be found in the Options context menu, in the Configuration sub-menu. There you canSet up the microphone, start another speech training session to make it easier for the application to recognize your voice or you can click on Open Speech Recognition Control Panel to quickly get to Control Panel -> Ease of Access -> Speech Recognition Options. All these options have been covered already in our Windows Speech Recognition Guide.

How To Add Words to the Windows Speech Recognition Dictionary

Below Options and Configuration you have the Open the Speech Dictionary option. This can be used to enrich the knowledge base of the application. Imagine that the application is a person that has basic knowledge of your language. If it hears new words, it won’t easily recognize them without further explanation. In order for Windows Speech Recognition to recognize a new word it needs it to be added in the dictionary used by the application. To add a word, Open the Speech Dictionary. The first time you use it, you will see two options: add a new word and prevent a word from being dictated. The first option can be used to add new words to the application dictionary and make it more familiar to your way of speaking. The second one will help you block words and prevent the application from reacting to them when you dictated them.

NOTE: in the screenshot below you see three options. The third one – change existing words – appears after you created a few rules. The rules that are created can be modified at any time using this option.

Windows Speech Recognition

Next, I will show you how to create a new word. The same rules will apply to the other options as well so there is no need to go through all of them. While you are in the window shown in the screenshot above, click on the ‘Add a new word’. Then, dictate the word you want to add. If it is not recognized, correct it. When done, click on the Next button.

Windows Speech Recognition

When done, click on Finish.

Windows Speech Recognition

How To Use Alternative Vocabularies for Windows Speech Recognition

You can always add Windows Speech Recognition vocabularies for specific domains such as medicine, engineering and others. There are companies such as Trigram Technologies which sell specialized vocabularies to those who need them. These vocabularies will help the application to recognize uncommon words used in specialized fields. If the speech engine cannot understand the phonetics used by you, it will never get the correct word no matter how many words you defined in the default dictionary. Using specialized vocabularies will make Windows Speech Recognition more accurate.

After you install an additional vocabulary, you need to enable it in order for Windows Speech Recognition to use it. To do this, start the application and right click on it or on its taskbar icon. After that select Dictation Topic and then the vocabulary you just installed.

Windows Speech Recognition

NOTE: Every time it starts, Windows Speech Recognition will set itself to the default Narrative vocabulary. Therefore you might need to manually select the other vocabulary each time you want to use it.

How To Access Advanced Speech Options

NOTE:When changing the options described below, it is best to have Windows Speech Recognition closed. Restart the application after you have made the changes you want.

First, go to Control Panel -> Ease of Access -> Speech Recognition Options. Once you are in the Speech Recognition Optionswindow, click on ‘Advanced speech options’, in the top left corner.

Windows Speech Recognition

In the Speech Properties window, go to the Speech Recognition tab. There you will have four distinctive functions, as shown below.

Windows Speech Recognition

These are: language, recognition profiles, user settings and microphone. For more details about them and what they do, please continue reading.

How To Create, Change or Remove Windows Speech Recognition Profiles

Even though it is not the first option in the list, I will talk about it firstly, as it is the most important. A profile is basically the collection of all settings and information about how to recognize your voice when using Windows Speech Recognition. Before changing the language used or letting other persons use Windows Speech Recognition it is best to add another one so that your current one will remain unaltered. If another person will use Windows Speech Recognition and you don’t create another profile, it will alter the performance of the application and it is very likely to have worse results when working with it in the future.

Windows Speech Recognition

To begin, in the Speech Properties window you have the option to create a new profile. Click on the New button, type the name for the new profile and follow the instructions shown by the wizard.

Windows Speech Recognition

When done, the profile will be created and you can start training Windows Speech Recognition.

If you have more than one profile, you can change it just by checking the name of another profile. You can also delete profiles that you previously created. To do this, first select the profile, click on the Delete button and confirm the operation.

Windows Speech Recognition

NOTE: Before you enable, disable or delete a profile, close Windows Speech Recognition. Otherwise you will receive an error message like the one shown below.

Windows Speech Recognition

How To Change the Language used by Windows Speech Recognition

If you want to use a different language than the default one, you first need to install it. To learn how to do this, read our guide on how to change the interface language in Windows Vista.

After you have installed and enabled the additional language, in my case French, open the the Speech Properties window again. Create a new speech profile as shown above and, from the Language drop-down menu, select the language you want to use.

Windows Speech Recognition

NOTE: The dialog that takes place between you and the computer can only be done if the language used for dialogs and menus by Windows Vista is the same as the language set for Windows Speech Recognition. Imagine, for example, sayingwelcome to a French person. While the French person may probably understand, the computer will be confused because it awaits only for the French word for welcome.

Windows Speech Recognition

Now, when opening Windows Speech Recognition, the new language will work properly. If it does not work, redo the steps and make sure you have the Windows Speech Recognition closed, have set the language correctly and checked the correct profile.

Windows Speech Recognition

The next time you open Windows Speech Recognition it will work with the new language that was set as default. All that remains is to take the tutorials using the new language. Details about how to train can be found in our Windows Speech Recognition Guide.

How To Configure User Settings

The next set of configuration options from the Speech Properties window allows you to start Windows Speech Recognitionautomatically at startup and to use your documents to improve itself.

Windows Speech Recognition

The last setting is about how many spaces Windows Speech Recognition will add after the punctuation you dictate. The default value is 2 and can be changed from the drop-down list.

How To Setup the Microphone

The last set of configuration options from the Speech Properties window allows you to configure the microphone used byWindows Speech Recognition.

Windows Speech Recognition

If you click on Audio Input it will open the Sound window where you can configure the microphone device you are using. To learn how to do this, check our previous tutorial on this topic called How To Install and Setup a Microphone.

The Advanced button, when clicked, will allow you to change the audio input device. You can change this to use a device only with Windows Speech Recognition while keeping another microphone device for other uses as the default. If you don’t have such plans, leave it set on the ‘Use preferred audio input device’.

Windows Speech Recognition

The ‘Configure Microphone’ button opens the Set up a microphone wizard from the Windows Speech Recognition Options. More information on how to setup your microphone to work with Windows Speech Recognition can be found here.

Conclusion

As you can see from this article, Windows Speech Recognition is a very versatile tool with many configuration options which can help satisfy your needs. If you have additional information on how to configure and work with this tool, don’t hesitate to leave a comment and share it with us and our readers. There are many people who will find it useful as there is not much in-depth information about how to work with this tool available on the Internet.

The Windows Speech Recognition Guide

Since I saw my first Sci-Fi movie flicks, I wanted to have the technology they were using. I still haven’t touched or seen flying spaceships at that scale, teleporting devices, robots that can dance or other similar gadgets. However, I have found a piece of that dream incorporated in Windows Vista’s Windows Speech Recognition application. This tool tries to understand what you are saying and converts spoken words to machine-readable input such as key presses or Windows commands, thus limiting the need for using the mouse and keyboard. In this tutorial I will show you how to set up Windows Speech Recognition, learn how to use it and give you some information about common issues with this application.

In order to use Windows Speech Recognition you need a microphone. To learn how to set it up, read our guide on How To Install and Setup a Microphone.
How to setup Windows Speech Recognition

Once you have set up your microphone, you need to train Windows Speech Recognition to understand your voice. To do this, open the Control Panel window and click on Ease of Access.

Windows Speech Recognition

If you are using the Classic Control Panel, go to Control Panel -> Ease of Access Center.

When you are in the Ease of Access window, click on Speech Recognition Options.

Windows Speech Recognition

In the Speech Recognition Options window, click on Start Speech Recognition.

Windows Speech Recognition

A setup wizard will appear. To start the configuration, click on the Next button.

Windows Speech Recognition

Choose the microphone device that you currently use and click on the Next button.

Windows Speech Recognition

A few indications are given and, if followed, they’ll give you a better experience. In my case, since I have selected the headset microphone, the indications are as shown below. Once you have read and followed the given advice, click the Next button.

Note: If you accidentally selected the wrong device or you just want to go back to a previous page of the setup, click on the blue Back arrow at the top left corner of the setup wizard window.

Windows Speech Recognition

Read the given text aloud and after that, click the Next button.

Windows Speech Recognition

This procedure seems to be a bit error prone so you might want to repeat it a couple of times and adjust the position of the microphone and its distance from the speakers.

Note: If you have already tried a couple of times and the microphone still didn’t seem to work, close the wizard and double check our guide on How To Install and Setup a Microphone. Once the microphone is setup correctly, restart the procedure described in this article.

Windows Speech Recognition

If you read the text and click the Next button, the wizard will tell you that the microphone has been setup. Click on the Finishbutton.

Windows Speech Recognition

After the microphone is setup, the wizard will try to improve the speech recognition accuracy. The setup wizard will ask your permission to let the application improve itself by using texts from your documents or mail. After you select the option you want, click Next.

Windows Speech Recognition

Now the wizard will give you a speech reference card which contains the list of commands the computer will respond to. If you click on View Reference Sheet, you can see the commands and also print them.

Windows Speech Recognition

When done, click Next.

Note: The Reference Sheet can be read and printed at any further time, simply by going to Control Panel -> Ease of Access -> Speech Recognition Options -> Open the Speech Reference Card.

Windows Speech Recognition

You can make the application start up every time you start Windows Vista by checking the ‘Run Speech Recognition at startup’option. If you leave it unchecked, the application will have to be started manually each time you want to use it.

Windows Speech Recognition
Learn how to use Windows Speech Recognition

Once you are done with the setup, you will be asked to go through a tutorial and learn how to use it. Click on the Start Tutorialbutton to enter.

IMPORTANT: We will not give you any indications about the content found in the tutorial. We think that the tutorial is well written and contains all the information you need. Please reserve 10-15 minutes to go through it. Even though it might seem frustrating at first, you will be satisfied with the results.

If you have finished the tutorial and you think Windows Speech Recognition is not hearing your voice commands well enough, you can take the same tutorial again. To do this, go to Speech Recognition Options and click on Take Speech Tutorial.
If you have gone through the tutorial, but you still feel the need to improve the way Windows Speech Recognition works, you can take another tutorial based on reading texts. To open and use this text based tutorial, click on ‘Train you computer to better understand you’ located in the Speech Recognition Options window.

Recommendation: Go through the ‘Train your computer to better understand you’ tutorial more than once. Even if you make mistakes the first couple of times, in less than 3 days with 2 hours a day, you will wonder how you could have lived without this great application. Instead of closing the application, just say stop listening or press the Control + Windows sign from your keyboard.
Known issues

Some applications may not work with Windows Speech Recognition. This is because applications must have support for Text Services Framework. The framework was built by Microsoft to enable advanced text input, speech recognition, hand writing and multilingual support into applications. So, if application developers didn’t include the Text Services Framework when they built their application, Windows Speech Recognition will not work properly with their application.

Windows Speech Recognition is not working when UAC (User Account Control) warnings appear. In such cases, use the mouse or keyboard to select the UAC option you want.

The Case of the Slooooow System

A few weeks ago my wife complained that her Vista desktop was not responding to her typing or mouse clicks. Given the importance of the customer, I immediately sat down at the system to troubleshoot.  It wasn’t completely hung, but extremely sluggish. For example, the mouse moved and when I clicked on the start button the start menu opened after about 30 seconds. I suspected that something was hogging the CPU and likely could have resolved the problem simply by logging off or rebooting, but knew that if I didn’t determine the root cause and address it, she’d likely be calling on my technical support services again in the near future. In any case, stooping to that kind of troubleshooting hack is beneath my dignity. I therefore set out to investigate.

My first step was to run Process Explorer to see which process was using the CPU. After a few minutes Process Explorer finally appeared and showed that not one, but two processes were involved, each consuming 50% of the CPU: Iexplore.exe and Dllhost.exe. Iexplore is Internet Explorer (IE) and I suspected that IE itself wasn’t the problem, but that it was a browser helper object (BHO), ActiveX control, or some other plugin loaded into IE. Similarly, Dllhost.exe is the host process for out-of-process COM server DLLs, so it was probably not at fault, but the COM server loaded into it. Both required digging deeper and I decided to tackle IE first.

In order to try and get some CPU headroom in which to operate, I suspended the Dllhost process by selecting it in Process Explorer, right-clicking to open the process context menu, and selecting the Suspend entry:

image

That put the Dllhost process to sleep and, as I expected, that freed up 50% of the CPU. That’s because the computer was a dual-core system and so to consume 100% of the available CPU cycles a process would have to have two threads, each hogging one of the cores. Most bugs I’ve seen that result in the CPU being pegged are caused by a single thread.

Processes don’t execute code, threads do, so I needed to look inside the IE process to see what thread or threads were running. I double-clicked on Iexplore.exe in Process Explorer to open its process properties dialog and switched to the Threads page. Several threads were running, but one was dominating the CPU:

image

From past experience I knew that Ieframe.dll was part of IE, but to be sure I clicked on the modules button on the Threads tab of the Properties dialog and switched to the Details page of the resulting Shell properties dialog:

image

The description didn’t give me a clue as the thread’s specific purpose, so I moved to the second clue about the thread, its start function. Because I had configured Process Explorer to retrieve symbols for Windows images from the Microsoft symbol server in Options->Configure Symbols, Process Explorer showed the name of the function where each thread began executing. Sometimes the DLL or function where a thread starts executing is enough to identify the thread’s purpose or the software causing a problem. In this case, the thread began in a function named CTablWindow::_TabWindowThreadProc. The function name hints that it’s the one in which the main thread of a tab starts running, but that still wasn’t enough to tell me why the thread was running so much; I needed to dig even deeper and look inside the thread to see where it was executing.

To look at what the thread was up to, I double-clicked on it in the Threads list to open the Thread Stack dialog, which shows the functions on the thread’s stack. A stack is essentially an execution history, where each function listed called the one above it on the list and the function at the top of the list is the one most recently executed by the thread at the time of Process Explorer looks at the stack. I scrolled through the list, looking for frames that referenced 3rd-party DLLs or Microsoft IE plugins, since they would be far more likely to have a bug than IE’s own code. Sure enough, I found frames pointing at a popular 3rd-party ActiveX control, Adobe Flash:

image

Just to be sure that I hadn’t happened to catch Flash running when a different component was using most of the CPU time, I closed and reopened the stack dialog several times, but all of them pointed at Flash.

The first thing I do when I suspect that some software is causing a problem is to check the vendor’s web site to make sure that I have the latest version. I opened the Process Explorer DLL view and looked at Flash.ocx’s version, went to Adobe’s site and looked at the version of the current Flash download, and they were the same.

I was at a dead end. I couldn’t know for sure if Flash had a bug or, more likely, there was a Flash application that had a bug, nor could I be sure that the problem wouldn’t recur. I tried to determine which site was hosting the Flash content by closing tabs one by one, but when I had close them all the thread was still running.

At this point the only options I had were to uninstall Flash and leave my wife with a degraded web experience, or terminate IE to stop the current CPU usage and hope that it wouldn’t happen again. I chose the latter and the case remains open. Since investigating this I’ve seen the same Flash behavior again on my wife’s system and on my own, so have been vigilantly watching the Adobe site for a new version just in case its due to a bug in Flash itself. I was disappointed that there was no actionable result of the investigation, but at least I knew what had caused the CPU usage.

I now turned my attention the Dllhost problem with the hope that I’d meet with better success. Process Explorer lists in a tooltip the component or components loaded into hosting processes like Svchost.exe (the Windows service host process), Rundll32 (the Control Panel applet hosting process), Taskeng.exe (the scheduled task hosting process on Vista and Server 2008), and Dllhost.exe. I moved the mouse over Dllhost.exe to see what COM server it was running:

image

It was running the Thumbnail Cache COM server, whose job it is to create Explorer thumbnails for image and media files. It is part of Windows, so once again I had to look inside the process for more clues. I resumed the Dllhost process I had suspended earlier and opened the process properties threads page:

image

The thread consuming the most CPU in this case started in Quartz.dll’s ObjectThread function. I looked at its properties and saw that it was another Windows DLL, the DirectShow Runtime, with a generic function name:

image

Next, I double-clicked to look at the thread stack:

image

The first few frames were in User32.dll and Ntdll.dll, core Windows system DLLs, but frames 4-7 are in the Sonicmp4demux.ax (“.ax” is an extension commonly used for DirectShow filters), a 3rd-party component. The function names for those frames were the same and didn’t make sense because the Microsoft symbol server only stores symbols for software included in Windows. Several more stack snapshots confirmed that it was the code causing the CPU usage.

Now that I had my suspect, the next step was to check for a newer version. But first I had to figure out what software the DLL came with, which was harder than it seemed. I opened the DLL view to take a closer look at the version information, but the description didn’t reveal anything:

image

There were no folders in the Start menu or items in the Add/Remove Programs list with Sonic in the name. I Windows-Live-searched (I expect that word to be added to Webster’s any day now) for Sonic and found that it’s part of the Roxio’s CD and DVD authoring software suites. I looked in the start menu and sure enough, found a Roxio folder:

image

I ran the Roxio software to check its version number and discovered that the Creator application includes a built-in facility to check for updates. I ran it, but it came up empty:

image

I checked the Roxio web site just to be sure and it turned out there was a newer version that the built-in updater hadn’t offered, perhaps because the update, according to the page, didn’t offer anything new:

image

I downloaded it anyway (all 640MB of it!) and waited the 15 or so minutes for it to install. Then I checked the version information of Sonicmp4demux.ax to see if it was newer, but its version number, 1.4.402.60802, was the same as the one I’d seen in the DLL view and the file was two years old:

image

I could have uninstalled the software, which would ensure that the problem wouldn’t return, but I wanted to keep Roxio for its DVD authoring functionality. I didn’t care if I didn’t get thumbnails for Roxio-specific image formats – I wasn’t even sure there were any I’d ever see in Explorer – so I set out to see if I could disable just the Sonic demultiplexer. I could have searched the Registry for the DLL name, which is surely where it was registered, but that’s a brute-force approach and if there were indirect or multiple references I could easily end up disabling more than just its thumbnail generation and possibly breaking something in Windows.

Process Monitor was the perfect tool for the job. Because I didn’t know when the problem might reoccur – it might takes days to reproduce – I didn’t want to just run it and let it consume all available virtual memory or disk space, so I set the History Depth in the Options menu to have Process Monitor retain only the most recent 1 million events:

image

I also set an Include filter for paths matching C:\Windows\System32\Dllhost.exe, minimized it, and let my wife have the system back.

The next day I came home from work, sat down at the computer and saw from Process Explorer that Dllhost.exe was back at it, consuming 50% of the CPU. I suspect that because it’s a dual-core system, the problem had been showing up regularly, but my wife hadn’t noticed it because the remaining CPU capacity was enough to mask it (another good reason to buy multi-core processors!). I brought Process Monitor to the foreground and noted it had seen 114,000 Dllhost operations, which was obviously way too many to scan through individually. I searched for “sonicmp4″ and found a reference in a Registry query near the end of the trace:

image

The query is of a COM object registration for the demultiplexer. Because the COM object is a 3rd-party DLL, I was certain that that COM Class ID (CLSID) isn’t hard-coded into Windows, so I went back to the first entry in the trace and searched for “A7DD215″, the first few characters of the CLSID. The search found a match a few thousand operations earlier:

image

The CLSID was in the name of a Registry key under another COM object registration. I Windows-Live-searched (that just rolls off the tongue, doesn’t it?) for the parent CLSID and found this KB article that explains that the registry key is where DirectShow filters register: http://msdn.microsoft.com/en-us/library/ms787560(VS.85).aspx I took a look at the stack for the particular query to confirm that’s the reason Dllhost was reading from there:

image

I was now confident that I could simply rename the Sonic filter registration key to prevent its use. I never delete registry keys when performing this kind of troubleshooting just in case the change disables important functionality or somehow breaks something else. I had seen from the traces that the thumbnail cache generator had come across an AVI file that caused it to load the Sonic demultiplexer, a format Windows is obviously able to handle on its own, so I was pretty sure things would continue to work. After terminating the Dllhost and making the change, I browsed to the same folder, deleted the thumbnails, and confirmed that there was no reduced functionality as far as I could tell. I then used Roxio to successfully burn a DVD with a number of AVI files. This case was closed.

My wife’s system was now usable again, and though I wasn’t able to close the Flash-related part of the case, at least I knew the cause and could keep an eye out for updates. More importantly, by solving the Dllhost part of the case, even if Flash went crazy again, her system would still be usable and she wouldn’t be filing a critical support incident for it with me – thanks to Process Explorer and Process Monitor.

There are a number of conceivable reasons to setup a RamDisk on your Media Center PC. The biggest plausible reason is for the performance increase that can be gained by using a RamDisk as opposed to a Hard Disk to store the temporary files created for time-shifting live TV. In place of writing and erasing this data to your Hard Disk, which is a fair bit slower than RAM and can cause unnecessary wear on your Hard Disk, we can setup a virtual drive that uses RAM instead. The down side of using a RamDisk is that the data must be saved to the Hard Drive before shutting down or it will be lost forever. Also, in regard to Windows 7 Media Center, the files we are going to be using this drive for are quite large and will require somewhat extreme amounts of ram. For instance, an hour of SD programming will require anywhere from 3-4gb and an hour of HD programming will require approximately 7-8gb. This means you’ll need around 16gb of RAM on top of your base system RAM to keep a 2 hour buffer for HD programming. If you meet this steep level of entry the let’s get started. The first thing you’ll need is a copy of QSoft’s RamDisk. Navigating their website can be somewhat tricky so we’ve provided copies of the RamDisk x64 Evaluation and Preferences program for download. Purchasing a copy of the non-time limited software is as little as $12 which is extraordinary as well. Now to get started, the installation process is somewhat difficult for novice users so let’s go over that in detail now. Extract the software to your hard drive and open your Control Panel. Next go to Hardware and Sound then open Device Manager. Continue reading “Setting Up A RamDisk Scratch Drive for Windows 7 Media Center” »

1.Totals
1.1.Handles

Handle: là một loại con trỏ thông minh (smart pointer). Handle là 1 khái niệm trừu tượng được sử dụng để chỉ việc 1 ứng dụng truy xuất các block trên bộ nhớ.
Windows API sử dụng nhiều handle để thể hiện nhiều đối tượng trong windows là con đường nối giữa Hệ điều hành và không gian người sử dụng. Continue reading “Hiểu hơn Tab Performance trong Task Manager để sử dụng RAM hiệu quả” »

Powered by WordPress | Theme: by 85ideas. Editor by Khoanguyen