A complete reference for all interface configurations, data payloads, and callback types.
| Property | Type | Description |
|---|
onAudioMetrics? | (metrics) => void | Optional callback that receives real-time audio quality metrics. |
onData | (data) => void | Called when data receives from the server. The data object contains fields like transcription, segment, translation, etc. |
onError | (err) => void | - |
onMicrophoneData? | (data) => void | Optional callback receives raw microphone input (Float32Array) for visualization. |
onStatusChange? | (status) => void | - |
| Property | Type | Description | | |
|---|
isClipping | boolean | Boolean indicating if the signal is clipping (amplitude near maximum, causing distortion) | | |
noiseFloorDb | number | Estimated background noise floor in dB FS (based on a rolling minimum of signal level) | | |
peak | number | Maximum absolute peak amplitude in the current frame (0.0 to 1.0) | | |
snrDb | number | Estimated Signal-to-Noise Ratio (SNR) in dB. High is good (e.g. >25dB), low indicates noisy speech (e.g. <15dB) | | |
status | "silent" | "normal" | "clipping" | Text representation of audio state: 'silent' | 'normal' | 'clipping' |
volume | number | Root Mean Square (RMS) volume level, normalized between 0.0 (silence) and 1.0 (max amplitude) | | |
volumeDb | number | Volume level represented in Decibels (dB FS), ranging from -100 (silence) to 0 (maximum level) | | |
| Property | Type |
|---|
licenseKey | string |
| Property | Type |
|---|
direction | number |
englishName | string |
langCode | string |
nativeName | string |
| Property | Type | Description |
|---|
mediaStream? | MediaStream | Optional MediaStream to use instead of requesting user media. Useful for processing audio from video elements or other sources. |
onAudioMetrics? | (metrics) => void | Optional callback that receives real-time audio quality metrics. |
onData | (data) => void | Callback function that receives chunks of Int16 PCM audio data. |
onMicrophoneData? | (data) => void | Optional callback for raw microphone data (Float32Array), useful for visualization. |
sampleRate? | number | Desired sample rate (default 16000). |
workletUrl? | string | Optional URL to load the AudioWorklet processor from. If not provided, an inline Blob will be used. Use this if your Content Security Policy (CSP) blocks 'blob:' workers. You will need to serve the processor code (available as 'dist/pcm-processor.js' in the package) yourself. |
| Property | Type |
|---|
pings | object[] |
rttAvg | number |
rttJitter | number |
rttMax | number |
rttMin | number |
| Property | Type |
|---|
rtt | number |
serverTime | number |
serverTimeOffset | number |
| Property | Type |
|---|
channels | number |
sampleRateHz | number |
sampleType | 0 | "INT16" | "FLOAT32" | 1 |
| Property | Type |
|---|
speakerId | string |
speakerName? | string |
| Property | Type |
|---|
orth | string |
postprocessed | string |
speaker | string |
startTimeMs | number |
stopTimeMs | number |
translation | string |
| Property | Type |
|---|
enable | boolean |
| Property | Type |
|---|
timestamp | string |
| Property | Type |
|---|
sentenceEndTokenThreshold? | number |
| Property | Type |
|---|
domain? | string |
langCode | string |
| Property | Type |
|---|
confidence | number |
langCode? | string |
start? | string |
stop? | string |
text | string |
| Property | Type |
|---|
domain? | string |
langCode? | string |
start? | string |
stop? | string |
text | string |
| Property | Type |
|---|
diarization | boolean |
domain | string |
language | Language |
mtTargetLanguages | Language[] |
sampleRateHz | number |
Status message from the server confirming a room has been activated for broadcasting.
| Property | Type |
|---|
room_id | string |
status | "room_activated" |
Message sent to the server to dynamically create/activate a room mid-session.
| Property | Type | Description |
|---|
action | "create_room" | - |
room_id | string | The ID of the room to activate/broadcast to. |
Response returned when listing rooms associated with a license key.
| Property | Type | Description |
|---|
rooms | string[] | An array of active room IDs. |
Response returned when a new room is created.
| Property | Type | Description |
|---|
room_id | string | The unique identifier for the created room. |
| Property | Type |
|---|
computeConfidence | boolean |
domain | string |
extendedContext | boolean |
formats | number[] |
genderCodes | string[] |
genreCodes | string[] |
glossary | boolean |
lengthCodes | string[] |
sourceLanguage | Language |
styleCodes | string[] |
targetLanguage | Language |
topicCodes | string[] |
| Property | Type |
|---|
enableNumberTagging | boolean |
glossaryId | string |
| Property | Type |
|---|
genderCode? | string |
genreCode? | string |
lengthCode? | string |
styleCode? | string |
topicCode? | string |