• If you need help or want to discuss things, you now can also join us on our Discord Server!

Trying to use speech recognition

Rilvanoman

#stayinghome
Hey, I'm attempting to use the speech recognition implementation but it doesn't seem to do anything.
I'm using the default script provided in the tutorial and I've restarted the whole thing using "systemctl restart sinusbot" multiple times.
Bot Version: 1.0.0-beta.10-202ee4d
TS3 Version: 3.5.3 [Stable] Linux

SinusBot folder:

1591460411287.png
Script:
JavaScript:
registerPlugin({
    name: 'Speech Recognition Demo',
    version: '1.0',
    description: 'This is a simple script that will stop playback when you say "stop"',
    author: 'Michael Friese <[email protected]>',
    vars: [],
    voiceCommands: ['stop']
}, function (sinusbot, config) {
    var event = require('event');
    var engine = require('engine');
    var audio = require('audio');
    var media = require('media');

    audio.setAudioReturnChannel(2);

    event.on('speech', function (ev) {
        if (ev.text == 'stop') {
            engine.log('Stopping playback on behalf of client ' + ev.client.nick());
            media.stop();
        } else {
            engine.log(ev.client.nick() + ' just said ' + ev.text);
        }
    });
});

Config.ini:
Code:
[SpeechRecognition]
  Enable = true
 
Last edited:

Similar threads

Top