Wednesday, July 7, 2010

schaums outline of programming with c

Description

                                  The broad, yet in-depth coverage of C programming language, within the context of today's C programming style, makes this book as useful for practicing professionals as it is for beginning programmers. This study guide solves many sample problems using other programming languages so readers can compare several popular languages. It also includes clear explanations of most of the features in the current ANSI standard. The emphasis throughout is on designing clear, legible, modular and efficient programs. 
 
For Free Downloads.


Monday, July 5, 2010

Speech Recognition Circuit Article


                                                            This article details the construction and building of a stand alone trainable speech recognition circuit that may be interfaced to control just about anything electrical, such as; appliances, robots, test instruments, VCR's TV's, etc. The circuit is trained (programmed) to recognized words you want it to recognize. To control and command an appliance (computer, VCR, TV security system, etc.) by speaking to it, will make it easier, while increasing the efficiency and effectiveness of working with that device. At its most basic level speech recognition allows the user to perform parallel tasks, (i.e. hands and eyes are busy elsewhere) while continuing to work with the computer or appliance. This circuit allows one to experiment with many facets of speech recognition technology. The heart of the circuit is the HM2007 speech recognition integrated circuit. The chip provides the options of recognizing either forty .96 second words or twenty 1.92 second words. This circuit allows the user to choose either the .96 second word length (40 word vocabulary) or the 1.92 second word length (20 word vocabulary). 
                            
                                                For memory the circuit uses an 8K X 8 static RAM. The chip has two operational modes; manual mode and CPU mode. The CPU mode is designed to allow the chip to work under a host computer. This is an attractive approach to speech recognition for computers because the speech recognition chip operates as a co-processor to the main CPU. The jobs of listening and recognizing doesn't occupy any of the computer's CPU time. When the HM2007 recognizes a command it can signal an interrupt to the host CPU and then relay the command code. The HM2007 chip can be cascaded to provide a larger word recognition library.
                                               
                                                The SR-07 circuit we are building operates in the manual mode. The manual mode allows one to build a stand alone speech recognition board that doesn't require a host computer and may be integrated into other devices to utilize speech control.


 Applications
 

    • Command and control of appliances and equipment
 
    • Telephone assistance systems
 
    • Data entry
 
    • Speech controlled toys
 
    • Speech and voice recognition security systems
 
Software Approach
 
                                              Currently most speech recognition systems available today are programs that use personal computers. The add-on programs operate continuously in the background of the computers operating system (windows, OS/2, etc.). These programs require the computer to be equipped with a compatible sound card. The disadvantage in this approach is the necessity of a computer. While these speech programs are impressive, it is not economically viable for manufacturers to add full blown computer systems to control a washing machine or VCR. At best the programs add to the processing required of the computer's CPU. There is a noticeable slow down in the operation and function of the computer when voice recognition is enabled.
 
Learning to Listen
 
                                              We take our ability to listen for granted. For instance we are capable of listening to one person speak among several at a party. We sub-consciously filter out the extemporaneous conversations and sound. This filtering ability is beyond the capabilities of today's speech recognition systems.
Speech recognition is not speech understanding. Understanding the meaning of words is a higher intellectual function. Because a computer can respond to a vocal command does not mean it understands the command spoken. Voice recognition system will one day have the ability to distinguish linguistic nuances and meaning of words, to "Do what I mean, not what I say!" .................


Speaker Dependent / Speaker Independent


                                                     Speech recognition is classified into two categories, speaker dependent and speaker independent.
 
Speaker dependent systems are trained by the individual who will be using the system. These systems are capable of achieving a high command count and better than 95% accuracy for word recognition. The drawback to this approach is that the system only responds accurately only to the individual who trained the system. This is the most common approach employed in software for personal computers.
 
Speaker independent is a system trained to respond to a word regardless of who speaks. Therefore the system must respond to a large variety of speech patterns, inflections and enunciation's of the target word. The command word count is usually lower than the speaker dependent however high accuracy can still be maintain within processing limits. Industrial requirements more often need speaker independent voice systems, such as the AT&T system used in the telephone systems.
 

Recognition Style
 
                                      Speech recognition systems have another constraint concerning the style of speech they can recognize. They are three styles of speech: isolated, connected and continuous.

Isolated speech recognition systems can just handle words that are spoken separately. This is the most common speech recognition systems available today. The user must pause between each word or command spoken. The speech recognition circuit is set up to identify isolated words of .96 second lengths.
 
Connected is a half way point between isolated word and continuous speech recognition. Allows users to speak multiple words. The HM2007 can be set up to identify words or phrases 1.92 seconds in length. This reduces the word recognition vocabulary
number to 20.
 
