Executes the speech recognition request and delivers the results to the specified handler block.
- iOS 10.0+
- macOS 10.15+Beta
- Mac Catalyst 13.0+Beta
A request (in an
SFSpeechobject) to recognize speech from an audio source.
The block to call when partial or final results are available, or when an error occurs. If the
Report Partial Results
true, this block may be called multiple times to deliver the partial and final results. The block has no return value and takes the following parameters:
SFSpeechcontaining the partial or final transcriptions of the audio content.
An error object if a problem occurred. This parameter is
nilif speech recognition was successful.
The task object you can use to manage an in-progress recognition request.
Use this method to initiate the speech recognition process on the audio contained in the request object. This method executes asynchronously and returns a
SFSpeech object that you can use to cancel or finalize the recognition process later. As results become available, the method calls the block in the