Interface SFSpeechRecognitionTaskDelegate


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

      • speechRecognitionDidDetectSpeech

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

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

        default void speechRecognitionTaskDidFinishSuccessfully​(@NotNull
                                                                @NotNull 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​(@NotNull
                                                                      @NotNull SFSpeechRecognitionTask task,
                                                                      @NotNull
                                                                      @NotNull SFTranscription transcription)
        Called for all recognitions, including non-final hypothesis
      • speechRecognitionTaskFinishedReadingAudio

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

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