Closed Carleslc closed 1 year ago
When trying to transcribe multiple files, I also get out of memory when doing the second run (using the large model). As if the process isn't releasing memory when done.
When trying to transcribe multiple files, I also get out of memory when doing the second run (using the large model). As if the process isn't releasing memory when done.
Yes, using open-source large model in free Colab account can fill the RAM in one single transcription if audio file is large (usually about 30 minutes but depends on the audio file). You need to restart the runtime to clear the RAM for each file if that happens. Another option is to use the API filling the api_key parameter, which will use the OpenAI servers to process the audio files (faster and without filling your RAM, but with a pricing cost).
Maybe it would be possible to release memory via code, but for the moment it seems whisper model does some data caching that fills the RAM and it's not released after the transcription.
If you encounter this error in Google Colab, it means that your GPU has run out of RAM memory.
This usually happens with free accounts when using large models or long audio files.
Try the following solutions:
medium
(5 GB),small
(2 GB) orbase
(1 GB).api_key
parameter with your OpenAI API Key. Note this has an associated cost. Splitting long audio files is automatic in this case.