-
-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
detect_language() doesn't work on a GPU? #782
Comments
What I don't understand is how transcribe() works even if I keep everything else in the code unchanged. This code works: import whisperx start_time = time.time() whisper_model = whisperx.load_model("medium", device = "cuda", compute_type="float16") audio = whisperx.load_audio(filepath) results = whisper_model.transcribe(audio) end_time = time.time() transcribe() also uses the same detect_language() method as you can see here: Line 194 in f2da2f8
but this doesn't throw the same error. |
Adding the following to my Dockerfile fixed this issue. Make sure
|
Here's a simple script to identify language from an audio:
import whisperx
import time
start_time = time.time()
filepath = ""
whisper_model = whisperx.load_model("medium", device = "cuda", compute_type="float16")
audio = whisperx.load_audio(filepath)
audio = whisperx.audio.pad_or_trim(audio)
print(f"Language => {whisper_model.detect_language(audio)}")
end_time = time.time()
print(f"Time taken: {end_time - start_time:.2f} seconds")
You can use this file as an input:
Download-30secs.mp4
I am getting this error:
Could not load library libcudnn_cnn_infer.so.8. Error: libcudnn_cnn_infer.so.8: cannot open shared object file: No such file or directory
Please make sure libcudnn_cnn_infer.so.8 is in your library path!
Aborted (core dumped)
Can someone tell me why? Let me know if you need anythind additional. Thanks!
The text was updated successfully, but these errors were encountered: