Client-VAD speech segments
Use [Segment Transcription](/docs/api-reference/segment-transcription) when your application already knows where speech starts and ends.
When to use Segment
| Use Segment | Use something else |
|---|---|
| You run VAD locally and upload one clip per utterance | Continuous mic stream → [Realtime WS](/docs/realtime) |
| You need a synchronous transcript in ~1s | Long file at a URL → [Batch jobs](/docs/recorded/transcribe-audio) |
| OpenAI Whisper file upload pattern | Server should detect silence → Realtime WS |
Contract
1. You segment — only POST clips that contain speech you want transcribed. 2. We do not filter — silence, near-empty WAVs, and noise are transcribed as-is. 3. You pay for what you send — wasting quota on silence is the caller's responsibility. 4. No server HTTP retry — up to 2 worker attempts (800ms each) per request; on 502 the client may resend the same clip.
Typical flow
Client VAD detects utterance end
→ encode clip (e.g. WAV)
→ POST /v1/audio/transcriptions (multipart)
→ 200 + text (or 502 → client decides to retry)
Integrators like Flow follow this pattern: WebSocket voice session → local VAD → HTTP segment per utterance.
Example
curl -X POST https://audio.lansonai.com/v1/audio/transcriptions \
-H "Authorization: Bearer sk-..." \
-F "file=@utterance.wav" \
-F "language=zh"
Anti-patterns
audio_url instead.