Repository navigation
Transcribe long recordings in parts, and say why a transcription failed - #64
Merged
Merged
Conversation
A two-hour YouTube import failed its transcription with HTTP 413: the whole recording's audio went to Gecko Suite in one request, at the 300 MB cap of the suite and its nginx. The audio now goes in half-hour parts, cut sample-accurately with ffmpeg, and the parts' transcripts are joined with each word moved to where it was said. Audio shorter than one part takes exactly the path it took before. The transcript panel followed only the active job list, so a job that failed dropped out of it and the panel showed "error" without the reason. It now reads the job it was watching by id once it leaves that list, and on opening an asset whose transcript is in error it finds the last transcription's message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1geD2ELWgL2sDpxYbx3Aw
davior
marked this pull request as ready for review
November 5, 2026 08:14
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
Fixes two problems with transcribing a long YouTube import: it failed with HTTP 413, and the panel showed only "error" without the reason.
Long recordings. A transcription used to send the whole recording's audio to Gecko Suite in one request. At over two hours that reaches the 300 MB cap of both the suite and its nginx. Nginx answers with an HTML 413, and the client can only report that as "HTTP 413". Raising the caps would only move the limit, because one call that long also runs into the 1900 s read timeouts and Deepgram's own processing time. So GAM now sends the audio in parts:
audio.split_audiocuts the extracted FLAC into 30-minute pieces (transcribe.PART_SECONDS). Each piece is cut on its own with-ssbefore-iand re-encoded, so the cut lands on an exact sample and the file records its length. The segment muxer was tried first, but its FLAC pieces have no length in their header.transcribe.runtranscribes each part, through the suite or the local Deepgram key. Between parts it reports "part n of m", and that report is also where a cancel takes effect.join_partsmoves every segment's and word's times by the start of its part, then stores the joined transcript through the existingstore_transcript.The missing reason.
TranscriptPanelonly followed the list of active jobs. A failed job drops out of that list, so itserror_messagenever showed. Now:activityApi.get).Only GAM changes. The suite, Caddy and nginx are untouched.
Test plan
pytest -qpasses (1547), including the new tests:split_audiosplits a 5 s tone into 3 parts with offsets 0, 2 and 4, and returns short audio as it is.npm run lint,npm test(487) andnpm run buildpass, including the new tests:Deployment
Rebuild both the backend and the frontend. There is no migration and no new setting.
git pull origin main docker compose up --build -d docker compose ps curl -f http://localhost:${APP_PORT}/api/healthTo check it:
Generated by Claude Code