SpeechToText.Command{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "SpeechToTextEvent",
"type": "object",
"additionalProperties": false,
"properties": {
"text": {
"type": [
"null",
"string"
]
},
"confidence": {
"type": "number",
"format": "float"
},
"alternatives": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AlternativePhrase"
}
}
},
"definitions": {
"AlternativePhrase": {
"type": "object",
"additionalProperties": false,
"properties": {
"text": {
"type": [
"null",
"string"
]
},
"confidence": {
"type": "number",
"format": "float"
}
}
}
}
}
{
"alternatives": [
{
"confidence": 8076848.230395898,
"text": null
},
{
"confidence": -96572473.14445178,
"text": null
},
{
"confidence": 12918629.95051907,
"text": "esse sed non"
},
{
"confidence": 67901526.26971805,
"text": null
},
{
"confidence": 34736422.166341454,
"text": "velit cupidatat dolore eu veniam"
}
],
"confidence": 33416615.0958606,
"text": "exercitation pariatur in"
}
// Initialize the Streamer.bot WebSocket Client
const client = new StreamerbotClient();
// Subscribe to "SpeechToText.Command" events and register a callback
client.on('SpeechToText.Command', ({ event, data }) => {
// Code here will run every time the event is received!
console.log('Received event:', event.source, event.type);
console.log('Event data:', data);
});