SpeechConverterOnline
Defined in: SpeechConverterOnline.ts:5
Implements
Constructors
Constructor
new SpeechConverterOnline(domainName, useSeparation): SpeechConverterOnline;
Defined in: SpeechConverterOnline.ts:23
updates the url to point to the correct backend on initialization
Parameters
| Parameter | Type | Default value |
|---|---|---|
|
|
|
|
|
|
Returns
SpeechConverterOnline
Methods
getStatus()
getStatus(): string;
Defined in: SpeechConverterOnline.ts:164
Is not implemented for this implementation of SpeechConverter
Returns
string
Throws
Method not implemented
Implementation of
SpeechConverterInterface.getStatus
getTextLog()
getTextLog(): string[];
Defined in: SpeechConverterOnline.ts:231
takes the array of objects that hold the transcribed logs and converts it into a string of the following format Timestamp: Transcribed text
Returns
string[]
Returns an array of transcribed logs
Implementation of
SpeechConverterInterface.getTextLog
getTranscribed()
getTranscribed(): string;
Defined in: SpeechConverterOnline.ts:154
Retrieves the latest transcription result from the Whisper model and logs it.
This method calls the underlying Whisper API to obtain the most recently transcribed text. If any text has been returned from whisper, it logs it.
Returns
string
- The transcribed text from the current audio chunk.
Implementation of
SpeechConverterInterface.getTranscribed
getUseSeparation()
getUseSeparation(): boolean;
Defined in: SpeechConverterOnline.ts:37
Get whether speaker separation is enabled
Returns
boolean
true if using separation endpoint
init()
init(modelPath, lang): Promise`<void>`;
Defined in: SpeechConverterOnline.ts:46
Is not implemented for this version, throws an error if called
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
Returns
Promise<void>
Implementation of
startListening()
startListening(): void;
Defined in: SpeechConverterOnline.ts:63
Starts listening to the user's microphone input, collects audio chunks, and feeds them into the backend for transcription in real time.
The method continuously gathers small chunks from AudioInputHandler,
combines them into fixed-size blocks and sends them to the model for inference.
Returns
void
Throws
Throws if fetch status is not 200
Throws
Throws if Promise fails to resolve
Implementation of
SpeechConverterInterface.startListening
stopListening()
stopListening(): void;
Defined in: SpeechConverterOnline.ts:142
Stops the audio input stream and halts the real-time transcription process.
This should be called after startListening() to stop capturing microphone input
and free up system audio resources.
Returns
void