Live transcribe

Beside transcribe audio with batch that will transcribe asynchronously, we also provide user ability to transcribe in realtime using websocket

To transcribe from an audio file, create a websocket connection to the following URL

wss://gateway.speechlab.sg/client/ws/speech?accessToken=<your_token>&model=<language_model_code>

If your connection is successful, you'll receive a message with payload:

{"status": 200, message: "ready"}

The payload is in string and you can parse it to JSON

You should only start sending audio data after receiving the above ready message

Below are list of language models you can pass in the connection string:

Name

Language model code

English Telephony

eng_telephony

Mandarin Telephony

mandarin_telephony

Code Switch Telephony

cs_telephony

Code Switch Closetalk

cs_closetalk

English Closetalk

eng_closetalk

Mandarin Closetalk

mandarin_closetalk

Malay Closetalk

malay_closetalk

English Malay Closetalk

engmalay_closetalk

Call center

call_center

Triage 1

triage1

Triage 2 (small triage)

triage2

SCDF Call center

scdf_call_center

Example

A working example using Python 3 is here

Last updated