TG Telegram Group & Channel
GeekTips | United States America (US)
Create: Update:

I thought I figured out why whisper.cpp 1.42 would keep crashing. Perhaps it was silence in the audio so I automatically removed it but still it crashed. This is getting quite frustrating. Anyway here's how to automatically remove any silence segments of 4 seconds or more from audio.

mkdir output ; for f in *.opus ; do ffmpeg -i "$f" -c:a libopus -vbr off -b:a 32k -ar 48000 -af "silenceremove=start_periods=1:stop_periods=-1:start_threshold=-50dB:stop_threshold=-50dB:start_silence=1:start_duration=2:stop_duration=4:detection=peak",dynaudnorm output/"$f" ; done

it took about an hour to process and showed the following but yet running whisper.cpp on it still crashed

size= 470441kB time=32:49:17.45 bitrate= 32.6kbits/s speed=35.7x
video:0kB audio:461553kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.925659%

Original audio is 32:53:43
After any silence over 4 seconds was automatically removed which took about an hour to do
Audio became 32:49:17

4 mins and 26 secs was removed of silence. Not sure how many silence parts there actually were.

I thought I figured out why whisper.cpp 1.42 would keep crashing. Perhaps it was silence in the audio so I automatically removed it but still it crashed. This is getting quite frustrating. Anyway here's how to automatically remove any silence segments of 4 seconds or more from audio.

mkdir output ; for f in *.opus ; do ffmpeg -i "$f" -c:a libopus -vbr off -b:a 32k -ar 48000 -af "silenceremove=start_periods=1:stop_periods=-1:start_threshold=-50dB:stop_threshold=-50dB:start_silence=1:start_duration=2:stop_duration=4:detection=peak",dynaudnorm output/"$f" ; done

it took about an hour to process and showed the following but yet running whisper.cpp on it still crashed

size= 470441kB time=32:49:17.45 bitrate= 32.6kbits/s speed=35.7x
video:0kB audio:461553kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.925659%

Original audio is 32:53:43
After any silence over 4 seconds was automatically removed which took about an hour to do
Audio became 32:49:17

4 mins and 26 secs was removed of silence. Not sure how many silence parts there actually were.


>>Click here to continue<<

GeekTips




Share with your best friend
VIEW MORE

United States America Popular Telegram Group (US)