Skip to content
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

only works in cpu mode , but gpu outputs nothing #26

Closed
yslion opened this issue Apr 20, 2023 · 10 comments
Closed

only works in cpu mode , but gpu outputs nothing #26

yslion opened this issue Apr 20, 2023 · 10 comments

Comments

@yslion
Copy link

yslion commented Apr 20, 2023

os: win11 , cuda 11.6 cudnn 8.9 rtx3060 4G

every example in readme i've tried , if no --device , no outputs , if --device cpu it works but slow.

and I've tried the newest version

whisper-ctranslate2-0.1.9
whisper-ctranslate2-0.2.0

@jordimas
Copy link
Collaborator

Does it make any difference if you use base, tiny, small or large-v2 models?

@yslion
Copy link
Author

yslion commented Apr 20, 2023

@jordimas

large-v2 is still downloading , but the other 3 , shows nothing

(venv) D:\py\whisper-ctranslate2>whisper-ctranslate2 1.mp3 --model medium
Detecting language using up to the first 30 seconds. Use --language to specify the language
Estimating duration from bitrate, this may be inaccurate

(venv) D:\py\whisper-ctranslate2>whisper-ctranslate2 1.mp3 --model base
Detecting language using up to the first 30 seconds. Use --language to specify the language
Estimating duration from bitrate, this may be inaccurate

(venv) D:\py\whisper-ctranslate2>whisper-ctranslate2 1.mp3 --model small
Detecting language using up to the first 30 seconds. Use --language to specify the language

@jordimas
Copy link
Collaborator

Can you try an older version like:

pip3 install whisper-ctranslate2==0.1.0

to see if it works? Thanks

@yslion
Copy link
Author

yslion commented Apr 20, 2023

Can you try an older version like:

pip3 install whisper-ctranslate2==0.1.0

to see if it works? Thanks

I installed 0.1.0 just now , it said : Could not load library cudnn_cnn_infer64_8.dll. Error code 126 Please make sure cudnn_cnn_infer64_8.dll is in your library path!
then I go to search and try a way : https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installcuda-windows and down 'ZLIB DLL.' , unzip and copy dll_x64\zlibwapi.dll to windows\system32

it works

I update whisper-ctranslate2 to -0.1.9 , it works too

But there is a problem about live_transcribe , 0.1.0 does not have this command

in 0.1.9 , whisper-ctranslate2 --live_transcribe True --language en or leave '--language' empty or fill with other language , It works at most 6 dialogs and then quit without any message
image

is it possiable out of memery ? how to get details or some logs

@Zacharie-Jacob
Copy link

when you say output, do you mean specifically not saving the files out? Does it display to the termianl, though?

There is this issue about display but no saved files:

#11

@zx3777
Copy link

zx3777 commented Apr 23, 2023

display to the termianl but not save , everytime i use this. I have no choice but to use the original version, which is slow but no problem.

1.0 could save,but when i use --word_timestamps=ture ,the --highlight_words=true will auto turn on,and cant be closed.

@yslion
Copy link
Author

yslion commented Apr 23, 2023

@Zacharie-Jacob
no, 'no outputs' I said , means no display about translating , no save files

this is my cmd line
whisper-ctranslate2 1.mp3 --model medium

this is it's output

Detecting language using up to the first 30 seconds. Use --language to specify the language
Estimating duration from bitrate, this may be inaccurate

and then quit without showing anything

@efonte
Copy link

efonte commented Apr 25, 2023

The problem is in the faster_whisper package. If you run for example this script it will show you what the problem is.

from faster_whisper import WhisperModel

model_size = "large-v2"
model = WhisperModel(model_size, device="cuda", compute_type="float16")
segments, info = model.transcribe("audio.wav", beam_size=5)
print("Detected language '%s' with probability %f" % (info.language, info.language_probability))
for segment in segments:
    print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
PS C:\> python .\script.py
Could not load library cudnn_cnn_infer64_8.dll. Error code 126
Please make sure cudnn_cnn_infer64_8.dll is in your library path!

The error has been solved by installing zlib:
https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#install-zlib-windows

Maybe it would be good to show the error in whisper-ctranslate2 since it hides it.

@yslion
Copy link
Author

yslion commented Apr 28, 2023

The problem is in the faster_whisper package. If you run for example this script it will show you what the problem is.

from faster_whisper import WhisperModel

model_size = "large-v2"
model = WhisperModel(model_size, device="cuda", compute_type="float16")
segments, info = model.transcribe("audio.wav", beam_size=5)
print("Detected language '%s' with probability %f" % (info.language, info.language_probability))
for segment in segments:
    print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
PS C:\> python .\script.py
Could not load library cudnn_cnn_infer64_8.dll. Error code 126
Please make sure cudnn_cnn_infer64_8.dll is in your library path!

The error has been solved by installing zlib: https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#install-zlib-windows

Maybe it would be good to show the error in whisper-ctranslate2 since it hides it.

thank you for your reply , I ve fix the zlib issue (see above ,line 5 ) .

the matter is , live_transcribe , print out 'Transcribing..' and the quit without any outputs

(venv) D:\py\whisper-ctranslate2>whisper-ctranslate2 --live_transcribe True --language en  --model tiny 
Listening.. (Ctrl+C to Quit)
...............................................................................................
Transcribing..
...........
(venv) D:\py\whisper-ctranslate2>

and @jordimas

@jordimas
Copy link
Collaborator

jordimas commented Jun 6, 2023

This has been fixed with version 0.26

@jordimas jordimas closed this as completed Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants