Udp

UDP Requests

All supported requests on Speaker.bot's UDP interface

General

Speak

Speak the given message with the provided voice alias.

Example
{
  "command": "speak",
  "id": "<id>",
  "voice": "<voice alias>",
  "message": "<message>"
}

Stop

If TTS is currently speaking, stop only the current speech.

Example
{
  "command": "stop"
}

Enable

Enable the TTS engine (if it has been disabled)

Example
{
  "command": "enable"
}

The on command provides the same functionality as enable

Example
{
  "command": "on"
}

Disable

Disable the TTS engine

Example
{
  "command": "disable"
}

The off command provides the same functionality as disable

Example
{
  "command": "off"
}

Select Profile

Switch to the requested profile.

To deselect any profile, you can pass none as the profile name.

Example
{
  "command": "profile",
  "profile": "<profile name>"
}

Queue

Pause

Pause the TTS event queue

Example
{
  "command": "pause"
}

Resume

Resume the TTS event queue

Example
{
  "command": "resume"
}

Clear

Clear all pending events in the TTS event queue.

Example
{
  "command": "clear"
}

Events

On

Enable TTS for incoming events.

Equivalent to selecting the Enable checkbox in the Speaker.bot application for a respective event.

Example
{
  "command": "events",
  "value": "<event name>",
  "state": "on"
}

Off

Disable TTS for incoming events.

Equivalent to deselecting the Enable checkbox in the Speaker.bot application for a respective event.

Example
{
  "command": "events",
  "value": "<event name>",
  "state": "off"
}

Users

Add Regular

Add a user to the regular users group.

Example
{
  "command": "reg",
  "mode": "add",
  "user": "%user%",
  "id": "%userId%"
}

Remove Regular

Remove a user from the regular users group.

Example
{
  "command": "reg",
  "mode": "del",
  "user": "%user%",
  "id": "%userId%"
}

Set Nickname

Set the nickname of a user.

Example
{
  "command": "set",
  "method": "nickname",
  "username": "%user%",
  "nickname": "<new nickname>"
}

Assign Last Voice

Set the last random voice to be a user's permanent voice.

An alias is created for the user with the assigned voice and settings applied to it.

Example
{
  "command": "assign",
  "method": "last",
  "username": "%user%"

Toggle Sticky Voice

When sticky mode is enabled, the first voice a user receieves will be "stuck" to them until it is reset.

Enable sticky mode by passing true

Example
{
  "command": "set",
  "method": "sticky",
  "value": true
}

Disable sticky mode by passing false

Example
{
  "command": "set",
  "method": "sticky",
  "value": false
}