EasyVR Datasheet 2.0
EasyVR Datasheet 2.0
EasyVR Datasheet 2.0
Datasheet
Release 2.0
www.veear.eu
www.veear.eu
Table of Contents
Table of Contents ............................................................................................................................................ 1
Product Description ........................................................................................................................................ 3
EasyVR features ............................................................................................................................................ 3
New features on EasyVR ............................................................................................................................... 3
Technical specifications ................................................................................................................................. 4
Physical dimensions and pin assignment ...................................................................................................... 4
Recommended Operating Conditions ............................................................................................................ 5
Power Supply Requirements ......................................................................................................................... 5
Communications ............................................................................................................................................ 5
Protocol and Interface ..................................................................................................................................... 6
Basics ............................................................................................................................................................. 6
Arguments Mapping ....................................................................................................................................... 7
ARG_MIN................................................................................................................................................... 7
ARG_MAX ................................................................................................................................................. 7
ARG_ZERO ............................................................................................................................................... 7
ARG_ACK .................................................................................................................................................. 7
Command Details ........................................................................................................................................... 8
CMD_BREAK ............................................................................................................................................ 8
CMD_SLEEP ............................................................................................................................................. 8
CMD_KNOB............................................................................................................................................... 8
CMD_LEVEL ............................................................................................................................................. 8
CMD_LANGUAGE ..................................................................................................................................... 8
CMD_TIMEOUT ........................................................................................................................................ 9
CMD_RECOG_SI ...................................................................................................................................... 9
CMD_TRAIN_SD ....................................................................................................................................... 9
CMD_GROUP_SD .................................................................................................................................... 9
CMD_UNGROUP_SD ............................................................................................................................... 9
CMD_RECOG_SD .................................................................................................................................... 9
CMD_ERASE_SD ..................................................................................................................................... 9
CMD_NAME_SD ..................................................................................................................................... 10
CMD_COUNT_SD ................................................................................................................................... 10
CMD_DUMP_SD ..................................................................................................................................... 10
CMD_MASK_SD ..................................................................................................................................... 10
CMD_RESETALL .................................................................................................................................... 10
CMD_ID ................................................................................................................................................... 10
CMD_DELAY ........................................................................................................................................... 10
CMD_BAUDRATE ................................................................................................................................... 11
CMD_QUERY_IO .................................................................................................................................... 11
CMD_PLAY_SX ....................................................................................................................................... 11
CMD_DUMP_SX ..................................................................................................................................... 11
Status Details ............................................................................................................................................... 12
STS_MASK .............................................................................................................................................. 12
STS_COUNT ........................................................................................................................................... 12
STS_AWAKEN ........................................................................................................................................ 12
STS_DATA .............................................................................................................................................. 12
STS_ERROR ........................................................................................................................................... 12
STS_INVALID .......................................................................................................................................... 12
STS_TIMEOUT ........................................................................................................................................ 12
Datasheet (2.0)
EasyVR
www.veear.eu
STS_INTERR .......................................................................................................................................... 13
STS_SUCCESS ...................................................................................................................................... 13
STS_RESULT .......................................................................................................................................... 13
STS_SIMILAR ......................................................................................................................................... 13
STS_OUT_OF_MEM ............................................................................................................................... 13
STS_ID .................................................................................................................................................... 13
STS_PIN .................................................................................................................................................. 13
STS_TABLE_SX ...................................................................................................................................... 13
Communication Examples ............................................................................................................................ 14
Recommended wake up procedure ............................................................................................................. 14
Recommended setup procedure .................................................................................................................. 14
Recognition of a built-in SI command .......................................................................................................... 14
Adding a new SD command ........................................................................................................................ 15
Training an SD command ............................................................................................................................ 15
Read used command groups ....................................................................................................................... 16
Read how many commands in a group ....................................................................................................... 16
Read a user defined command .................................................................................................................... 17
Use general purpose I/O pins ...................................................................................................................... 17
Use custom sound playback ........................................................................................................................ 18
Read sound table ......................................................................................................................................... 18
Built-in Command Sets ................................................................................................................................. 19
Error codes ..................................................................................................................................................... 21
How to get support ........................................................................................................................................ 21
EasyVR
Datasheet (2.0)
www.veear.eu
Product Description
EasyVR is the second generation version of the successful VRbot Module. It 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 robots such as ROBONOVA-I and POP Bot.
EasyVR features
A host of built-in speaker independent (SI) commands for ready to run basic controls
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
Languages currently supported for SI commands: English U.S., Italian, Japanese, German, Spanish
and French. More languages could be available in future.
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
Datasheet (2.0)
EasyVR
www.veear.eu
Technical specifications
Physical dimensions and pin assignment
Connector
Number
Name
Type
GND
Ground
VCC
Voltage DC input
ERX
ETX
J2
1-2
PWM
J3
1-2
MIC
Microphone input
/RST
Reset
/XM
IO1
I/O
IO2
I/O
IO3
I/O
J1
J4
Description
Note: the GPIO (J4.3/4/5) are at nominal 3.0VDC level. Do not connect 5VDC to these pins!
EasyVR
Datasheet (2.0)
www.veear.eu
Min
Typ
Max
Unit
3.3
5.0
5.5
25
70
ERX
VCC
ETX
VCC
Min
Typ
Max
Unit
VCC
Ta
Parameter
Voltage DC Input
Parameter
ISleep
Sleep current
<1
mA
IOper
Operating current
12
mA
180
mA
ISpeaker
Communications
Adjustable Asynchronous Serial Communication:
Baud Rate: 9600 (default), 19200, 38700, 57600, 115200
8 Data bits
No parity
1 Stop bit
Datasheet (2.0)
EasyVR
www.veear.eu
The initial configuration at power on is 9600 baud, 8 bit data, No parity, 1 bit stop. The baud rate can be
changed 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:
Command and status characters, respectively on the TX and RX lines, chosen among lower-case
letters
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, 100 ms - 1 s. That accounts for
slower or faster host systems and therefore suitable also for software-based serial communication (bitbanging).
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 signalled 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.
EasyVR
Datasheet (2.0)
www.veear.eu
Arguments Mapping
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
'@' (40h)
ARG_MAX
'`' (60h)
ARG_ZERO
'A' (41h)
ARG_ACK
' ' (20h)
Having those constants defined in your code, can simplify validity checks and the encoding/decoding
process. For example (in pseudo-code):
# encode value 5
FIVE = 5 + ARG_ZERO
# decode value 5
FIVE ARG_ZERO = 5
# validity check
IF ARG < ARG_MIN OR ARG > ARG_MAX THEN ERROR
Just to make things clearer, here is a table showing how the argument mapping works:
ASCII
'@'
'A'
'B'
'C'
...
'Y'
'Z'
'^'
'['
'\'
']'
'_'
'`'
HEX
40
41
42
43
...
59
5A
5B
5C
5D
5E
5F
60
Value
-1
...
24
25
26
27
28
29
30
31
Datasheet (2.0)
EasyVR
www.veear.eu
Command Details
Format of 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)
[1]
Set SD level
Strictness control 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
EasyVR
Datasheet (2.0)
www.veear.eu
CMD_TIMEOUT
'o' (6Fh)
[1]
[1]
[2]
[1]
[2]
Position (0-31)
[1]
[2]
Position (0-31)
[1]
[2]
Datasheet (2.0)
EasyVR
www.veear.eu
CMD_NAME_SD
'n' (6Eh)
[1]
[2]
[3]
[4-n]
[1]
[2]
'R' (52h)
Confirmation character
10
EasyVR
Datasheet (2.0)
www.veear.eu
CMD_BAUDRATE
'a' (61h)
[1]
Datasheet (2.0)
EasyVR
11
www.veear.eu
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)
[1-8]
Count of commands
Integer (0-31)
[2]
[3]
[1]
[4-n]
Timeout expired
12
EasyVR
Datasheet (2.0)
www.veear.eu
STS_INTERR
'i' (69h)
Interrupted recognition
Memory error (no more room for commands or sound table not present)
Datasheet (2.0)
EasyVR
13
www.veear.eu
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).
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 header file protocol.h 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.
14
EasyVR
Datasheet (2.0)
www.veear.eu
# otherwise trigger recognition could never end)
result = RECEIVE
IF result = 's' THEN
# successful recognition, ack and read result
SEND ' '
command = RECEIVE 'A'
# 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
SEND ' '
error = (RECEIVE 'A') * 16
SEND ' '
error = error + (RECEIVE 'A')
# perform actions according to error
ELSE
# invalid request or reply
ERROR
END IF
Training an SD command
# repeat the whole training procedure twice for best results
Datasheet (2.0)
EasyVR
15
www.veear.eu
# train command 0 in group 3
SEND 't'
SEND 'D'
SEND 'A'
# wait for reply:
# (default timeout is 3s, wait for max 1s more then abort)
result = RECEIVE
IF 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 it
ELSE IF result = 't' THEN
# timed out, no word spoken or heard
ELSE IF result = 'e' THEN
# error code, ack and read which one
SEND ' '
error = (RECEIVE 'A') * 16
SEND ' '
error = error + (RECEIVE 'A')
# perform actions according to error
ELSE
# invalid request or reply
ERROR
END IF
16
EasyVR
Datasheet (2.0)
www.veear.eu
SEND 'D'
IF NOT RECEIVE = 'c' THEN ERROR
# ack and read count
SEND ' '
count = RECEIVE - 'A'
Datasheet (2.0)
EasyVR
17
www.veear.eu
pin_level = RECEIVE 'A'
# set IO3 pin as high impedance input (reading state is optional)
SEND 'q'
SEND 'D'
SEND 'C'
IF NOT RECEIVE = 'p' THEN ERROR
18
EasyVR
Datasheet (2.0)
www.veear.eu
English (US)
Italian
Trigger/Wordset
Command Index
robot
robot
robotto
action
azione
acution
move
vai
susu-me
turn
gira
magare
run
corri
hashire
look
guarda
miro
attack
attacca
kougeki
stop
fermo
tomare
hello
ciao
konnichiwa
left
a sinistra
hidari
right
a destra
migi
up
in alto
ue
down
in basso
shita
forward
avanti
mae
backward
indietro
ushiro
zero
zero
zero
one
uno
ichi
two
due
ni
three
tre
san
four
quattro
yon
five
cinque
go
six
sei
roku
seven
sette
nana
eight
otto
hachi
nine
nove
kyu
10
ten
dieci
jyuu
Datasheet (2.0)
EasyVR
Japanese
Rmaji
19
www.veear.eu
Language
0
English (US)
German
Spanish
French
Trigger/Wordset
Command Index
robot
roboter
robot
robot
action
aktion
accin
action
move
gehe
muvete
bouge
turn
wende
gira
tourne
run
lauf
corre
cours
look
schau
mira
regarde
attack
attacke
ataca
attaque
stop
halt
para
arrte
hello
hallo
hola
salut
left
nach links
a la izquierda
gauche
right
nach rechts
a la derecha
droite
up
hinauf
arriba
vers le haut
down
hinunter
abajo
vers le bas
forward
vorwrts
adelante
en avant
backward
rckwrts
atrs
en arrire
zero
null
cero
zro
one
eins
uno
un
two
zwei
dos
deux
three
drei
tres
trois
four
vier
cuatro
quatre
five
fnf
cinco
cinq
six
sechs
seis
six
seven
sieben
siete
sept
eight
acht
ocho
huit
nine
neun
nueve
neuf
10
ten
zehn
diez
dix
20
EasyVR
Datasheet (2.0)
www.veear.eu
Error codes
In the table below a list of some (the most useful) error codes that may be returned by training or recognition
commands.
03h
ERR_DATACOL_TOO_NOISY
too noisy
04h
ERR_DATACOL_TOO_SOFT
05h
ERR_DATACOL_TOO_LOUD
06h
ERR_DATACOL_TOO_SOON
07h
ERR_DATACOL_TOO_CHOPPY
11h
ERR_RECOG_FAIL
recognition failed
12h
ERR_RECOG_LOW_CONF
13h
ERR_RECOG_MID_CONF
14h
ERR_RECOG_BAD_TEMPLATE
17h
ERR_RECOG_DURATION
4Ah
ERR_SYNTH_BAD_VERSION
4Eh
ERR_SYNTH_BAD_MSG
80h
ERR_NOT_A_WORD
The first group of codes (03h 07h) are 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) indicate 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
TM
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.
Datasheet (2.0)
EasyVR
21
www.veear.eu
All VeeaR branded boards and software are designed and manufactured by RoboTech srl
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 use as critical components in life support devices or systems.
22
EasyVR
Datasheet (2.0)