STT quickstart
In this quickstart, you will stream a short PCM audio sample over WebSocket and print its final transcript.
1. Create an API key
Create a key in API Keys and copy it when it is shown. Store it in your server environment:
Keys are server-side credentials. The authentication guide covers key management and browser applications.
2. Download the sample audio
The example expects raw 16 kHz, mono PCM16 audio. Download this sample saying “Hello, welcome to Nari Labs.”
Download hello.pcm3. Install the WebSocket client
4. Create the transcription script
Save the following code as transcribe.py in the same folder as hello.pcm:
5. Run the script
Run the script using the API key you exported in step 1:
The final output should resemble:
Partial results may appear first; wording and punctuation can vary.
Why this model
Qwen3-ASR is best suited to streaming transcription applications where low time-to-final-segment (TTFS) matters.
Next steps
- Use the realtime transcription guide to configure sessions, handle WebSocket events, and stream longer audio.
- Learn how transcripts and turn detection handle partial results, manual commit, and VAD.