UNPKG

@soniox/speech-to-text-web

Version:

Javascript client library for Soniox Speech-to-Text websocket API

13 lines (12 loc) 936 B
declare const recorderStates: readonly ["Init", "RequestingMedia", "OpeningWebSocket", "Running", "FinishingProcessing", "Finished", "Error", "Canceled"]; export type RecorderState = (typeof recorderStates)[number]; declare const inactiveStates: readonly ["Init", "Finished", "Error", "Canceled"]; type InactiveState = (typeof inactiveStates)[number]; declare const activeStates: readonly ["RequestingMedia", "OpeningWebSocket", "Running", "FinishingProcessing"]; type ActiveState = (typeof activeStates)[number]; declare const websocketStates: readonly ["OpeningWebSocket", "Running", "FinishingProcessing"]; type WebSocketState = (typeof websocketStates)[number]; export declare function isInactiveState(state: RecorderState): state is InactiveState; export declare function isActiveState(state: RecorderState): state is ActiveState; export declare function isWebSocketState(state: RecorderState): state is WebSocketState; export {};