Create a new RealtimeTranscriber.
Parameters to configure the RealtimeTranscriber
Close the connection to the server.
If true, the method will wait for the session to be terminated before closing the connection. While waiting for the session to be terminated, you will receive the final transcript and session information.
Configure the threshold for how long to wait before ending an utterance. Default is 700ms.
The duration of the end utterance silence threshold in milliseconds. This value must be an integer between 0 and 20_000.
Connect to the server and begin a new session.
A promise that resolves when the connection is established and the session begins.
Listen for the open event which is emitted when the connection is established and the session begins.
The open event.
The function to call when the event is emitted.
Listen for the transcript event which is emitted when a partian or final transcript is received.
The transcript event.
The function to call when the event is emitted.
Listen for the partial transcript event which is emitted when a partial transcript is received.
The partial transcript event.
The function to call when the event is emitted.
Listen for the final transcript event which is emitted when a final transcript is received.
The final transcript event.
The function to call when the event is emitted.
Listen for the session information event which is emitted when session information is received. The session information is sent right before the session is terminated.
The session information event.
The function to call when the event is emitted.
Listen for the error event which is emitted when an error occurs.
The error event.
The function to call when the event is emitted.
Listen for the close event which is emitted when the connection is closed.
The close event.
The function to call when the event is emitted.
Deprecated
Use RealtimeTranscriber instead