ml-explore / ml-explore/mlx-examples
Is there a way to implement a Timeout / cancellation for transcribe() method, espeicially model.decode()? (large-v3 sometimes stalls >200s on ~10s audio)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
For certain short audio clips (~10 s), mlx-whisper (model: large-v3) spends an extremely long time inside model.decode() when called via whisper.transcribe(). In one case, I set a ~10 s application-level timeout, but logging shows the decode call continued for ~200 s before returning.
I’d like a way to cancel / time out decoding so my application can skip problematic audio and continue processing subsequent chunks.
Is there any recommended way to achieve this? Or would this require modifying the decoding loop itself?
Thank you
Contributor guide
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.
Research direction
Start by tracing the transcribe() call path into model.decode(), focusing on the decoding loop mentioned in the report. Determine how a timeout or cancellation should return control so processing can continue with later audio chunks, then verify that the stalled large-v3 case exits as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- audio-video-rtc, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100