ER1 User Guide 10-9
Play Command
Play Command
The play command allows the robot to play sounds.
Like the move command, the API's response comes before the sound has completed
playing and playing another sound interrupts the previous sound. The
events command is
used to determine when the command completes. There are two forms to the play
command:
Play File
Format:
play file <file_name>
Parameters
<file_name> is the name of the file to play.
The file must exist on the robot's system at the specified path. Quotes (single or
double) are required if there are spaces in the name of the file.
Examples:
play file sounds\Laugh.wav
play file "c:\mp3\Linkin Park\Hybrid Theory\In The End.mp3"
Play Phrase
Format:
play phrase <phrase to speak> {voice <voice name>}
Parameters
<phrase to speak> is what you want the robot to say. Quotes are required if there
are spaces in it.
You can also specify a voice for this particular phrase. The name of the voice is assigned
by the system (e.g. "Microsoft Sam"). If the voice is not found, there is no error
indication, and the phrase is played using the system default. Quotes are required if there
are spaces in the voice name.
Examples:
play phrase Hello voice "Microsoft Mary"
play phrase 'You have mail.'
Position Command
Position
Format
postion
This returns the robot’s current x,y position (relative to the position where the robot
started) and rotation angle.