Interfaces

Interfaces & Data Models

A complete reference for all interface configurations, data payloads, and callback types.

Quick Index


AppTekSDKCallbacks

Properties

PropertyTypeDescription
onAudioMetrics?(metrics) => voidOptional callback that receives real-time audio quality metrics.
onData(data) => voidCalled when data receives from the server. The data object contains fields like transcription, segment, translation, etc.
onError(err) => void-
onMicrophoneData?(data) => voidOptional callback receives raw microphone input (Float32Array) for visualization.
onStatusChange?(status) => void-

AudioMetrics

Properties

PropertyTypeDescription
isClippingbooleanBoolean indicating if the signal is clipping (amplitude near maximum, causing distortion)
noiseFloorDbnumberEstimated background noise floor in dB FS (based on a rolling minimum of signal level)
peaknumberMaximum absolute peak amplitude in the current frame (0.0 to 1.0)
snrDbnumberEstimated 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'
volumenumberRoot Mean Square (RMS) volume level, normalized between 0.0 (silence) and 1.0 (max amplitude)
volumeDbnumberVolume level represented in Decibels (dB FS), ranging from -100 (silence) to 0 (maximum level)

ClientAuth

Properties

PropertyType
licenseKeystring

Language

Properties

PropertyType
directionnumber
englishNamestring
langCodestring
nativeNamestring

MicrophoneConfig

Properties

PropertyTypeDescription
mediaStream?MediaStreamOptional MediaStream to use instead of requesting user media. Useful for processing audio from video elements or other sources.
onAudioMetrics?(metrics) => voidOptional callback that receives real-time audio quality metrics.
onData(data) => voidCallback function that receives chunks of Int16 PCM audio data.
onMicrophoneData?(data) => voidOptional callback for raw microphone data (Float32Array), useful for visualization.
sampleRate?numberDesired sample rate (default 16000).
workletUrl?stringOptional 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.

NetworkStatsResponse

Properties

PropertyType
pingsobject[]
rttAvgnumber
rttJitternumber
rttMaxnumber
rttMinnumber

PingResponse

Properties

PropertyType
rttnumber
serverTimenumber
serverTimeOffsetnumber

Recognize2AudioConfig

Properties

PropertyType
channelsnumber
sampleRateHznumber
sampleType0 | "INT16" | "FLOAT32" | 1

Recognize2AvailableResponse

Properties

PropertyType
listRecognizeAvailable[]

Recognize2DiarizationInformation

Properties

PropertyType
speakerIdstring
speakerName?string

Recognize2DiarizationSpeakerSection

Properties

PropertyType
orthstring
postprocessedstring
speakerstring
startTimeMsnumber
stopTimeMsnumber
translationstring

Recognize2DiarizerConfig

Properties

PropertyType
enableboolean

Recognize2PCTranscription

Properties

PropertyType
isAttachedLeftboolean
isSentenceEndboolean
stableTranscription?Recognize2TimedTranscription
textstring

Recognize2Progress

Properties

PropertyType
timestampstring

Recognize2Segment

Properties

PropertyType
diarizerInfo?Recognize2DiarizationInformation
start?string
stop?string
textstring
timedTranscriptions?Recognize2TimedTranscription[]

Recognize2SegmenterConfig

Properties

PropertyType
sentenceEndTokenThreshold?number

Recognize2SpeechConfig

Properties

PropertyType
domain?string
langCodestring

Recognize2StreamConfig

Properties

PropertyTypeDescription
audioConfigurationRecognize2AudioConfig-
diarizerConfiguration?Recognize2DiarizerConfig-
room_id?stringOptional Room ID to broadcast transcriptions to.
segmenterConfiguration?Recognize2SegmenterConfig-
speechConfigurationRecognize2SpeechConfig-
translateConfigurations?Recognize2TranslateConfig[]-

Recognize2StreamResponse

Properties

PropertyType
pcTranscription?Recognize2PCTranscription
progress?Recognize2Progress
segment?Recognize2Segment
transcription?Recognize2Transcription
translation?Recognize2Translation

Recognize2TimedTranscription

Properties

PropertyType
confidencenumber
langCode?string
start?string
stop?string
textstring

Recognize2Transcription

Properties

PropertyType
stableTranscriptions?Recognize2TimedTranscription[]
unstableTranscriptions?Recognize2TimedTranscription[]

Recognize2TranslateConfig

Properties

PropertyType
domainstring
glossaryOptions?TranslateGlossaryOptions
metaOptions?TranslateTextMetaOptions
targetLangCodestring

Recognize2Translation

Properties

PropertyType
domain?string
langCode?string
start?string
stop?string
textstring

RecognizeAvailable

Properties

PropertyType
diarizationboolean
domainstring
languageLanguage
mtTargetLanguagesLanguage[]
sampleRateHznumber

RoomActivatedStatus

Status message from the server confirming a room has been activated for broadcasting.

Properties

PropertyType
room_idstring
status"room_activated"

RoomActivationMessage

Message sent to the server to dynamically create/activate a room mid-session.

Properties

PropertyTypeDescription
action"create_room"-
room_idstringThe ID of the room to activate/broadcast to.

RoomListResponse

Response returned when listing rooms associated with a license key.

Properties

PropertyTypeDescription
roomsstring[]An array of active room IDs.

RoomResponse

Response returned when a new room is created.

Properties

PropertyTypeDescription
room_idstringThe unique identifier for the created room.

TranslateAvailable

Properties

PropertyType
computeConfidenceboolean
domainstring
extendedContextboolean
formatsnumber[]
genderCodesstring[]
genreCodesstring[]
glossaryboolean
lengthCodesstring[]
sourceLanguageLanguage
styleCodesstring[]
targetLanguageLanguage
topicCodesstring[]

TranslateAvailableResponse

Properties

PropertyType
listTranslateAvailable[]

TranslateGlossaryOptions

Properties

PropertyType
enableNumberTaggingboolean
glossaryIdstring

TranslateTextMetaOptions

Properties

PropertyType
genderCode?string
genreCode?string
lengthCode?string
styleCode?string
topicCode?string