[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"article-doc:docs\u002Fguides\u002F7.client-vad-segments":3},"---\ntitle: Client-VAD speech segments\ndescription: When and how to use synchronous segment transcription.\n---\n\n# Client-VAD speech segments\n\nUse [Segment Transcription](\u002Fdocs\u002Fapi-reference\u002Fsegment-transcription) when **your application** already knows where speech starts and ends.\n\n## When to use Segment\n\n| Use Segment | Use something else |\n|---|---|\n| You run VAD locally and upload one clip per utterance | Continuous mic stream → [Realtime WS](\u002Fdocs\u002Frealtime) |\n| You need a synchronous transcript in ~1s | Long file at a URL → [Batch jobs](\u002Fdocs\u002Frecorded\u002Ftranscribe-audio) |\n| OpenAI Whisper `file` upload pattern | Server should detect silence → Realtime WS |\n\n## Contract\n\n1. **You segment** — only POST clips that contain speech you want transcribed.\n2. **We do not filter** — silence, near-empty WAVs, and noise are transcribed as-is.\n3. **You pay for what you send** — wasting quota on silence is the caller's responsibility.\n4. **No server HTTP retry** — up to 2 worker attempts (800ms each) per request; on **502** the client may resend the same clip.\n\n## Typical flow\n\n```\nClient VAD detects utterance end\n  → encode clip (e.g. WAV)\n  → POST \u002Fv1\u002Faudio\u002Ftranscriptions (multipart)\n  → 200 + text (or 502 → client decides to retry)\n```\n\nIntegrators like Flow follow this pattern: WebSocket voice session → local VAD → HTTP segment per utterance.\n\n## Example\n\n```bash\ncurl -X POST https:\u002F\u002Faudio.lansonai.com\u002Fv1\u002Faudio\u002Ftranscriptions \\\n  -H \"Authorization: Bearer sk-...\" \\\n  -F \"file=@utterance.wav\" \\\n  -F \"language=zh\"\n```\n\n## Anti-patterns\n\n- Uploading a **full meeting recording** to Segment — use batch `audio_url` instead.\n- Streaming **continuous PCM** to Segment — use Realtime WS.\n- Expecting the API to **skip silence** — it will not.\n\n## Related\n\n- [Segment API reference](\u002Fdocs\u002Fapi-reference\u002Fsegment-transcription)\n- [Choose an API](\u002Fdocs\u002Fstart\u002Fchoose-an-api)\n- [Errors](\u002Fdocs\u002Fapi-reference\u002Ferrors)\n",1790059118952]