Websocket
WebSocket Requests
All supported requests on Speaker.bot's WebSocket API
All WebSocket Server
requests, outlined below, support the base Request Format parameters.
General
Speak
Speak the given message with the provided voice alias.
Example
{
"id": "<id>",
"request": "Speak",
"voice": "EventVoice",
"message": "This is a test message",
"badWordFilter": true
}
Stop
If TTS is currently speaking, stop only the current speech.
Example
{
"id": "<id>",
"request": "Stop"
}
Enable
Enable the TTS engine (if it has been disabled)
Example
{
"id": "<id>",
"request": "Enable"
}
Disable
Disable the TTS engine
Example
{
"id": "<id>",
"request": "Disable"
}
Events
Enable or disable events being spoken.
Example
{
"id": "<id>",
"request": "Events",
"state": "[on|off]",
}
Mode
Toggle the current speaking mode.
If no commands are configured in your Speaker.bot instance, setting mode to
command
will return a failure response.Example
{
"id": "<id>",
"request": "Mode",
"mode": "[all|command]"
}
Queue
Pause
Pause the TTS event queue
Example
{
"id": "<id>",
"request": "Pause"
}
Resume
Resume the TTS event queue
Example
{
"id": "<id>",
"request": "Resume"
}
Clear
Clear all pending events in the TTS event queue.
Example
{
"id": "<id>",
"request": "Clear"
}