OSSSpeechDelegate
public protocol OSSSpeechDelegate : AnyObject
Delegate to handle events such as failed authentication for microphone among many more.
-
When the microphone has finished accepting audio, this delegate will be called with the final best text output.
Declaration
Swift
func didFinishListening(withText text: String)
-
Handle returning authentication status to user - primary use is for non-authorized state.
Declaration
Swift
func authorizationToMicrophone(withAuthentication type: OSSSpeechKitAuthorizationStatus)
-
If the speech recogniser and request fail to set up, this method will be called.
Declaration
Swift
func didFailToCommenceSpeechRecording()
-
Method for real time recpetion of translated text.
Declaration
Swift
func didCompleteTranslation(withText text: String)
-
Error handling function.
Declaration
Swift
func didFailToProcessRequest(withError error: Error?)