Commands
Command System
A command system is required to send commands to the vocalizer. The following systems are supported:
Kyber Control System — Support coming soon. Mention Human-Cyborg Relations when purchasing and the Kyber team will generously donate $10 to FIRST Robotics.
DIY — Build your own control system. As a starting point, see the C++ command API developed by Alec Muir.
Commands
Commands can be sent over Serial, UART, or I2C. All commands must be wrapped in a container: <...>
To send multiple commands at once, include them within a single container separated by commas: <...,...>
...or chain multiple containers in a single string: <...><...>
Stimuli
SH0
Trigger mild happy vocalization
SH1
Trigger extreme happy vocalization
SS0
Trigger mild sad vocalization
SS1
Trigger extreme sad vocalization
SM0
Trigger mild angry vocalization
SM1
Trigger extreme angry vocalization
SC0
Trigger mild scared vocalization
SC1
Trigger extreme scared vocalization
SE
Muse
M1
M0
MT
MM
Trigger single musing
MN#
Set minimum gap (seconds) between musings
MX#
Set maximum gap (seconds) between musings
SD WAV
CA####
CB####
CA####C####
CB####C####
Stop
PSV
Stop vocalizer immediately
PSG
Stop vocalizer gracefully (will continue to play until next phoneme on which it is gramatically correct to end a sentence)
PSA
Stop WAV channel A immediately
PSB
Stop WAV channel B immediately
Volume
PVV#
Set vocalizer volume 0
-100
(†)
PVA#
Set WAV channel A volume 0
-100
(†)
PVB#
Set WAV channel B volume 0
-100
(†)
Override
OA0
OA1
O1
O0
OR
OH#
OS#
OM#
OC#
Record
---
RRP#
RRS#
R0
R1
Query
QEH
<QEH,#>
QES
<QES,#>
QEM
<QEM,#>
QEC
<QEC,#>
QE
<QE,#,#,#,#>
QO
<QO,#>
QM
<QM,#>
QF
<QF,#>
QT
<QT,#>
Returns a float representing the total original duration of the currently playing vocalization, or 0
if no vocalization is currently playing
QPV
<QPV,#>
Returns 0
if the vocalizer is not currently vocalizing, or 1
if it is
QPA
<QPA,#>
QPB
<QPB,#>
QVV
<QVV,#>
Returns an integer from 0
-100
representing the vocalizer volume
QVA
<QVA,#>
Returns an integer from 0
-100
representing WAV channel A volume
QVB
<QVB,#>
Returns an integer from 0
-100
representing WAV channel B volume
QD
<QD,#,...,#>
Returns key metrics. Comma separated list with the results of these commands: QEH,QES,QEM,QEC,QO,QM,QF,QT,QPV,QPA,QPB
(*) = Persistently stored in R2D2Vocalizer.txt
(†) = Persistently stored in Config.txt
Command Examples
<SH1>
— Trigger extreme happy vocalization.
<CA0025>
— Play SD WAV file number 0025 on WAV channel A.
<CB0003C0185>
— Play random SD WAV File between file number 0003 and file number 0185 on WAV channel B.
<QEH>
— Query Happy emotion. Receive: <QEH,12>
<QE>
— Query all emotions. Receive: <QE,4,28,100,68>
Multiple commands can be chained:
<SH1,M1>
— Trigger extreme happy vocalization and enable muse.
<SH1><M1>
— Alternate syntax for same command as above.
<SM0,QM>
— Trigger mild angry vocalization and query muse state. Receive: <QM0>
Last updated