voicebox icon indicating copy to clipboard operation
voicebox copied to clipboard

Capture transcription has a hard cutoff at 30 seconds.

Open jgharding opened this issue 6 months ago • 9 comments

Having played with every model and setting i can find, i cannot get capture to transcribe more than precisely 30 seconds, limiting its usefulness. If a longer clip is recorded, only precisely the first 30 seconds are transcribed.

Using Windows and 5090 here.

jgharding avatar May 04 '26 11:05 jgharding

Hi @jamiepine, thanks for maintaining this project!

I looked into this issue and I think the 30-second cutoff comes from how Whisper handles audio — it only processes 30-second windows by default. In VoiceBox's STT backend (pytorch_backend.py / mlx_backend.py), the entire audio is passed to Whisper in one shot without any chunking, so anything beyond 30 seconds gets silently dropped.

Interestingly, the TTS side already has a chunking mechanism (chunked_tts.py), so a similar approach could work here — split the audio into 30-second segments, transcribe each one, and concatenate the results.

I'd be happy to work on a fix and submit a PR if you're open to it. Let me know if there's a preferred approach or any existing plans!

witsanchenc avatar May 04 '26 13:05 witsanchenc

interesting, i did think this may be related to chunking, as I've used the settings for this in the TTS section.

It's seems that's all we need really, since the refinement step should take care of issues. It's not like TTS where the ear picks up on the slightest inflection issue between sections, I guess the words just need batching together then passing to refinement by Qwen?

Having the chunking be sentence aware would be good too. I wonder if it can be chunked per sentence, as a sentence over 30 seconds is very rare.

jgharding avatar May 04 '26 14:05 jgharding

This seemed to be fixable via a simple additional parameter to the whisper model.

NoxDecima avatar May 05 '26 18:05 NoxDecima

That's super weird cause there's no cutoff for me, I've been using it to transcribe into Claude exclusively, up to 10 minutes of yapping sometimes. Whisper as far as I know doesn't need chunking. There's a 30 second cutoff on the sample recorder which is intentional. If anyone can show a video of the cutoff happening for Capture that would be great!

jamiepine avatar May 05 '26 19:05 jamiepine

Are you on Apple silicon? My code review seemed to identify it as a pytorch / cuda only issue.

NoxDecima avatar May 05 '26 19:05 NoxDecima

Ah yes that's probably it, this will need a fix then. Happy to review a PR

jamiepine avatar May 05 '26 19:05 jamiepine

This one should fix it. #616

NoxDecima avatar May 05 '26 19:05 NoxDecima

thanks chaps. I use this regularly on Win/Cuda so will no doubt pop up occaasioanlly when i find bugs on that platform

jgharding avatar May 06 '26 09:05 jgharding

This is fixed by #1151 (prepared from #616, thanks @NoxDecima): Whisper transcription on the PyTorch path now runs in long-form mode instead of stopping at the first 30-second window, and the MLX path already windowed the whole file. It is part of Voicebox 0.6.0. The 0.6.0 build is cut and is waiting on an Apple Developer account issue that blocks notarizing the macOS release; it will be published as soon as that clears. Closing as fixed; if you still see a cutoff on 0.6.0 once it is out, please reopen with details.

capy-ai-staging avatar Oct 07 '26 04:10 capy-ai-staging