Package 

Class SpeechStreamService


  • 
    public class SpeechStreamService
    
                        

    Service that recognizes stream audio in a thread, passes it to a recognizer and emits recognition results. Recognition events are passed to a client using RecognitionListener

    • Method Summary

      Modifier and Type Method Description
      boolean start(RecognitionListener listener) Starts recognition.
      boolean start(RecognitionListener listener, int timeout) Starts recognition.
      boolean stop() Stops recognition.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpeechStreamService

        SpeechStreamService(Recognizer recognizer, InputStream inputStream, float sampleRate)
        Creates speech service.
    • Method Detail

      • start

         boolean start(RecognitionListener listener, int timeout)

        Starts recognition. After specified timeout listening stops and theendOfSpeech signals about that. Does nothing if recognition is active.

        timeout - timeout in milliseconds to listen.

      • stop

         boolean stop()

        Stops recognition. All listeners should receive final result if there isany. Does nothing if recognition is not active.