Skip to content

TMSFMXNativeSpeechRecognition

Usage

With TMSFMXNativeSpeechRecognition you can transcribe captured audio and recordings to written text.

Published Properties

Property name Description
StopAfterPause Stop recording after a pause is detected.
RestartAfterPause Restart the transcription after a pause is detected.
PauseInterval The interval in ms to trigger when no changes are in the result.
ContextualStrings List of strings that are uncommon but should be tried to match in the text.
RetrievePartialResults If false will only trigger the result event when the task is finished or recording stopped.
Locale String which indicates the locale to transcribe the speech or audio file.

Public Properties

Property name Description
AudioEngine The internal AVAudioEngine.
InputNode The internal AVAudioEngine input node.
IsRecording Indicates if the microphone is currently recording.
IsTranscribing Indicates if the speech recognizer is currently transcribing.
MicRequest The internal SFSpeechAudioBufferRecognitionRequest connected to the SpeechRecognizer.
PermissionStatus Indicates if the speech recognition is authorized, after the RecognitionPermissionRequest method.
RequiresOnDeviceRecognition A Boolean value that determines whether a request must keep its audio data on the device if supported.
SpeechRecognizer The internal SFSpeechRecognizer.
SpeechRecognizerAvailable A Boolean value that indicates whether the speech recognizer is currently available.
SupportedLocales List of the different language settings that are supported on the device.

Public Methods

Methods name Description
FinishRequest Finishes the request to transcribe an audio file.
RecognitionPermissionRequest Asks the first time for the user’s permission to perform speech recognition using Apple’s servers.
StopRecording Stops the recording via the microphone.
TranscribeFromFile(APath: string) Starts the request to transcribe an audio file.
TranscribeFromMicrophone Starts the recording of the microphone and transcribes the input.

Published Events

Events name Description
OnPermissionResult Event called when the permission request is handled.
OnTranscribeFileResult Event called when a transcription is ready of the audio file.
OnTranscribeMicrophoneResult Event called when a transcription is ready of microphone recording.
OnTranscribeError Event called when an error is thrown.
OnTranscribeFileStarted Event called when a transcription of an audio file is started.
OnTranscribeMicrophoneStarted Event called when a transcription of a microphone recording is started.
OnTranscribePause Event called when a pause is detected in the microphone recording.