Home

EasyVR 3.0 User Manual

image

Contents

1. neas 27 spese 28 Protocol header flle ttai eee et ee 29 EasyVR Arduino Library Documentation eeeeeeseeeeeee esee eene nannten 30 EasyVR Class Reterence 30 PUBIO TYPOS 30 FUNCIONS 30 Detailed DESC 31 Member Enumeration 31 2 EasyVR User Manual 3 0 MN VeeaR WWW Veear eu Constructor amp Destructor 33 Member Function Documentation 33 EasyVRBridge Class tnr innere inns nnn 39 Member 39 Detailed 39 Member Function Documentation 39 Easy VR 40 Getting Started i 40 Speech RECOGMITION 41 Using Sound Tables 43 to Get 3 1
2. 45 User Manual 3 0 EasyVR 3 MN WWW Veear eu VeeaR EasyVR Module Product Description EasyVR is a multi purpose speech recognition module designed to easily add versatile robust and cost effective speech recognition capabilities to virtually any application The EasyVR module can be used with any host with an UART interface powered at 3 3V 5V such as PIC and Arduino boards Some application examples include home automation such as voice controlled light switches locks or beds or adding hearing to the most popular robots on the market EasyVR features host of built in Speaker Independent SI commands for ready to run basic controls in the followings languages English US Italian German French Spanish o Japanese e Supports up to 32 user defined Speaker Dependent SD triggers or commands as well as Voice Passwords SD custom commands can be spoken in ANY language Easy to use and simple Graphical User Interface to program Voice Commands and audio Module can be used with any host with an UART interface powered at 3 3V 5V Simple and robust documented serial protocol to access and program through the host board 3 GPIO lines IO1 IO2 IO3 that can be controlled by new protocol commands PWM audio output that supports 8O speakers Sound playback of up to 9 minutes of recorded sounds or speech 4 EasyVR User Manual 3 0 MN VeeaR WWW Veear e
3. Also the OK and ERROR routines are not explicitly defined since they are host and programming language dependent but appropriate code should be written to handle both conditions Lines beginning with a sharp character are comments Please note that in a real programming language it would be best to define some constants for the command and status characters as well as for mapping numeric arguments that would be used throughout the program to minimize the chance of repetition errors and clarify the meaning of the code See the Protocol header file for sample definitions that can be used in a C language environment Here below all the characters sent and received are written explicitly in order to clarify the communication protocol detailed in the previous sections Recommended wake up procedure wake up or interrupt recognition or do nothing uses a timeout or max repetition count DO SEND b LOOP UNTIL RECEIVE o Recommended setup procedure ask firmware id SEND IF NOT RECEIVE x THEN ERROR send ack and read status expecting id 0 um V v id RECEIVE Ta TAr THEN it s VRbot ELSE IF UB THEN it s an EasyVR ELSE next generation END set language for SI recognition Japanese SEND SEND IC F RECEIVE o THEN OK ELSE ERROR set timeout 5 seconds SEND o SEND F F RECEIVE o THEN OK ELSE ERROR 22 EasyVR User Manual
4. G n Al v nt 40 41 42 43 59 5 5 50 60 Value 1 0 1 2 ns 24 25 26 27 28 29 30 31 User Manual 3 0 EasyVR 15 MN WWW Veear eu VeeaR Command Details This section describes the format of all the command strings accepted by the module Please note that numeric arguments of command requests are mapped to upper case letters see above section CMD BREAK Abort recognition training or playback in progress if any or do nothing b 62h Known issues In firmware ID 0 any other character received during recognition will prevent this command from stopping recognition that will continue until timeout or other recognition results Expected replies STS SUCCESS STS INTERR CMD SLEEP s 73h the specified power down mode Sleep mode 0 8 0 wake on received character only 1 1 wake whistle or received character 2 wake on loud sound or received character 3 5 wake on double clap with varying sensitivity or received character 6 8 wake on triple clap with varying sensitivity or received character Expected replies STS SUCCESS CMD_KNOB 6Bh Set SI knob to specified level Confidence threshold level 0 4 0 loosest more valid results 1 2 typical value default 4 tightest fewer valid results Note knob is ignored for trigger words Expected replies STS SUCCESS CMD_LEVEL v 76h Set SD level Strictness control
5. 72h Recognized SD SV command or Training similar to SD SV command 1 Command position 0 31 In reply to RECOG SD TRAIN SD STS SIMILAR s 73h Recognized SI word or Training similar to SI word 1 Word index 0 31 In reply to RECOG SI RECOG SD TRAIN SD 575 OUT MEM m 600 Memory error no more room for commands or sound table not present In reply to CMD GROUP SD CMD DUMP SX STS ID 78h Provide firmware identification 1 Version identifier 0 In reply to CMD ID STS PIN p 70h Provide pin input status 1 Logic level 0 input low 1 input high In reply to QUERY IO STS TABLE SX d 64h Provide sound table data 1 2 Two 5 bit values that form a 10 bit count of entries in the sound table count 1 32 2 3 Length of table name 0 31 4 n Text of table name ASCII characters from A to In reply to CMD DUMP SX User Manual 3 0 EasyVR 21 MN WWW Veear eu VeeaR Communication Examples These are some examples of actual command and status strings exchanged with the EasyVR module by host programs and the expected program flow with pseudo code sequences The pseudo instruction SEND transmits the specified character to the module while RECEIVE waits for a reply character a timeout is not explicitly handled for simple commands but should be always implemented if possible
6. 28 EasyVR User Manual 3 0 VeeaR www veear eu Protocol header file This file protocol h can be used with applications written in the C language You can download a copy from the VeeaR website ifndef define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define PROTOCOL H PROTOCOL H CMD BREAK CMD SLEEP CMD KNOB CMD LEVEL CMD LANGUAGE CMD TIMEOUT CMD RECOG SI CMD GROUP SD UNGROUP RECOG SD CMD TRAIN SD CMD CMD ERASE SD CMD NAME SD CMD COUNT SD CMD DUMP SD CMD MASK SD CMD RESETALL CMD ID CMD DELAY CMD BAUDRATE CMD QUERY IO CMD PLAY SX CMD DUMP SX STS MASK STS COUNT STS AWAKEN STS DATA STS ERROR STS INVALID STS TIMEOUT STS INTERR STS SUCCESS STS RESULT STS SIMILAR D 5 5 STS TABLE SX N endif PROTOCOL H SD STS OUT OF MEM 0x40 0x60 0x41 0x20 Vo y 0410 jay 2 0 0 _ ii 10 i di 2 77 protocol arguments are in the range 0x40 define ARG M define ARG MAX define A
7. is true if the operation is successful void trainCommand int8 t group int8 t index Starts training of a custom command Results are available after hasFinished returns true Parameters group 0 16 is the target group or one of the values in Groups index 0 31 is the index of the command within the selected group Note The module is busy until training completes and it cannot accept other commands You can interrupt training with stop void recognizeCommand t group Starts recognition of a custom command Results are available after hasFinished returns true Parameters group 0 16 is the target group or one of the values in Groups Note The module is busy until recognition completes and it cannot accept other commands You can interrupt recognition with stop void recognizeWord int8 t wordset Starts recognition of a built in word Results are available after hasFinished returns true Parameters wordset 0 3 is the target word set or one of the values in Wordset Note The module is busy until recognition completes and it cannot accept other commands You can interrupt recognition with stop bool hasFinished Polls the status of on going recognition training or asynchronous playback tasks Return values istrue if the operation has completed int8 t getCommand Gets the recognised command index if any Return values 0 31 is the command index if recognition is succ
8. 3 0 VeeaR Recognition of a built in 1 command start recognition in wordset 1 SEND B wait for reply if 5s timeout has been set wait for max 6s then abort otherwise trigger recognition could never end result RECEIVE F result s THEN successful recognition ack and read result SEND command RECEIVE perform actions according to command ELSE IF result t THEN timed out no word spoken ELSE IF result e THEN error code ack and read which one sump V error RECEIVE 16 SEND 1 error error RECEIVE perform actions according to error ELSE invalid request or reply ERROR END IF Adding a new SD command insert command 0 in group 3 SEND g SEND D SEND A IF RECEIVE o THEN OK ELSE ERROR set command label to ARDUINO 2009 SEND SEND D SEND SEND 0 name length 16 characters digits count twice SEND SEND SEND D SEND U SEND SEND N SEND O SEND 0 encode each digit with a prefix followed by the digit mapped to upper case letters SENDEROS SEND C SEND Po SEND SEND Yo SEND SEND 97 SEND J IF RECEIVE o THEN OK ELSE ERROR User Manual 3 0 EasyVR www veear eu 23 www veear eu Training an SD command repeat the whole training procedure twice for best results train command 0 in group 3 SEND SEND
9. EasyVR module so they are referenced to the internal 3 0V regulated power supply If you need to interface to circuits using different supply there are a number of solutions you can adopt Some of these are outlined below here indicates any one of the three I O pins of the EasyVR Use a pin as an output All the I O pins are inputs with weak internal pull up after power on You must explicitly configure a pin before you can use it as an output see the example code Use general purpose I O pins 8 EasyVR User Manual 3 0 www vee ar eu O NVA V RELAY 3 Inverted Voltage OUT Switched v Load 2 _ T O pin switching a load on a high voltage line using a 12V relay pin connected to high impedance 5V circuit such as MCU input pin pin directly driving a low current LED The exact components values in these circuits may vary You need to calculate required values for your application and choice of components For example resistor value for the LED circuit can be calculated approximately as Where V gp is the LED forward voltage as reported on the LED datasheet at the driving current lop see section Electrical Characteristics Let s assume a typical low current LED has a 1 8 at 5mA the resistor value is Now stay on the safe side and choose a slightly larger resistor such as 1500 If you want to d
10. SEND A wait for reply default timeout is 3s wait for max 1s more then abort result RECEIVE F RECEIVE o THEN training successful OK ELSE IF result r THEN training saved but spoken command is similar to another SD command read which one SEND command RECEIVE A may notify user and erase training or keep it ELSE IF result s THEN training saved but spoken command is similar to another SI command always trigger may skip reading SEND command RECEIVE A may notify user and erase training or keep ELSE IF result t THEN timed out no word spoken or heard ELSE IF result e THEN error code ack and read which one error RECEIVE 16 SEND error error RECEIVE A perform actions according to error ELSE invalid request or reply ERROR END Recognition of SD command start recognition in group 1 SEND SEND wait for reply result RECEIVE result THEN successful recognition ack and read result SEND command RECEIVE A perform actions according to command ELSE IF result THEN timed out no word spoken ELSE IF result e THEN error code ack and read which one SEND Et error RECEIVE 116 SEND 1 error error RECEIVE perform actions according to error ELSE invalid request or reply ERROR END 24 EasyVR U
11. STS ERROR CMD ERASE SD e 65h Erase training of SD SV command 1 Group index 0 trigger 1 15 generic 16 password 2 Command position 0 31 Expected replies STS SUCCESS User Manual 3 0 EasyVR 17 WWW Veear eu CMD NAME SD n Label SD SV command 1 Group index 0 trigger 1 15 generic 16 password 2 Command position 0 31 3 Length of label 0 31 VeeaR 4 n Text for label ASCII characters from A to Expected replies STS SUCCESS CMD_COUNT_SD 63h Request count of SD SV commands in the specified group 1 Group index 0 trigger 1 15 generic 16 password Expected replies 575 COUNT CMD_DUMP_SD p 70h Read SD SV command data label and training 1 Group index 0 trigger 1 15 generic 16 password 2 Command position 0 31 Expected replies STS DATA MASK SD m 6Dh Request bit mask of non empty groups Expected replies STS MASK CMD RESETALL r 72h Reset all commands and groups R 52h Confirmation character Expected replies STS SUCCESS CMD ID 78h Request firmware identification Expected replies STS ID CMD DELAY y 79h Set transmit delay 1 Time 0 10 0 10 ms 11 19 20 100 ms 20 28 200 1000 ms Expected replies STS SUCCESS 18 EasyVR User Manual 3 0 MN VeeaR WWW Veear eu CMD BAUDRATE 61h Se
12. reply to Any character after power on or sleep mode STS DATA d 64h Provide command data Training information 1 empty 1 6 training count 8 SD SV conflict 16 SI conflict Known issues 1 In firmware ID 0 command creation deletion might cause other empty commands training count to change to 7 Treat count values of 1 0 or 7 as empty training markers Never train commands more than 2 or 3 times 2 Conflicting command position 0 31 only meaningful when trained 3 Length of label 0 31 4 n Text of label ASCII characters from A to In reply to CMD DUMP SD STS ERROR e 65h Signal recognition error 1 2 Two 4 bit values that form 8 bit error code error 1 16 2 see appendix In reply to CMD RECOG SI CMD RECOG SD CMD TRAIN SD CMD PLAY SX STS INVALID v 76h Invalid command or argument In reply to Any invalid command or argument 575 TIMEOUT 74h Timeout expired In reply to RECOG SI RECOG SD TRAIN SD 20 EasyVR User Manual 3 0 A VeeaR WWW Veear eu STS INTERR 1 69h Interrupted recognition In reply to CMD BREAK while in training recognition or playback STS SUCCESS o GFh OK or no errors status In reply to CMD BREAK CMD DELAY CMD BAUDRATE CMD TIMEOUT CMD KNOB CMD LEVEL LANGUAGE SLEEP GROUP SD CMD UNGROUP SD CMD ERASE SD CMD NAME SD CMD RESETALL CMD QUERY IO CMD PLAY SX STS RESULT
13. 14h ERR RECOG BAD TEMPLATE invalid SD SV command stored in memory 17h ERR RECOG DURATION bad pattern durations 4Ah ERR SYNTH BAD VERSION bad release number in speech file 4Eh ERR SYNTH BAD MSG bad data in speech file or invalid compression 80h ERR NOT A WORD recognized word is not in vocabulary The first group of codes 03h 07h is due to errors in the way of speaking to the EasyVR or disturbances in the acquired audio signal that may depend on the surrounding environment The second group 11h 13h indicates an insufficient score of the recognized word from lowest to highest Acceptance of lower score results may be allowed by lowering the knob or level settings respectively for built in and custom commands see CMD KNOB and CMD LEVEL A third group of codes 14h 17h reports errors in the stored commands that may be due to memory corruption We suggest you check power level and connections then erase all the commands in the faulty group and train them again The fourth group 4Ah 4Eh deals with errors in the compressed sound data either because the wrong version of the QuickSynthesis tool has been used to generate the sound table or because a not supported compression scheme has been selected or data is generically corrupt The last code 80h means that a word has been recognized that is not in the specified built in sets This is due to how Speaker Independent recognition works and should be ignored
14. 8 7 minutes 7 5 minutes 5 3 7 6 minutes 6 6 minutes H SX 4 6 8 minutes 5 9 minutes SX 5 6 1 minutes 5 2 minutes SX 6 5 6 minutes 4 8 minutes 4 bit ADPCM 87 seconds WA 8 bit PCM 45 seconds 38 seconds Once the sound table has been created it can be processed by the EasyVR Commander and downloaded to the module Note that you must first disconnect from the module and do the steps required to start it in boot mode see the section Flash Update Now the command Update Sound Table is enabled either on the toolbar or the Tools menu and it can be used to start the update process First you will be prompted to open the QuickSynthesis project file just created and a new sound table will be generated The project must have been built already with the QuickSynthesis tool before the sound table generation can be completed successfully If recent build is not available you will receive a warning message the project can be opened in QuickSynthesis again and a fresh build started make sure the project file has been saved before the build Once back in the EasyVR Commander the project can be reloaded by pressing the Refresh button If the process completes successfully the Download button will be enabled and the flash update process can start User Manual 3 0 EasyVR 43 WWW Veear eu VeeaR EasyVR Commander v2 2 1 alz File Edit Tools Hel
15. AP SENSE HIGH Highest threshold enum PinConfig Pin configuration options for the extra connector Enumerator OUTPUT LOW Pin is a low output 0 OUTPUT HIGH Pin is a high output 3V INPUT HIZ Pin is an high impedance input INPUT STRONG Pin is an input with strong pull up 10K INPUT WEAK Pin is an input with weak pull up 200 enum PinNumber Available pin numbers on the extra connector Enumerator 107 Pin 1 102 Pin 102 103 Pin enum SoundVolume Some quick volume settings for the sound playback functions any value in the range 0 31 can be used Enumerator 32 EasyVR User Manual 3 0 Y MN VeeaR WWW Veear eu VOL MIN Lowest volume almost mute VOL HALF Half scale volume softer VOL FULL Full scale volume normal VOL DOUBLE Double gain volume louder enum Soundindex Special sound index values always available even when no soundtable is present Enumerator BEEP Beep sound Constructor amp Destructor Documentation EasyVR Stream amp s Creates EasyVR object using a communication object implementing the Stream interface such as HardwareSerial or the modified SoftwareSerial and NewSoftSerial Parameters sthe Stream object to use for communication with the EasyVR module Member Function Documentation bool detect Detects an EasyVR module waking it from sleep mode and checking it responds correctly Return values is true if a compatible module has be
16. CEIVE o set 102 pim SEND q SEND C SEND D LF NOT RECEIVE SEND set IO3 pin as SEND q SEND D SEND C F NOT RECEIVE logic low level THEN OK ELSE ERROR logic high level THEN OK ELSE ERROR input with strong pull up and read state p THEN ERROR ack and read logic level MNA high impedance input reading state is optional p THEN ERROR Use custom sound playback play a at SEND w SEND A SEND A SEND IF RECEIVE o full volume works with any or no table THEN OK ELSE ERROR play entry 13 at half volume SEND w SEND A SEND N SEND H IF RECEIVE o play entry 123 SEND w Simpy VAY sp 2 SENDA ATG RECEIVE THEN OK ELSE ERROR 3 32 26 at max volume THEN OK ELSE ERROR Read sound table dump sound table SEND h IF NOT RECEIVE THEN ERROR read count of entries and name length SEND count RECEIVE SA 32 SEND E count count RECEIVE TAT SEND length RECEIVE read name text FOR i 0 TO length 1 SEND label i RECEIVE NEXT 26 EasyVR User Manual 3 0 N VeeaR WWW Veear eu Built in Command Sets In the tables below a list of all built in commands for each supported language along with group index trigger or word set com
17. G 8 Group 0 9 Group 0 10 Group 0 11 Group 0 53 12 Group 0 13 Group 0 14 Group 0 a 15 Group 0 C3 16 Password 1 2 Wordset 6 3 Wordset 11 E SoundTable 14 Ready Figure 2 Main application window There are four kinds of commands in the software see Figure 2 and Figure 5 e Trigger is a special group where you have the built in SI trigger word Robot and you may add one user defined SD trigger word Trigger words are used to start the recognition process e Group where you may add user defined SD commands e Password a special group for vocal passwords up to five using Speaker Verification SV technology e Wordset built in set of SI commands for instance in Figure 2 above the Wordset 1 is selected 1 On some systems the EasyVR Commander can automatically upload the bridge program to the host board once connected That applies to Robonova controller board and Parallax Basic Stamp 40 EasyVR User Manual 3 0 A VeeaR WWW Veear eu Speech Recognition The recognition function of the EasyVR works on a single group at a time so that users need to group together all the commands that they want to be able to use at the same time When EasyVR Commander connects to the module it reads back all the user defined commands and groups which are stored into the EasyVR module non volatile memory You can add a new command by first selecting the group in which the comman
18. RG ZERO define ARG ACK ii abort recognition playback or ping go to power down set si knob Ll set sd level 1 set si language 1 set timeout 1 do si recog from ws 1 train sd command at group lt 1 gt pos 2 insert new command at group 1 pos 2 remove command at group 1 pos 2 do sd recog at group 1 0 trigger mixed si sd reset command at group 1 pos 2 label command at group 1 pos 2 with length 3 name 4 n get command count for group 1 read command data at group 1 pos 2 get active group mask reset all commands and groups get version id set transmit delay 1 log scale set baud rate 1 bit time 1 gt 115200 configure read or write I O pin 1 of type 2 wave table entry 1 2 10 bit playback at volume 3 dump wave table entries mask of active groups 1 8 count of commands 1 back from power down mode 205 lt lt 2 signal error code lt 1 2 gt invalid command or argument timeout expired back from aborted recognition no errors status recognized sd command lt 1 gt training similar to sd lt 1 gt recognized si lt 1 gt in mixed si sd training similar to si lt 1 gt label lt 3 35 gt counted string see break no more available commands see group provide version id 1 return pin state 1 provide table count 1 2 10 bit name 3 35 count
19. SoundTable the last one in the list with a yellow icon They can be played back and tested using the Sound command on the toolbar or in the Tools menu See also how to do that in your application in the code example Use custom sound playback 44 EasyVR User Manual 3 0 Y N VeeaR WWW Veear eu How to get support Please feel free to contact us with any questions queries or suggestions If your question is about technical support or troubleshooting for one of our products we kindly ask you to first check our Forum for a possible solution http www veear eu If you cannot find an existing solution on the forum we strongly recommend posting your support request on the forum for as quick a response as possible The more detail you provide the better support we can give User Manual 3 0 EasyVR 45 NN WWW Veear eu VeeaR VeeaR TIGAL KG all right reserved TIG All VeeaR branded boards and software are designed and manufactured by RoboTech srl 2 ROBO e ECH sri Edutainment Robots and more RoboTech srl and TIGAL KG assume no responsibility for any errors which may appear in this manual Furthermore RoboTech srl and TIGAL KG reserve the right to alter the hardware software and or specifications detailed herein at any time without notice and does not make any commitment to update the information contained herein RoboTech srl TIGAL KG products are not authorized for
20. VeeaR User Manual Release 3 0 www veear eu V WWW Veear eu VeeaR Table of Contents Easy VR 4 Product DESCIPUOM TET 4 EASY VR nm 4 Technical specifications i 5 Physical dimensions and 5 Recommended Operating Conditions enne enne 6 Electrical Characteristics 0 011000 6 Power Supply Requirements sse ener internen 6 SIM Ee IE 6 MICO PONG 7 PU GIO OUTPUT e 8 General Purpose RR gne eR 8 Flash Up ate 10 Easy VR Shield for 11 5 T 11 Physical dimensions and 11 Jumper Settings 12 LEDS een eee a 12 Quick start for the Shield rtt e 12 Programming P 14 Comm nic
21. al memory for custom commands and groups Return values is true if the operation is successful Note It will take about 35 seconds for the whole process to complete and it cannot be interrupted During this time the module cannot accept any other command The sound table data is not affected 38 EasyVR User Manual 3 0 Y MN VeeaR WWW Veear eu EasyVRBridge Class Reference Public Member Functions e bool check e void loop uint8 ta rx uint8 ta tx uint8 tb rx uint8 tb tx Detailed Description An implementation of a software bridge between two series of pins that enables routing of the hardware serial port connected to the PC to digital I O pins used as a software serial port connected to the EasyVR Member Function Documentation bool check Tests if bridge mode has been requested Return values is true if bridge mode should be started Note The first two EEPROM locations bytes 0 1 are used for discovery and request of bridge mode from the EasyVR Commander software Do not use the same locations for other programa data void loop uint8 ta rx uint8 tx uint8 tb rx uint8 tb tx Performs bridge mode between port A and B in an endless loop Parameters a rx is the Rx pin of port A a_txis the Tx pin of port A b rxis the Rx pin of port B b_txis the Tx pin of port B Note Bridge mode internally connects Rx A to Tx B and Rx B to Tx A This is done by reading from a pin and w
22. ata gt int veear eu LiquidCrystal the extent possible under la Matrix gt dedicated all al NewSoftSerial 50 Servo SPI 5 To test the Shield with your Arduino programming IDE 1 Set the jumper J12 in the SW position 2 Open the example sketch TestEasyVR from your IDE menu File gt Examples gt Easy VR 3 Upload the sketch and open the Serial Monitor window 4 See comments on top of the sketch for usage details Keep in mind that if you have a bridge code running on Arduino all examples do you can connect the EasyVR Commander leaving the jumper in the SW position just make sure the monitor window is closed When the EasyVR Commander is connected you can also generate a template code for Arduino that will use the provided libraries see EasyVR Arduino Library Documentation All you need is to write actions for each recognized command User Manual 3 0 EasyVR 13 V WWW Veear eu VeeaR EasyVR Programming Communication Protocol Introduction Communication with the EasyVR module uses a standard UART interface compatible with 3 3 5V TTL CMOS logical levels according to the powering voltage VCC A typical connection to an MCU based host EasyVR Host MCU VCC 3 3V 5V GND GND ERX TX ETX RX The initial configuration at power on is 9600 baud 8 bit data No parity 1 bit stop The baud rate can be changed
23. ation Protocol 14 arge etia n a a 2 E 14 15 Command 16 Status 20 Communication EXAMpl6S 22 Recommended wake up 22 Recommended setup procedure 0444000 0 22 Recognition of a built in SI 23 Adding new SD command nns intent en nen nnns 23 Training SD command 24 Recognition of an SD 4 24 Head used command groups teet Eu ERE 25 Read how many commands in 25 Read a user defined command 25 Use general purpose 26 Use custom soutd playDack ttt teret e rete e te p ege atu 26 Read sound iz 1o BRE 26 Built in Command
24. d needs to be created and then using the toolbar icons or the Edit menu A command should be given a label and then it should be trained twice with the user s voice the user will be guided throughout this process see Figure 3 when the Train Command action is invoked Command Training Command 2 of Group 5 Sys TEST CMD TWO Phase 1 2 Press the Phase 1 button and say the word corresponding to the command TEST CMD TWO within 5 seconds Figure 3 Guided training dialog Note after clicking on Phase 1 or Phase 2 buttons remember to start speaking only when you see this little window Speak now If any error happens command training will be cancelled Errors may happen when the user s voice is not heard correctly there is too much background noise or when the second word heard is too different from the first one i Trained command is similar to existing command 0 Keep current training anyway Figure 4 Alert dialog in case of conflict The software will also alert if command is too similar to an existing one by specifying the index of the conflicting command in the Conflict column For example in the following Figure 5 the command User Manual 3 0 EasyVR 41 Www veear eu VeeaR TEST CMD ONE sounds too similar to TEST CMD ZERO i e they have been trained with a similar pronunciation Note TEST CMD ZERO and TEST CMD ONE are just examples of labels you sh
25. e XM signal to a high logical level at power on or reset This can be easily done with a jumper taking the signal to a suitable pull up resistor To download a firmware update or a sound table to the EasyVR power on the module with the jumper closed For normal operation just leave the jumper open Do not change the jumper position while the module is already powered on It is safe to change XM level while the module is reset RST low VCC Internal 1KQ IXM Pul down Jumper Boot mode selection circuit The pull up resistor value to use depends on the VCC power supply voltage For the voltage of the XM pin when the jumper is closed short the following relation holds note you have a voltage divider circuit Now if you want XM to be at 3V logic high and solving for R you get That makes 1000 for 3 3V and around 6800 for 5V power supplies Other kinds of circuit are possible that is just an example and one of the simplest to realize To learn how to download new sound tables to your EasyVR module have a look at the section Using Sound Table 10 EasyVR User Manual 3 0 MN VeeaR WWW Veear eu EasyVR Shield for Arduino The EasyVR Shield is an Arduino shield integrating the EasyVR module designed to simplify the EasyVR management for all the Arduino developers Technical specifications Physical dimensions and pin assignment MIC IN ar cero ve
26. e module communicating via an asynchronous serial interface commonly known as UART interface with the following features e Baud Rate 9600 default 19200 38700 57600 115200 e Frame 8 Data bits No parity 1 Stop bit The receiver input data line is ERX while the transmitter output data line is ETX No handshake lines are used Example of a serial data frame representing character A decimal 65 or hexadecimal 41 Idle Start 1 0 0 0 0 0 1 0 Stop Idle OV See also chapter Communication Protocol later on this manual for communication details 6 EasyVR User Manual 3 0 Y N VeeaR WWW Veear eu Microphone The microphone provided with the EasyVR module is an omnidirectional electret condenser microphone Horn EM9745P 382 Sensitivity 38dB 0dB 1V Pa 1KHz Load Impedance 2 2K Operating Voltage 3V Almost flat frequency response in range 100Hz 20kHz If you use a microphone with different specifications the recognition accuracy may be adversely affected No other kind of microphone is supported by the EasyVR Note Vocal commands should be given from about 60cm from the microphone but you can try at greater distances by talking louder Please note that improper acoustic positioning of the microphone will reduce recognition accuracy Many mechanical arrangements are possible for the microphone element and some will work better than others When mounting the microphone in
27. ear eu X P Ug FEET 343 N Gnd Vin ara 101 102 103 foren ao EasyVR J10 Shield 95 R UP PC HW SW A J2 Shield interface same as on Arduino Pins 0 1 are in use when J12 is set as UP PC or HW J3 J4 Pins 12 13 are in use when J12 is set as SW 3 5mm stereo mono audio d jack at line level can also 12 SPEAKER o Differential audio output can directly drive an 8 speaker Microphone input signal TE Im General purpose 3 0 VDC TTL level Also used for on board green LED D6 ee General purpose I O 3 0 VDC TTL level 4 General purpose 3 0 VDC TTL level Note the GPIO J4 3 J4 4 and J4 5 are at nominal 3 0VDC level Do not connect 5VDC directly to these pins User Manual 3 0 EasyVR 11 MN WWW Veear eu VeeaR Jumper settings J12 Operating mode This jumper selects the operating mode of the EasyVR Shield and it can be placed in one of four positions o UP Flash update mode Use it for firmware updates or to download sound table data to the on board flash memory from the EasyVR Commander In this mode the Arduino controller is held in reset and only the embedded USB Serial adapter is used The EasyVR module is set in boot mode connection mode Use it for direct connection with the EasyVR Commander this mode the Arduino controller is held in reset and only the embedded USB Seria
28. ed string 0550 E cile to read more status arguments User Manual 3 0 EasyVR 29 V WWW Veear eu VeeaR EasyVR Arduino Library Documentation EasyVR Class Reference Public Types enum Moduleld VRBOT EASYVR enum WakeMode WAKE ON CHAR WAKE ON WHISTLE WAKE ON LOUDSOUND WAKE ON 2CLAPS WAKE ON 3CLAPS enum ClapSense CLAP SENSE LOW CLAP SENSE MID CLAP SENSE HIGH enum PinNumber 101 IO2 103 enum SoundVolume VOL MIN VOL HALF VOL FULL VOL DOUBLE enum SoundlIndex Public Member Functions EasyVR Stream amp s bool detect bool stop int8 t getID bool setLanguage int8 t lang bool setTimeout int8 t seconds bool setKnob int8 t knob bool setLevel int8 t level bool setDelay uint 6 t millis bool changeBaudrate int8 t baud bool sleep int8 t mode bool addCommand int8 t group int8 t index bool removeCommand int8 t group int8 t index bool setCommandLabel int8 t group int8 t index const char name bool eraseCommand int8 t group int8 t index bool getGroupMask uint32 t amp mask int8 t getCommandCount int8 t group bool dumpCommand 8 t group int8 t index char name uint8 t amp training void trainCommand int8 t group int8 t index void recognizeCommand int8 t group void recognizeWord int8 t wordset bool hasFinished int8 t getCommand int8 t getWord int16 t getError bool i
29. en found bool stop Interrupts pending recognition or playback operations Return values is true if the request is satisfied and the module is back to ready int8 t getID Gets the module identification number firmware version Return values is one of the values in Moduleld bool setLanguage int8 t lang Sets the language to use for recognition of built in words Parameters lang 0 5 is one of values in Language Return values is true if the operation is successful bool setTimeout int8 t seconds Sets the timeout to use for any recognition task User Manual 3 0 EasyVR 33 WWW Veear eu Parameters seconds 0 31 is the maximum time the module keep listening for a word or a command Return values is true if the operation is successful bool setKnob int8 t knob Sets the confidence threshold to use for recognition of built in words Parameters knob 0 4 is one of values in Knob Return values is true if the operation is successful bool setLevel int8 t level Sets the strictness level to use for recognition of custom commands Parameters level 1 5 is one of values in Level Return values is true if the operation is successful bool setDelay uint16 t millis Sets the delay before any reply of the module Parameters millis 0 1000 is the delay duration in milliseconds rounded to 10 units in range 10 100 and to 100 units in range 100 1000 Return values is true if the o
30. ers pin 1 3 is one of values in PinNumber pin 2 4 is one of the input values in PinConfig Return values is the value of the pin User Manual 3 0 EasyVR 37 MN WWW Veear eu VeeaR void playSoundAsync int16 t index int8 f volume Starts playback of a sound from the sound table Manually check for completion with hasFinished Parameters index is the index of the target sound in the sound table volume 0 31 may be one of the values in SoundVolume Note The module is busy until playback completes and it cannot accept other commands You can interrupt playback with stop bool playSound int16_t index int8_t volume Plays a sound from the sound table and waits for completion Parameters index is the index of the target sound in the sound table volume 0 31 may be one of the values in SoundVolume Return values is true if the operation is successful Note To alter the maximum time for the wait define the EASYVR PLAY TIMEOUT macro before including the EasyVR library bool dumpSoundTable char name int16 t amp count Retrieves the name of the sound table and the number of sounds it contains Parameters name points to an array of at least 32 characters that holds the sound table label when the function returns count is a variable that holds the number of sounds when the function returns Return values is true if the operation is successful bool resetAll Empties intern
31. essful 1 if no command has been recognized or 36 EasyVR User Manual 3 0 N VeeaR WWW Veear eu an error occured int8 t getWord Gets the recognised built in word index if any Return values 0 31 is the command index if recognition is successful 1 if no built in word has been recognized or an error occured int16 t getError Gets the last error code if any Return values 0 255 is the error code 1 if no error occured bool isTimeout Retrieves the timeout indicator Return values is true if a timeout occurred bool isConflict Retrieves the conflict indicator Return values is true is a conflict occurred during training To know what caused the conflict use getCommand and getWord only valid for triggers bool isMemoryFull Retrieves the memory full indicator only valid after addCommand returned false Return values is true if a command could not be added because of memory size constaints up to 32 custom commands can be created bool setPinOutput int8 t pin int8 t value Configures an I O pin as an output and sets its value Parameters pin 1 3 is one of values in PinNumber pin 0 1 is one of the output values in PinConfig or Arduino style HIGH and LOW macros Return values is true if the operation is successful int8 t getPinInput int8 t pin int8 t config Configures an I O as an input with optional pull up and return its value Paramet
32. l adapter is used o HW Hardware serial mode Use it for controlling the EasyVR module from your Arduino sketch through the hardware serial port using pins 0 1 o SW Software serial mode Use it for controlling the EasyVR module from your Arduino sketch through a software serial port using pins 12 13 You can also connect the EasyVR Commander in this mode provided that the running sketch implements bridge mode see libraries LEDs A green LED D6 is connected to IO1 and can be controlled by the user s program to show feedback during recognition tasks for example This LED is on by default after reset or power up The red LED D5 lights up when you set the shield to flash update mode see Jumper settings Quick start for using the Shield Follow these few steps to start playing with your EasyVR Shield and Arduino 1 Insert the EasyVR Shield on top of your Arduino board 2 If you want audio output either wire an 80 speaker into the screw terminals J10 or connect active speakers or headphones to the 3 5mm line out jack J9 3 Connect the supplied microphone to the MIC IN J11 connector 4 the EasyVR library to your Arduino libraries folder on your PC 5 Connect your Arduino board to your PC via USB m g M lt ardui gt librar gt v Search libraries Dp Organize Open Includeinlibrary 3 E Computer jArduinoTestSuite SoftwareSerial amp L
33. lable even when no sounds have been downloaded to the module The custom sounds are organized in a so called sound table that users can prepare and build with the special QuickSynthesis tool Please refer to this application s own manual for details about the creation of a sound table Let s summarize the basic steps here e Prepare the audio files you want to include in the sound table in WAV format uncompressed 16 bit 22050Hz mono To create the sound files you may use a free software like Audacity for example http audacity sf net e Open Sensory s QuickSynthesis 5 and create a new project specifying RSC4 family e Add your WAV files and specify one of the supported compression scheme see table below e Optionally add sentences by combining basic WAV sounds That allows you to save memory when you have speech audio files if they share some pieces like You said One You said Two and so on e Build the project with QuickSynthesis and use default settings Build linkable module Load in CONST space Load above or at 0 You will be asked to recompress new or modified sound files just confirm and proceed e Now save your project and build it once again so that the EasyVR Commander will see that your build is up to date The audio compression formats supported by the EasyVR module are Compression Scheme Available Time 8kHz 15 silence Available Time 9 3kHz 15 silence SX 2
34. later to operate in the range 9600 115200 baud The communication protocol only uses printable ASCII characters which can be divided in two main groups e Command and status characters respectively on the TX and RX lines chosen among lower case letters e Command arguments or status details again on the TX and RX lines spanning the range of capital letters Each command sent on the TX line with zero or more additional argument bytes receives an answer on the RX line in the form of a status byte followed by zero or more arguments There is a minimum delay before each byte sent out from the EasyVR module to the RX line that is initially Set to 20 ms and can be selected later in the ranges 0 9 ms 10 90 ms and 100 ms 1 s That accounts for slower or faster host systems and therefore suitable also for software based serial communication bit banging Since the EasyVR serial interface also is software based a very short delay might be needed before transmitting a character to the module especially if the host is very fast to allow the EasyVR to get back listening to a new character The communication is host driven and each byte of the reply to a command has to be acknowledged by the host to receive additional status data using the space character The reply is aborted if any other character is received and so there is no need to read all the bytes of a reply if not required Invalid combinations of commands or arguments are
35. lt in words except trigger Enumerator LOOSER Lowest threshold most results reported LOOSE Lower threshold more results reported TYPICAL Typical threshold deafult STRICT Higher threshold fewer results reported STRICTER Highest threshold fewest results reported enum Level Strictness values for the level settings used for recognition of custom commands except triggers Enumerator EASY Lowest value most results reported User Manual 3 0 EasyVR 31 V WWW Veear eu VeeaR NORMAL Typical value default HARD Slightly higher value fewer results reported HARDER Higher value fewer results reported HARDEST Highest value fewest results reported enum Baudrate Constants to use for baudrate settings Enumerator B115200 115200 bps B57600 57600 bps B38400 38400 bps B19200 19200 bps B9600 9600 bps default enum WakeMode Constants for choosing wake up method in sleep mode Enumerator WAKE ON CHAR Wake up on any character received WAKE ON WHISTLE Wake up on whistle or any character received WAKE ON LOUDSOUND Wake up on a loud sound or any character received WAKE ON 2CLAPS Wake up on double hands clap or any character received WAKE ON 5 Wake up on triple hands clap any character received enum ClapSense Hands clap sensitivity for wakeup from sleep mode Use combination with WAKE ON 2CLAPS or WAKE ON 3CLAPS Enumerator CLAP SENSE LOW Lowest threshold CLAP SENSE MID Typical threshold CL
36. mand index and language identifier to use with the communication protocol Language Trigger Command English 2 Hh moe 5 ataca 44 Rouge emo ih ane 7 oeo domua halo BE 1 k mg nachmehs aladerecha EN pao e w nat aba O RS 3 neso sma abdo vers lebas 4 mami mee vew ts adelante en avant w m eo 03 me ue 2 we ds jd me we de e ms 4 60 oo uk seen sete emo t Mu mee m jw des dx User Manual 3 0 EasyVR 27 V N WWW Veear eu VeeaR Error codes Below the list of the most useful error codes that may be returned by training or recognizing commands 03h ERR DATACOL TOO NOISY too noisy 04h ERR DATACOL SOFT spoke too soft 05h ERR DATACOL TOO LOUD spoke too loud 06h ERR DATACOL TOO SOON spoke too soon 07h ERR DATACOL TOO CHOPPY too many segments too complex 11 ERR RECOG FAIL recognition failed 12h ERR RECOG LOW CONF recognition result doubtful 13h ERR RECOG MID CONF recognition result maybe
37. ocal Disk C Ji Easy R d arduino 0022 EEPROM J Sprite drivers Ethernet Stepper examples Firmata Wire k hardware Ji LiquidCrystal java 1 Matrix Ji 1 NewSoftSerial libraries 15 d reference Js Servo J tools EasyVR Date modified 20 09 2011 11 36 d File folder Figure 1 Installation folder for the Easy VR Arduino library 12 EasyVR User Manual 3 0 Y MN VeeaR WWW Veear eu To check everything is working fine 1 Make sure the jumper J12 is in the PC position 2 Open the EasyVR Commander and connect to the Arduino serial port see Getting Started To download a new sound table 1 Make sure the jumper J12 is in the UP position 2 Open the EasyVR Commander and select the Arduino serial port 3 While disconnected choose Update Sound Table from the Tools menu see Using Sound Table TestEasyVR Arduino 0022 Edit Sketch Tools Help New Ctrl N Open Ctrl O Sketchbook Examples 1 Basics k Close Ctrl W 2 Digital 5 Save Ctrl S 3 Analog Save As Ctrl Maiusc S 4 Communication gt Upload to Board Ctrl U 5 Control Lini Page Setup Ctrl Maiusc P T Print Ctrl P eet T 8 Strings Preferences Ctrl Comma ArduinoISP Quit Ctrl Q ArduinoTestSuite gt Details are displ ayed on the sg EasyVR EasyVRBridge EEPROM TestEasyVR Example code for the EasyVR lib d Written in 2011 by RoboTech srl Firm
38. ould use label names that reflects the real command that you are going to train File Edit Tools AA 3 coma 9 w 94 mmm Group List Group 5 Command List Description Commands Index Label Trained Conflict 0 TEST CMD ZERO 2 OK 1 TEST_CMD_ONE 2 0 Q 2 TEST CMD TWO 0 f Trigger Group Group Group Group Group Group Group Group 9 Group 10 Group Group 12 Group 13 Group 14 Group 15 Group 16 Password 1 Wordset a 138 0 0 49 09 00 049 Figure 5 Conflicting commands The current status is displayed in the EasyVR Commander list view where groups that already contain commands are highlighted in bold The selected group of commands can also be tested by using the icon on the toolbar or the Tools menu to make sure the trained commands can be recognized successfully Note If you want to re train a command you have to erase the previous training first Note Vocal passwords group 16 are much more sensitive to environment noise and distance from the microphone be sure to train and give the password in similar conditions 42 EasyVR User Manual 3 0 VeeaR WWW Veear eu Using Sound Tables The EasyVR can also play one of the sounds or sentences saved on the internal flash memory A predefined beep sound is also always avai
39. p lt lt gs 9 S 2 mmm Group List Sentence List Index A 0 4 gt Processing sound table DemoSnds e 1 NS Sound table built successfully 2 3 a 4 Index Label 5 1 5 0 a 6 2 5 _ 7 3 SND boing e 8 o 4 SND burp A 9 5 SND caling whistle S 10 6 6 SND dock 11 7 5 0 explosion 12 8 SND gong E 13 Q 9 SND horn toy honk t3 14 SND_ klaxon 15 Q SND__photo_shutter 16 1 8 2 6 53 3 ce Ready Figure 6 Sound Table build and download interface The download process will connect at a higher speed to the EasyVR module so the bridge program running on your host device might not work in particular Robonova and Basic Stamp cannot be used for this purpose and you might need a true serial adapter The full speed used is 230400 bit s but the option Slow transfer can be used to reduce it to 115200 for better compatibility with slower serial adapters One adapter that can go to full speed is the SmartVR DevBoard Otherwise any USB Serial adapter with TTL CMOS interface can be used for updating the flash The EasyVR Shield can be used for the download provided that the jumper J12 is in UP position After the download completes a new connection can be established with the EasyVR module in normal mode and the new sounds will be displayed by the EasyVR Commander in the special group
40. peration is successful bool changeBaudrate int8 t baud Sets the new communication speed You need to modify the baudrate of the underlying Stream object accordingly after the function returns successfully Parameters baud is one of values in Baudrate Return values is true if the operation is successful bool sleep int8 t mode Puts the module in sleep mode Parameters mode is one of values in WakeMode optionally combined with one of the values in ClapSense Return values is true if the operation is successful bool addCommand int8 t group int8 t index Adds a new custom command to a group 34 EasyVR User Manual 3 0 MN VeeaR WWW Veear eu Parameters group 0 16 is the target group or one of the values in Groups index 0 31 is the index of the command within the selected group Return values is true if the operation is successful bool removeCommand int8 t group int8 t index Removes a custom command from a group Parameters group 0 16 is the target group or one of the values in Groups index 0 31 is the index of the command within the selected group Return values is true if the operation is successful bool setCommandLabel int8 t group int8 t index const char name Sets the name of a custom command Parameters group 0 16 is the target group or one of the values in Groups index 0 31 is the index of the command within the selected group Return values is t
41. power decreases by a factor of four The difference between a loud and a soft voice can also be more than a factor of four Although the internal preamplifier of the EasyVR compensates for a wide dynamic range of input signal strength if its range is exceeded the user application can provide feedback to the speaker about the voice volume see appendix Error codes Audio Output The EasyVR audio output interface is capable of directly driving an 8O speaker It could also be connected to an external audio amplifier to drive lower impedance loudspeakers Note Connecting speakers with lower impedance directly to the module may permanently damage the EasyVR audio output or the whole module It is possible to connect higher impedance loads such as headphones provided that you scale down the output power according to the speaker ratings for example using a series resistor The exact resistor value depends on the headphone power ratings and the desired output volume usually in the order of 10 Note Connecting headphone speakers directly to the EasyVR audio output may damage your hearing General Purpose Since the EasyVR communication interface takes two pins of the host controller a few spare pins are provided that can be controlled with the communication protocol to get those pins back for basic tasks such as lighting an LED The three I O pins 1 103 are connected directly to the embedded microcontroller on the
42. riting to the other in a fast loop that runs until the microcontroller is reset User Manual 3 0 EasyVR 39 MN WWW Veear eu VeeaR EasyVR Commander The EasyVR Commander software can be used to easily configure your EasyVR module connected to your PC through an adapter board or by using the microcontroller host board with the provided bridge program available for ROBONOVA controller board Arduino 2009 UNO Parallax Basic Stamp You can define groups of commands or passwords and generate a basic code template to handle them It is required to edit the generated code to implement the application logic but the template contains all the functions or subroutines to handle the speech recognition tasks Getting Started Connect the adapter board or a microcontroller host board with a running bridge program to your PC and then check that all devices are properly turned on and start the EasyVR Commander Select the serial port to use from the toolbar or the File menu and then go with the Connect command P Easy VR Commander v2 21 File Edit Tools 2 QS QBS 6 2 s Group List Wordset 1 Command List Index Description Commands Index Label 0 Trigger 1 0 Action a 1 Group 0 Q 1 Move ES 2 Group 2 2 3 Group 0 3 Run 4 Group 0 4 Look 5 Group 0 5 6 Group 0 Q 6 7 Group 0 7 Hello
43. rive higher current LEDs you need a circuit like the second one where you put the LED between the output resistor and the collector of the NPN transistor Use a pin as an input All the I O pins are inputs with weak internal pull up after power or reset You may also configure the pin to have a strong pull up or no pull up at all see the example code Use general purpose I O pins Isolated optional filer SWITCH 5V IN C 7 optocoupler NA IN I O pin connected to a switch or switching sensor pin connected 5V source such as MCU output pin pin with isolated input for safety circuits All these circuits assume the EasyVR pin has been configured with an internal pull up passive components value can be adjusted to account for weak or strong pull up Disabling the internal pull up could be used to put the pin in high impedance state for example to simulate a tri state or open drain output port User Manual 3 0 EasyVR V MN WWW Veear eu VeeaR Again you should refer to the manufacturer s datasheet when interfacing any external components and to calculate required resistors values or other passive components Flash Update The EasyVR module includes a bootloader that allows to update the firmware and to download new sound tables to the on board memory The boot mode is activated by keeping th
44. rue if the operation is successful bool eraseCommand int8 t group int8 t index Erases the training data of a custom command Parameters group 0 16 is the target group or one of the values in Groups index 0 31 is the index of the command within the selected group Return values is true if the operation is successful bool getGroupMask uint32 t amp mask Gets a bit mask of groups that contain at least one command Parameters mask is a variable to hold the group mask when the function returns Return values is true if the operation is successful int8 t getCommandCount int8 t group Gets the number of commands in the specified group Parameters group 0 16 is the target group or one of the values in Groups Return values is the command count User Manual 3 0 EasyVR 35 MN WWW Veear eu VeeaR bool dumpCommand int8 t group int8 t index char name uint8 t amp training Retrieves the name and training data of a custom command Parameters group 0 16 is the target group or one of the values in Groups index 0 31 is the index of the command within the selected group name points to an array of at least 32 characters that holds the command label when the function returns training is a variable that holds the training count when the function returns Additional information about training is available through the functions isConflict and getWord or getCommand Return values
45. sTimeout bool isConflict bool isMemoryFull bool setPinOutput int8 t pin int8 t value int8 t getPinInput int8 t pin int8 t config void playSoundAsync int16 t index int8 t volume bool playSound int16 t index int8 t volume bool dumpSoundTable char name int16 t amp count bool resetAll EasyVR User Manual 3 0 W VeeaR WWW Veear eu Detailed Description An implementation of the EasyVR communication protocol Member Enumeration Documentation enum Moduleld Module identification number firmware version Enumerator VRBOT Identifies a VRbot module EASYVRH Identifies an EasyVR module enum Language Language to use for recognition of built in words Enumerator ENGLISH Uses the US English word sets ITALIAN Uses the Italian word sets JAPANESE Uses the Japanese word sets GERMAN Uses the German word sets SPANISH Uses the Spanish word sets FRENCH Uses the French word sets enum Group Special group numbers for recognition of custom commands Enumerator TRIGGER The trigger group shared with built in trigger word PASSWORD The password group uses speaker verification technology enum Wordset Index of built in word sets Enumerator TRIGGER_SET The built in trigger word set ACTION_SET The built in action word set DIRECTION_SET The built in direction word set NUMBER_SET The built in number word set enum Knob Confidence thresholds for the knob settings used for recognition of bui
46. ser Manual 3 0 VeeaR www veear eu Read used command groups request mask of groups in use SEND m IF NOT RECEIVE k THEN ERROR read mask to 32 bits variable in 8 chunks of 4 bits each SEND MEE mask RECEIVE SEND mask mask RECEIVE A 2 SEND mask mask RECEIVE A 2 SEND mask mask RECEIVE A 2 Read how many commands in a group request command count of group 3 SEND eV SEND 1D IF NOT RECEIVE THEN ERROR ack and read count SEND ww count RECEIVE Read a user defined command dump command 0 in group 3 itas JANI 7 tr_flags training AND 24 SEND p SEND THY SEND A NOT RECEIVE THEN ERROR read command data SEND training RECEIVE extract flags for conflicts SD or extract training count 2 for a completely trained command read index of conflicting command same group if any SHIN 1 1 conflict RECEIVE read label length SENDERE length RECEIVE read label text FOR i 0 length 1 SEND 9 label i RECEIVE decode digits IF label i THEN SENDER label i RECEIVE A Q NEXT User Manual 3 0 EasyVR 25 www veear eu Use general purpose pins set pim to SEND q SEND B SEND A F RECEIVE o set IO2 pin to SEND q SEND C SEND B F RE
47. setting 1 5 1 easy 1 2 default 5 hard A higher setting will result in more recognition errors Expected replies STS SUCCESS CMD_LANGUAGE l 6Ch Set SI language Language 0 English 1 Italian 1 2 Japanese 3 German 4 Spanish 5 French Expected replies STS SUCCESS 16 EasyVR User Manual 3 0 MN VeeaR WWW Veear eu CMD_TIMEOUT 6Fh Set recognition timeout 1 Timeout 1 default 0 infinite 1 31 seconds Expected replies STS SUCCESS CMD RECOG SI 1 69h Activate SI recognition from specified word set 1 Word set index 0 3 Expected replies STS SIMILAR STS TIMEOUT STS ERROR CMD TRAIN SD 1 74h Train specified SD SV command 1 Group index 0 trigger 1 15 generic 16 password 2 Command position 0 31 Expected replies STS SUCCESS STS RESULT 575 SIMILAR 5 5 TIMEOUT 575 ERROR CMD_GROUP_SD 67h Insert new SD SV command 1 Group index 0 trigger 1 15 generic 16 password 2 Position 0 31 Expected replies STS SUCCESS STS OUT OF MEM CMD UNGROUP SD u 75h Remove SD SV command 1 Group index 0 trigger 1 15 generic 16 password 2 Position 0 31 Expected replies STS SUCCESS RECOG SD d 64h Activate SD SV recognition 1 Group index 0 trigger 1 15 generic 16 password Expected replies STS RESULT STS SIMILAR STS TIMEOUT
48. signaled by a specific status byte that the host should be prepared to receive if the communication fails Also a reasonable timeout should be used to recover from unexpected failures If the host does not send all the required arguments of a command the command is ignored by the module without further notification and the host can start sending another command The module automatically goes to lowest power sleep mode after power on To initiate communication send any character to wake up the module 14 EasyVR User Manual 3 0 VeeaR Arguments Mapping www veear eu Command or status messages sent over the serial link may have one or more numerical arguments in the range 1 to 31 which are encoded using mostly characters in the range of uppercase letters These are some useful constants to handle arguments easily ARG_MIN 8 40h Minimum argument value 1 ARG_MAX 60h Maximum argument value 31 ARG_ZERO 41h Zero argument value 0 ARG_ACK 20h Read more status arguments Having those constants defined in your code can simplify the validity checks and the encoding decoding process For example in pseudo code encode value 5 FIVE By ARG ZERO decode value 5 EIYE ARG_ZERO 5 validity check IF ARG lt gt THEN ERROR Just to make things clearer here is a table showing how the argument mapping works ASCII
49. t communication baud rate Speed mode 12115200 1 2 57600 38400 6 19200 12 9600 Expected replies STS SUCCESS CMD QUERY IO q 71h Configure query or modify general purpose I O pins 1 Pin number 1 pin IO1 2 pin IO2 3 pin Pin mode 0 output low 1 output high 2 input 3 input strong 4 input weak High impedance input no pull up Strong means 10K internal pull up means 200K internal pull up default after power up Expected replies STS_SUCCESS mode 0 1 STS_PIN mode 2 4 2 CMD PLAY SX w GEh Wave table entry playback 1 2 Two 5 bit values that form a 10 bit index to the sound table index 1 32 2 3 Playback volume 0 31 0 min volume 15 full scale 31 double gain Expected replies STS SUCCESS STS ERROR ru cd DUMP SX h 68h Read wave table data Expected replies STS TABLE SX STS OUT OF MEM User Manual 3 0 EasyVR 19 MN WWW Veear eu VeeaR Status Details Replies to commands follow this format Please note that numeric arguments of status replies are mapped to upper case letters see the related section STS MASK k 6Bh Mask of non empty groups 1 8 4 bit values that form 32 bit mask LSB first In reply to CMD_MASK_SD STS_COUNT 63h Count of commands 1 Integer 0 31 In reply to CMD COUNT SD STS AWAKEN 77h Wake up back from power down mode In
50. the final device keep in mind the following guidelines 1 Flush Mounting The microphone element should be positioned as close to the mounting surface as possible and should be fully seated in the plastic housing There must be no airspace between the microphone element and the housing Having such airspace can lead to acoustic resonance which can reduce recognition accuracy 2 No Obstructions Large Hole The area in front of the microphone element must be kept clear of obstructions to avoid interference with recognition The diameter of the hole in the housing in front of the microphone should be at least 5 mm Any necessary plastic surface in front of the microphone should be as thin as possible being no more than 0 7 if possible clear area internal diaphragm 3 Insulation The microphone should be acoustically isolated from the housing if possible This can be accomplished by surrounding the microphone element with a spongy material such as rubber or foam The provided microphone has this kind of insulating foam The purpose is to prevent auditory noises produced by handling or jarring the device from being picked up by the microphone Such extraneous noises can reduce recognition accuracy User Manual 3 0 EasyVR 7 V MN WWW Veear eu VeeaR fastened directly absorbent material 4 Distance If the microphone is moved from 15 cm to 30 cm from the speaker s mouth the signal
51. u Technical specifications Physical dimensions and pin assignment U2 12220101 3HM 29 01 0 03 66 45 Connector Number Name Tye m eee Voltage DC input Serial Data Receive TTL level 4 EX Serial Data Transmit tk level 0 ep cnt 1 MORET Microphone erence round 2 MON Microphone input signal RST Active low asynchronous reset internal 100K pull up 02 1 Boot select internal 1K pull down J4 vo General purpose 3 0 VDC TTL level 4 2 WO General purpose 3 0 VDC TTL level 5 103 VO General purpose 3 0 VDC TTL level Note the GPIO J4 3 J4 4 and J4 5 at nominal 3 0VDC level Do not connect 5VDC directly to these pins User Manual 3 0 EasyVR 5 WWW Veear eu VeeaR Recommended Operating Conditions Voltage DC Input Ambient Operating Temperature Range Serial Port Receive Data Serial Port Transmit Data oe Electrical Characteristics These are applicable to J4 pins only including 101 3 XM and RST Parameter Input High Voltage Input Low Voltage Input Leakage Current 0 lt Vio lt Hi Z Input Strong Pull up Resistance Ol Vou Output High Voltage 5 mA Output Low Voltage lo 8 mA Power Supply Requirements Symbol Parameter A Serial Interface The EasyVR is a slav
52. use as critical components in life support devices or systems 46 EasyVR User Manual 3 0

Download Pdf Manuals

image

Related Search

Related Contents

Quick Start Guide for the Shark® 100-S/200  6~13ページ (1.2MB)  2i Calibration Procedure for Service Providers Contents  User Manual  Model 6162 - 日本カノマックス株式会社  Models 1400, 1442, 1442E, 1444, 1444E  Bedienungsanleitung DCR  ITA - Carel  Manuel d`utilisation du moniteur LCD  Centronic VarioControl VC421 - Becker-Automatismos  

Copyright © All rights reserved.
Failed to retrieve file