Vaibhavs10 / insanely-fast-whisper

Apache License 2.0
6.94k stars 505 forks source link

Error in Notebook: infer_faster_whisper_large_v2.ipynb #146

Closed riffov closed 6 months ago

riffov commented 6 months ago

Hi,

First of all: Thank you for sharing something that makes life easier for people. I find your project very interesting, therefore I tried to run the demo notebook in a T4 runtime on colab. But appears "RuntimeError: Library libcublas.so.11 is not found or cannot be loaded" in Notebook: "infer_faster_whisper_large_v2.ipynb". in the execution of the cell (in step 5) (shows up from the date 12-13-2023):

segments, info = model.transcribe("sam_altman_lex_podcast_367.flac", beam_size=1)
print("Detected language '%s' with probability %f" % (info.language, info.language_probability))

This is the error:

RuntimeError                              Traceback (most recent call last)
<ipython-input-5-5b56465b1fbe> in <cell line: 1>()
----> 1 segments, info = model.transcribe("sam_altman_lex_podcast_367.flac", beam_size=1)
      2 
      3 print("Detected language '%s' with probability %f" % (info.language, info.language_probability))

1 frames
/usr/local/lib/python3.10/dist-packages/faster_whisper/transcribe.py in transcribe(self, audio, language, task, beam_size, best_of, patience, length_penalty, repetition_penalty, no_repeat_ngram_size, temperature, compression_ratio_threshold, log_prob_threshold, no_speech_threshold, condition_on_previous_text, prompt_reset_on_temperature, initial_prompt, prefix, suppress_blank, suppress_tokens, without_timestamps, max_initial_timestamp, word_timestamps, prepend_punctuations, append_punctuations, vad_filter, vad_parameters)
    325             else:
    326                 segment = features[:, : self.feature_extractor.nb_max_frames]
--> 327                 encoder_output = self.encode(segment)
    328                 # results is a list of tuple[str, float] with language names and
    329                 # probabilities.

/usr/local/lib/python3.10/dist-packages/faster_whisper/transcribe.py in encode(self, features)
    627         features = get_ctranslate2_storage(features)
    628 
--> 629         return self.model.encode(features, to_cpu=to_cpu)
    630 
    631     def generate_with_fallback(

RuntimeError: Library libcublas.so.11 is not found or cannot be loaded

I am grateful for your help...

Vaibhavs10 commented 6 months ago

Hi @riffov - the notebook you are referring to was used for benchmarks. If you want to use the CLi then I'd recommend using this Colab notebook: https://github.com/Vaibhavs10/insanely-fast-whisper/blob/main/insanely_fast_whisper_colab.ipynb

(closing this for now, feel free to re-open if you have any questions)