SofyaTranscriber
The main class for handling transcription operations.
Constructor
new SofyaTranscriber(connection: Connection)
Creates a new instance of the transcription service with a connection object.
Methods
-
startTranscription(mediaStream: MediaStream): void Starts the transcription process with a given
MediaStream. -
stopTranscription(): Promise< void > Stops the transcription process asynchronously. Returns a Promise that resolves when cleanup is complete. You must use
awaitor.then(). -
pauseTranscription(): void Pauses the transcription process.
-
resumeTranscription(): void Resumes the transcription process.
-
on(event: string, callback: Function): this Registers an event handler for transcription events.
Events
The SDK emits the following events:
recognizing: Fired when transcription is in progress.recognized: Fired when transcription is complete.error: Fired when an error occurs.ready: Fired when the transcription service is ready to start.stopped: Fired when the transcription process is stopped.connected: Fired when the transcription service is connected to the provider.