Feature request: client-side chunking for OpenAI-compatible adapter to support duration-capped models (gpt-4o-transcribe / gpt-4o-mini-transcribe)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 50/100
Research direction
Start in internal/transcription/adapters/openai_adapter.go and trace the existing single-shot request to /v1/audio/transcriptions and its segment results. Implement the duration-capped path while preserving the unchanged path for uncapped models; done means chunk results form one continuous transcript with corrected original-file timestamps and overlap text handled.
Written by the indexing model from the issue text.
Description
Follow-up to #475 / #476.
OpenAI's newer transcription models (gpt-4o-transcribe, gpt-4o-mini-transcribe) reject audio longer than ~1400 seconds (~23 minutes) with a 400 error:
"audio duration 2158.5493333333334 seconds is longer than 1400 seconds which is the maximum for this model"
whisper-1 has no such duration cap (only the 25MB request-size limit, already addressed in #476), so it currently works for arbitrarily long recordings — but gpt-4o-mini-transcribe is half the price of whisper-1 ($0.003/min vs $0.006/min) and gpt-4o-transcribe has materially better accuracy for the same price. Neither is usable today for anything longer than ~23 minutes, which rules them out for typical meeting-length recordings.
Proposal: add chunking to the OpenAI-compatible adapter (internal/transcription/adapters/openai_adapter.go) for models that declare a duration cap:
- Split the input audio into sequential chunks under the model's duration limit (with a small overlap, e.g. 2-3s, to avoid cutting words at boundaries — or split on silence/VAD boundaries if that's already available in the pipeline, to avoid overlap-driven duplicate words entirely).
- Submit each chunk as a separate
/v1/audio/transcriptionsrequest. - Reassemble the per-chunk segment results into one continuous transcript, correcting segment timestamps to be relative to the original file (not each chunk's own start), and de-duplicating any overlap-boundary text if the overlap approach is used.
- Only activate this path for models that actually need it (duration-capped models) —
whisper-1and other uncapped models should keep using the existing single-shot path unchanged. - Model duration caps aren't likely exposed by an API — hardcode known caps (e.g. a small map of model ID → max duration seconds) with a sane fallback/documented assumption, and note in a comment that this may need updating if OpenAI changes the limit.
This is meaningfully more involved than #476 — real chunking + reassembly logic, not a preprocessing flag — flagging it as its own issue/PR rather than folding into that one.
- Dominant language
- Go
- Stars
- 3.1k
- Forks
- 264
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rishikanthc/Scriberr
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
rishikanthc/Scriberr#456 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
rishikanthc/Scriberr#486 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
rishikanthc/Scriberr#484 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
rishikanthc/Scriberr#479 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 54/100
rishikanthc/Scriberr#475 ·
All issues in rishikanthc/Scriberr
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100