AppTekSDK

Constructors

Constructor

new AppTekSDK(proxyUrl?, licenseKey?): AppTekSDK;

Parameters

ParameterTypeDefault value
proxyUrlstring"https://accessibility.apptek.com/grpc-proxy"
licenseKey?stringundefined

Returns

AppTekSDK

Accessors

isActive

Get Signature

get isActive(): boolean;

Returns true if the SDK is currently recording/streaming.

Returns

boolean


isInitialized

Get Signature

get isInitialized(): boolean;

Returns true if the SDK has been initialized with a valid license key.

Returns

boolean


status

Get Signature

get status(): string;

Returns the current status string.

Returns

string

Methods

activateRoom()

activateRoom(roomId): void;

Dynamically activates a room mid-session.

Parameters

ParameterType
roomIdstring

Returns

void


createRoom()

createRoom(): Promise<RoomResponse>;

Creates a new room.

Returns

Promise<RoomResponse>


getLanguages()

getLanguages(): Promise<Recognize2AvailableResponse>;

Returns

Promise<Recognize2AvailableResponse>


getNetworkStats()

getNetworkStats(iterations?, intervalMs?): Promise<NetworkStatsResponse>;

Measure network statistics (latency, average, jitter) over multiple pings.

Parameters

ParameterTypeDescription
iterations?numberNumber of pings to send (default: 4)
intervalMs?numberDelay between pings in milliseconds (default: 200)

Returns

Promise<NetworkStatsResponse>


getTranslateLanguages()

getTranslateLanguages(): Promise<TranslateAvailableResponse>;

Returns

Promise<TranslateAvailableResponse>


init()

init(licenseKey?): Promise<boolean>;

initializes the SDK and validates the license key.
If a key is passed, it overrides the constructor key.

Parameters

ParameterType
licenseKey?string

Returns

Promise<boolean>


listRooms()

listRooms(): Promise<RoomListResponse>;

Lists rooms associated with the license key.

Returns

Promise<RoomListResponse>


ping()

ping(): Promise<PingResponse>;

Measure network quality and round-trip latency.

Returns

Promise<PingResponse>


startFromStream()

startFromStream(
   stream, 
   config, 
   callbacks, 
options?): Promise<void>;

Starts streaming from a provided MediaStream (e.g. from a video element).

Parameters

ParameterType
streamMediaStream
configRecognize2StreamConfig
callbacksAppTekSDKCallbacks
options?{ roomId?: string; workletUrl?: string; }
options.roomId?string
options.workletUrl?string

Returns

Promise<void>


startMicrophone()

startMicrophone(
   config, 
   callbacks, 
   stream?, 
options?): Promise<void>;

Starts microphone and streaming.

Parameters

ParameterTypeDescription
configRecognize2StreamConfig-
callbacksAppTekSDKCallbacks-
stream?MediaStreamOptional MediaStream to use instead of requesting microphone access.
options?{ roomId?: string; workletUrl?: string; }Optional configuration for the microphone (e.g. workletUrl).
options.roomId?string-
options.workletUrl?string-

Returns

Promise<void>


stopMicrophone()

stopMicrophone(): void;

Stop recording.
Stops microphone but keeps socket open to receive final results.

Returns

void