Comments (7)
You must have ffmpeg installed on your machine.
You can install it with Chocolatey like so:
# using Chocolatey (https://chocolatey.org/)
choco install ffmpeg
or with Scoop:
# using Scoop (https://scoop.sh/)
scoop install ffmpeg
or from the ffmpeg website: https://ffmpeg.org/
from whisper_real_time.
Works! Thanks!
Using quite a bit of CPU, anyway to have it use the gpu instead?
from whisper_real_time.
To make sure you are using the CUDAversion of pytorch you can do a pip uninstall torch
and then install the CUDA version of pytorch with:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
from the pytorch website.
If you installed via the requirements.txt
this should already be true.
Make sure torch.cuda.is_available()
is True
in your environment.
Whisper should detect your GPU and use it automatically in that case, if it's not you can changing line 69 to:
audio_model = whisper.load_model(model, device="cuda")
to force it to use the GPU.
from whisper_real_time.
did that, now im gettin this error:
Traceback (most recent call last):
File "C:\Users\ibrah\Desktop\whisper_real_time-master\transcribe_demo.py", line 152, in <module>
main()
File "C:\Users\ibrah\Desktop\whisper_real_time-master\transcribe_demo.py", line 69, in main
audio_model = whisper.load_model(model, device="cuda")
File "C:\Users\ibrah\AppData\Local\Programs\Python\Python38\lib\site-packages\whisper\__init__.py", line 144, in load_model
checkpoint = torch.load(fp, map_location=device)
File "C:\Users\ibrah\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 809, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "C:\Users\ibrah\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 1172, in _load
result = unpickler.load()
File "C:\Users\ibrah\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 1142, in persistent_load
typed_storage = load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location))
File "C:\Users\ibrah\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 1116, in load_tensor
wrap_storage=restore_location(storage, location),
File "C:\Users\ibrah\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 1083, in restore_location
return default_restore_location(storage, map_location)
File "C:\Users\ibrah\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 217, in default_restore_location
result = fn(storage, location)
File "C:\Users\ibrah\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 182, in _cuda_deserialize
device = validate_cuda_device(location)
File "C:\Users\ibrah\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 166, in validate_cuda_device
raise RuntimeError('Attempting to deserialize object on a CUDA '
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
from whisper_real_time.
torch.cuda.is_available() is False
Unfortunately it looks like you do not have a CUDA compatible GPU.
from whisper_real_time.
from whisper_real_time.
Hi!, I have the same problem than @ibrahim91015. The script runs well on CPU but I force the use of the GPU, I get the same torch.cuda.is_available() is False
error, but:
`❯ nvidia-smi
Sat Aug 26 18:20:07 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 532.09 Driver Version: 532.09 CUDA Version: 12.1 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 4080 L... WDDM | 00000000:01:00.0 On | N/A |
| N/A 46C P8 8W / N/A| 382MiB / 12282MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
+---------------------------------------------------------------------------------------+`
So, any ideas?
Thak you so much
from whisper_real_time.
Related Issues (20)
- i'm sure that there's a simple way to get the API to do this but i figured i would ask here HOT 1
- Missing how to use information in readme HOT 2
- Recieve sound data from any application along with the mic in Linux. PR or use your code? HOT 1
- Как использовать видеокарту, а не процессор? HOT 2
- To .exe HOT 6
- UnboundLocalError: local variable 'source' referenced before assignment HOT 3
- Why does it take almost 15000-20000ms latency to deliver the text ? HOT 1
- Irrelevant Output
- whisper real-time from Jetson Nano HOT 2
- WRT on Windows HOT 1
- How to get transcription in a text file HOT 3
- Infinite loop management
- Kudos
- Wow, what a great job. BOL!!!
- Optimal values for the VAD filter?
- Pyaudio install fails when installing requirements.txt HOT 3
- Question about pytorch HOT 1
- Here's how I run it on Mac M2
- Malayalam (ml) didnt work
- how release a mic?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whisper_real_time.