cancel()
Cancels the current speech recognition task.
Declaration
func cancel()Discussion
You can cancel recognition tasks for both prerecorded and live audio input. For example, you might cancel a task in response to a user action or because the recording was interrupted.
When canceling a task, be sure to release any resources associated with the task, such as the audio input resources you are using to capture audio samples.