faster-whisper icon indicating copy to clipboard operation
faster-whisper copied to clipboard

Faster Whisper sometimes stops running suddenly

Open asusdisciple opened this issue 2 years ago • 9 comments

So I have large quantity of short 10-60 seconds audio files. I try to transcribe them with faster whisper in a loop. But sometimes whisper just stops/freezes all of a sudden. I use debug mode but there is no error message, just the last info message that it started processing the file. If I repeat the run it sometimes fails on the same file, sometimes it goes a bit further and fails at another file. I looked into the audio files and they seem to work just fine in any media player. I call faster whisper (large-v1) like this:

res = []
        for p in audiopath:  # filepaths
            segments, info = model.transcribe(p,
                                           beam_size=5
                                           task="transcribe",
                                           without_timestamps=True,
                                           temperature=[0], # temp 0 to make benchmark fair
                                           language=lang
                                           )
            logging.debug("Detected language '%s' with probability %f" % (info.language, info.language_probability))
            segments = list(segments)
            res.append("".join([i[4] for i in segments]))  #only append text to the result list

asusdisciple avatar Dec 15 '23 16:12 asusdisciple

Sometimes it stops without error when it's actually "out of memory". How much VRAM there is in your GPU?

Purfview avatar Dec 15 '23 21:12 Purfview

I am experiencing the same problem. If you are using Windows, it may be related to this issue. https://github.com/SYSTRAN/faster-whisper/issues/71

This issue does not provide a solution, but it does provide some workarounds.

sngazm avatar Dec 16 '23 13:12 sngazm

Not really, I use Ubuntu with an A100 and 80GB of RAM

asusdisciple avatar Dec 17 '23 13:12 asusdisciple

I experience the same issue with a T4 and 16GB of Memory. Suddenly stops and says start processing but them hangs.

It does not matter which files I use (have videos with different lengths) multiple container running faster whisper stop randomly.

fmorett avatar Jan 02 '24 23:01 fmorett

me too facing the same problem

alexivaner avatar Mar 22 '24 02:03 alexivaner

Has anyone encountered this issue and fixed it?

llurk avatar May 09 '24 15:05 llurk

Yes I have fixed it by checking every video via ffprobe and check if I get a duration. Basically we ignore all videos which would produce an error in ffmpeg and since then our service is super stable.

fmorett avatar May 09 '24 17:05 fmorett

I found the simplest way to fix this issue is to clear the CMOS or reset the BIOS. I'm not entirely sure why this works, but recently I messed with the BIOS settings and my PC couldn't boot. After resetting the CMOS, the faster whisper error got fixed too.

llurk avatar Jun 07 '24 12:06 llurk