SpeechKITT
SpeechKITT copied to clipboard
displayRecognizedSentence not available?
thanks for the great projects, having this error when trying to show what was recognized: Uncaught TypeError: SpeechKITT.displayRecognizedSentence is not a function
this is my code:
SpeechKITT.annyang(); SpeechKITT.setStylesheet('//cdnjs.cloudflare.com/ajax/libs/SpeechKITT/0.3.0/themes/flat.css'); SpeechKITT.setInstructionsText('Some commands to try…'); SpeechKITT.setSampleCommands(['Show directions', 'Call restaurant']); SpeechKITT.displayRecognizedSentence(true); SpeechKITT.vroom();
Had the same issue. Solved by including the latest speechkitt.min.js from Github instead the one in cloudflare.com, which seems to be outdated..
@atyachin never work for me ... what should i do now? please help
`
var commands = {
'hello': function() { alert('Hello world!'); }
};
// Add our commands to annyang
annyang.addCommands(commands);
// Tell KITT to use annyang
SpeechKITT.annyang();
// Stylesheet for KITT to use
SpeechKITT.setStylesheet('https://cdnjs.cloudflare.com/ajax/libs/SpeechKITT/1.0.0/themes/flat.css');
SpeechKITT.setInstructionsText('Some commands to try…');
SpeechKITT.setSampleCommands(['say Hello, Ok google etc..']);
SpeechKITT.displayRecognizedSentence(true);
// When start
SpeechKITT.setStartCommand(function() {
console.info('Speech Recognition Started ______________________________');
annyang.start();
});
// When abort
SpeechKITT.setAbortCommand(function() {
console.info('Stopping ............................');
annyang.abort();
});
// Render KITT's interface
SpeechKITT.vroom();
`