Stream batch audio uploads#5571
Merged
Merged
Conversation
✅ Deploy Preview for old-char canceled.
|
Write batch request bodies to temp files incrementally and stream Deepgram/OpenAI provider uploads from disk instead of rematerializing audio buffers.
9329149 to
418a5fd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Verification:
Note
Medium Risk
Changes memory and I/O behavior on the main batch transcription path; incorrect streaming, temp file handling, or size limits could affect large uploads or retries, though logic is largely a refactor with tests added.
Overview
Batch sync transcription no longer buffers the full request body in memory. The transcribe-proxy batch handler accepts an Axum
Body, streams chunks into a temp file (withMAX_BATCH_AUDIO_BODY_BYTESenforcement and clearer error responses), and passes that single file path through hyprnote routing, retries, and provider calls. Callback requests still buffer toBytesfor JSON parsing.owhisper-client adds shared
streaming_file_body/streaming_file_parthelpers (reqweststreamfeature). Deepgram batch uploads stream from disk withContent-Length; OpenAI multipart file parts stream from disk instead of loading the whole file into memory. Async callback sync fallback writes downloaded audio to a temp file before transcribing, matching the path-based API.Reviewed by Cursor Bugbot for commit 418a5fd. Bugbot is set up for automated code reviews on this repo. Configure here.