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": 67338920.38657835,
"text": "culpa nisi"
},
{
"confidence": -1280990.339784965,
"text": "officia"
},
{
"confidence": 18574999.55867219,
"text": "reprehenderit culpa proident labore"
},
{
"confidence": -74460509.52977084,
"text": "Excepteur do ullamco"
},
{
"confidence": 92099371.84229347,
"text": null
}
],
"confidence": -92236145.12878528,
"text": null
}
// 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);
});