Realtime
Recorded
Concepts
Guides
API Reference
Use 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 |
| You need a synchronous transcript in ~2.4s | Long file at a URL → Batch jobs |
OpenAI Whisper file upload pattern | Server should detect silence → Realtime WS |
Contract
- You segment — only POST clips that contain speech you want transcribed.
- We do not filter — silence, near-empty WAVs, and noise are transcribed as-is.
- You pay for what you send — wasting quota on silence is the caller's responsibility.
- No server HTTP retry — up to 3 worker attempts (800ms each) per request; on 502 the client may resend the same clip.
Typical flow
- Local VAD: Client-side VAD detects end of speech utterance.
- Audio Encoding: Encode audio segment into WAV/PCM buffer.
- HTTP Request:
POST /v1/audio/transcriptions(multipart form data). - Response: Receive
200 OKwith transcription JSON (or502to trigger client-side 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
- Uploading a full meeting recording to Segment — use batch
audio_urlinstead. - Streaming continuous PCM to Segment — use Realtime WS.
- Expecting the API to skip silence — it will not.