• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

Solved Speech-Recognition

Status
Not open for further replies.

davekov5

Member
Hello! I have a problem! I tried to make a Speech recognition script wit this https://forum.sinusbot.com/threads/using-speech-recognition.1693/ tutorial. And this is not working what can I do? I running sinusbot on Linux, Ubuntu 14.04.5 LTS

TS3Path = "/opt/sinusbot/teamspeak3-client/ts3client_linux_amd64"
ListenHost = "0.0.0.0"
DataDir = "/opt/sinusbot/data/"
ListenPort = 8087
LocalPlayback = false
EnableLocalFS = false
MaxBulkOperations = 300
LogLevel = 3
EnableProfiler = false
YoutubeDLPath = "/usr/local/bin/youtube-dl"
EnableDebugConsole = false
UploadLimit = 83886080
RunAsUser = 0
RunAsGroup = 0
InstanceActionLimit = 6
UseSSL = false
SSLKeyFile = ""
SSLCertFile = ""
Hostname = ""
SampleInterval = 60
StartVNC = false
EnableWebStream = false
LogFile = ""
LicenseKey = "M3AYlJspxQDPcOQ4JQ+8dhBucjCk2hcrvtcAnSVuwnw="
IsProxied = false
DenyStreamURLs = []
Pragma = 0

[YoutubeDL]
BufferSize = 524288
MaxDownloadSize = 419430400
MaxDownloadRate = 104857600
CacheStreamed = false

[TS3]
AvatarMaxWidth = 0
AvatarMaxHeight = 0
AllowGIF = false

[StreamRewrites]

[Scripts]
AllowReload = false
EnableTimer = false
DisableLegacyEvents = false
ScriptTimeout = 5

[Themes]
Default = ""

[SpeechRecognition]
Enable = true

[FFmpeg]
UserAgent = "SinusBot (0.9.20-a9b8dc6)"

[DAV]
Enable = false

[XServer]
Delay = 0
Debug = false

[SHMem]
Enable = false
Size = 0
Delay = 0
Interval = 0

[RadioStations]
URL = ""
UpdateInterval = 0


Code:
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) {
    sinusbot.setARC(2); // Enable audio return channel
    sinusbot.on('speech', function(ev) {
        if (ev.text == 'stop') {
            sinusbot.log('Stopping playback on behalf of client ' + ev.clientId);
            sinusbot.stop();
        } else {
            sinusbot.log('Client ' + clientId + ' just said ' + ev.text);
        }
    });
});
 
Status
Not open for further replies.
Top