Continuous is the natural conversational speech we are use to in everyday life. It is extremely difficult for a recognizer to shift through the text as the word tends to merge together. For instance, "Hi, how are you doing?" sounds like "Hi,.howyadoin" Continuous speech recognition systems are on the market and are under continual development.


Speech Recognition Circuit

                                                The demonstration circuit operates in the HM2007's manual mode. This mode uses a simple keypad and digital display to communicate with and program the HM2007 chip.

Keypad:
 
The keypad is made up of 12 switches.
1 2 3
4 5 6
7 8 9
* 0 #  
Clear Train
 
When the circuit is turned on, the HM2007 checks the static RAM. If everything checks out the board displays "00" on the digital display and lights the red LED (READY). It is in the "Ready" waiting for a command.


Figure 2

To Train:
To train the circuit, begin by pressing the word number you want to train on the keypad. The circuit can be trained to recognize up to 40 words. Use any numbers between 1 and 40. For example press the number "1" to train word number 1. When you press the number(s) on the keypad the red led will turn off. The number is displayed on the digital display. Next press the "#" key for train. When the "#" key is pressed it signals the chip to listen for a training word and the red led turns back on. Now speak the word you want the circuit to recognize into the microphone clearly. The LED should blink off momentarily; this is a signal that the word has been accepted.
                                              
                                                   Continue training new words in the circuit using the procedure outlined above. Press the "2" key then "#" key to train the second word and so on. The circuit will accept up to forty
words. You do not have to enter 40 words into memory to use the circuit. If you want you can use as many word spaces as you want.
 
Testing Recognition: 

                                                 The circuit is continually listening. Repeat a trained word into the microphone. The number of the word should be displayed on the digital display. For instance if the word "directory" was trained as word number 25. Saying the word "directory" into the microphone will cause the number 25 to be displayed.
Error Codes:
The chip provides the following error codes:
55 = word too long
66 = word too short
77 = word no match


Training the HM2007 IC


Clearing the memory:
 
To erase all the words in the RAM memory (Training) press "99" on the keypad then press the "*" key. The
display will scroll through the numbers 1-40 quickly, clearing out the memory. To erase a single word space press the number of the word you want to clear, then press the "*" key.


Circuit Construction:
 
                                             The schematic is shown in figure 1. Three PCB boards are available for this project, see parts list. The components are mounted on the top side of the board, see Figure 3. Begin construction by soldering the IC sockets on to the PC boards. Next mount and solder all the resistors. Now mount and solder the 3.57 MHz crystal and red LED. The long lead of the LED is positive. Next solder capacitors and 7805 voltage regulator. Solder seven the seven position headers on the keypad to main circuit board as shown in figure 2 and 3. Next solder the 10 position headers on the display board and main circuit board.


 Figure 3

Independent Recognition System
 
                                                             This demo circuit allows you to experiment with dependent as well as independent systems. The system is typically trained as speaker dependent. Meaning the voice that trained the circuit also uses it. 

                                                             To train the system for speaker independent recognition (Multi-user) use the following technique. We will use four word spaces for each target word. Let's arrange the words so that the words can be recognized by just decoding the least significant digit (number) on the digital display.
 
                                                              To accomplish this word spaces 01, 11, 21 and 31 are allocated to the first target word. By only decoding the least significant digit number, in this case 1 of "X" "1" (where X is any number 0 - 3) we can recognize the target word.
 
                                                              We do this for the remaining word spaces. For instances, the second target word will use word spaces 02, 12, 22 and 32. We continue in this manner until all the words are programmed.
 
                                                               If possible use a different person speaking the word. This will enable the system to recognize different voices, inflections and enunciations of the target word. The more system resources that are allocated for independent recognition the more robust the circuit will become.
 
                                                               There are certain caveats to be aware of. First you are trading off word vocabulary number for speaker independence. The effective vocabulary drops from forty words to ten words.
 
                                                               The decoding circuit that recognizes the word number and performs a function must be designed to recognize error codes 55, 66 and 77 and not confuse them with word spaces 5, 6 and 7. Our interface circuit does this.


Voice Security System

                                                               This HM2007 wasn't designed for use in a voice security system. But this doesn't prevent you from experimenting with it for that purpose. You may want to use three or four keywords that must be spoken and recognized in sequence in order to activate a circuit that opens a lock or allows entry.

CPU Mode
 
                                                                The HM2007 speech recognition chip is made to be connected to a host computer system. Actually connecting the chip to the IBM PC bus, parallel port or serial bus isn't a problem. However the circuit will require driver software needed for control training, storing and recognition. The programming will present more of a challenge than the circuit.


END



Copyright Disclaimer:

This site does not store any copyright contents on its server. If any, email us, we'll remove relevant links or contents immediately. email: smsumesh89@gmail.com
Twitter Delicious Facebook Digg Favorites More