Interface SFSpeechRecognitionTaskDelegate


  • public interface SFSpeechRecognitionTaskDelegate
    Recognition result receiver, to be used for complex or multi-utterance speech recognition requests
    • Method Detail

      • speechRecognitionDidDetectSpeech

        default void speechRecognitionDidDetectSpeech​(SFSpeechRecognitionTask task)
        Called when the task first detects speech in the source audio
      • speechRecognitionTaskDidFinishRecognition

        default void speechRecognitionTaskDidFinishRecognition​(SFSpeechRecognitionTask task,
                                                               SFSpeechRecognitionResult recognitionResult)
        Called only for final recognitions of utterances. No more about the utterance will be reported
      • speechRecognitionTaskDidFinishSuccessfully

        default void speechRecognitionTaskDidFinishSuccessfully​(SFSpeechRecognitionTask task,
                                                                boolean successfully)
        Called when recognition of all requested utterances is finished. If successfully is false, the error property of the task will contain error information
      • speechRecognitionTaskDidHypothesizeTranscription

        default void speechRecognitionTaskDidHypothesizeTranscription​(SFSpeechRecognitionTask task,
                                                                      SFTranscription transcription)
        Called for all recognitions, including non-final hypothesis
      • speechRecognitionTaskFinishedReadingAudio

        default void speechRecognitionTaskFinishedReadingAudio​(SFSpeechRecognitionTask task)
        Called when the task is no longer accepting new audio but may be finishing final processing
      • speechRecognitionTaskWasCancelled

        default void speechRecognitionTaskWasCancelled​(SFSpeechRecognitionTask task)
        Called when the task has been cancelled, either by client app, the user, or the system