feat: POST /v1/transcribe batch endpoint + integration docs#1
Conversation
Same Parakeet model handles both streaming WS (voicechat) and batch HTTP (studio file upload). Accepts any audio format ffmpeg can read, auto-resamples to 16 kHz mono.
Also adds python-multipart to deps for the new /v1/transcribe endpoint.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR introduces a batch HTTP audio transcription endpoint for the stt-streaming service. It adds comprehensive API documentation, integration instructions for upstream services, and server-side implementation with audio validation, decoding, and transcription execution. ChangesBatch Transcription Endpoint
Sequence DiagramsequenceDiagram
participant Client
participant Server
participant Executor
participant Model
Client->>Server: POST /v1/transcribe<br/>(audio file, language, X-API-Key)
Server->>Server: Validate file (non-empty,<br/>size ≤ 100MB)
Server->>Server: Decode audio to 16kHz<br/>mono float32
Server->>Executor: Run transcription<br/>(in background)
Executor->>Model: model._run_transcribe(audio)
Model->>Executor: Return transcribed text
Server->>Server: Record metrics<br/>(latency, size)
Server->>Client: Return JSON<br/>(text, language, duration,<br/>latency, model_name)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Adds HTTP batch transcription to the same pod so the Studio file-upload path can reuse the Parakeet model without a separate batch service.
Changes
POST /v1/transcribe— accepts any audio (WAV/MP3/M4A/etc.), auto-resamples to 16 kHz mono, returns JSON with text + latencypython-multipartdependency for FastAPI File/Form parsingdocs/integration.md— protocol reference for the dashboard backendTested
Local RTX 4090 build + smoke tests:
/v1/stream: start → ready → final → clean close (1000)/v1/transcribewith synthesized speech: returned exact transcript (5.2s audio, 103ms latency)Summary by CodeRabbit
Release Notes
New Features
Documentation