SpeechKITT icon indicating copy to clipboard operation
SpeechKITT copied to clipboard

displayRecognizedSentence not available?

Open wuwa opened this issue 8 years ago • 2 comments

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();

wuwa avatar Jan 03 '17 08:01 wuwa

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 avatar Feb 06 '17 17:02 atyachin

@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();
  

`

mohd7469 avatar Mar 03 '18 11:03 mohd7469