ochen1 / insanely-fast-whisper-cli Goto Github PK
View Code? Open in Web Editor NEWThe fastest Whisper optimization for automatic speech recognition as a command-line interface ⚡️
License: MIT License
The fastest Whisper optimization for automatic speech recognition as a command-line interface ⚡️
License: MIT License
报错
AssertionError: Torch not compiled with CUDA enabled
I installed it and got;
insanely-fast-whisper --model openai/whisper-base.en /Users/i/Desktop/Steve_Prince.wav
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.9/site-packages/transformers/utils/import_utils.py", line 1353, in _get_module
return importlib.import_module("." + module_name, self.name)
File "/opt/anaconda3/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/opt/anaconda3/lib/python3.9/site-packages/transformers/pipelines/init.py", line 28, in
from ..image_processing_utils import BaseImageProcessor
File "/opt/anaconda3/lib/python3.9/site-packages/transformers/image_processing_utils.py", line 28, in
from .image_transforms import center_crop, normalize, rescale
File "/opt/anaconda3/lib/python3.9/site-packages/transformers/image_transforms.py", line 47, in
import tensorflow as tf
File "/opt/anaconda3/lib/python3.9/site-packages/tensorflow/init.py", line 37, in
from tensorflow.python.tools import module_util as _module_util
File "/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/init.py", line 37, in
from tensorflow.python.eager import context
File "/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/eager/context.py", line 29, in
from tensorflow.core.framework import function_pb2
File "/opt/anaconda3/lib/python3.9/site-packages/tensorflow/core/framework/function_pb2.py", line 16, in
from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
File "/opt/anaconda3/lib/python3.9/site-packages/tensorflow/core/framework/attr_value_pb2.py", line 16, in
from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
File "/opt/anaconda3/lib/python3.9/site-packages/tensorflow/core/framework/tensor_pb2.py", line 16, in
from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
File "/opt/anaconda3/lib/python3.9/site-packages/tensorflow/core/framework/resource_handle_pb2.py", line 16, in
from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
File "/opt/anaconda3/lib/python3.9/site-packages/tensorflow/core/framework/tensor_shape_pb2.py", line 36, in
_descriptor.FieldDescriptor(
File "/opt/anaconda3/lib/python3.9/site-packages/google/protobuf/descriptor.py", line 553, in new
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/anaconda3/bin/insanely-fast-whisper", line 5, in
from insanely_fast_whisper.cli import main
File "/opt/anaconda3/lib/python3.9/site-packages/insanely_fast_whisper/cli.py", line 4, in
from transformers import pipeline
File "", line 1055, in _handle_fromlist
File "/opt/anaconda3/lib/python3.9/site-packages/transformers/utils/import_utils.py", line 1343, in getattr
module = self._get_module(self._class_to_module[name])
File "/opt/anaconda3/lib/python3.9/site-packages/transformers/utils/import_utils.py", line 1355, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.pipelines because of the following error (look up to see its traceback):
Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
When I run this command, i get an error message.
Command:
$ pip install -r requirements-gfx1010.txt --extra-index-url https://download.pytorch.org/whl/rocm5.2
Error:
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/rocm5.2
Requirement already satisfied: click in c:\users\brodskithegreat\desktop\desktop\code\scraper-dl-vids\insanely-fast\venv\lib\site-packages (from -r requirements-gfx1010.txt (line 3)) (8.1.7)
Requirement already satisfied: transformers in c:\users\brodskithegreat\desktop\desktop\code\scraper-dl-vids\insanely-fast\venv\lib\site-packages (from -r requirements-gfx1010.txt (line 4)) (4.40.0.dev0)
ERROR: Could not find a version that satisfies the requirement torch==1.13.1+rocm5.2 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2)
ERROR: No matching distribution found for torch==1.13.1+rocm5.2
I dont have a nvidia gpu and was hoping to play around with this AMD fix :/
I'm on a windows machine. Not sure if that matters, but this command doesnt work:
Command:
$ insanely-fast-whisper --model openai/whisper-base --device cpu --file-name myaudio.wav
Error:
C:\Users\BrodskiTheGreat\Desktop\desktop\Code\scraper-dl-vids\insanely-fast\venv\lib\site-packages\pyannote\audio\core\io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call.
torchaudio.set_audio_backend("soundfile")
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
Traceback (most recent call last):
File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\BrodskiTheGreat\Desktop\desktop\Code\scraper-dl-vids\insanely-fast\venv\Scripts\insanely-fast-whisper.exe\__main__.py", line 7, in <module>
File "C:\Users\BrodskiTheGreat\Desktop\desktop\Code\scraper-dl-vids\insanely-fast\venv\lib\site-packages\insanely_fast_whisper\cli.py", line 94, in main
pipe = pipeline(
File "C:\Users\BrodskiTheGreat\Desktop\desktop\Code\scraper-dl-vids\insanely-fast\venv\lib\site-packages\transformers\pipelines\__init__.py", line 1108, in pipeline
return pipeline_class(model=model, framework=framework, task=task, **kwargs)
File "C:\Users\BrodskiTheGreat\Desktop\desktop\Code\scraper-dl-vids\insanely-fast\venv\lib\site-packages\transformers\pipelines\automatic_speech_recognition.py", line 220, in __init__
super().__init__(model, tokenizer, feature_extractor, device=device, torch_dtype=torch_dtype, **kwargs)
File "C:\Users\BrodskiTheGreat\Desktop\desktop\Code\scraper-dl-vids\insanely-fast\venv\lib\site-packages\transformers\pipelines\base.py", line 853, in __init__
self.device = torch.device(device)
RuntimeError: Invalid device string: 'cuda:cpu'
Also when I run --device cuda:0
i get similar error
RuntimeError: Invalid device string: 'cuda:cuda:0'
I'm not familiar with transformers
's pipeline, but looks like it's messing up some string concatenation
Hi @ochen1 , would this need a VAD for transcribing long audios, or does it have in built VAD capability? Thanks.
How can a user can pass language of audio as a parameter? output is in English whether the audio language is French or Spanish. How can we pass this argument to the process? Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.