Comments (12)
fwiw the preprocess in python is a heuristic one. The way that I have implemented transcribe
right now is not very optimized, rather than a proof of concept.
There are a bunch of memcopy that I need to update, esp right now the result of transcribe
are from full_get_segment_text
, which it returns the whole blob in string.
I have a different approach for running inference, but need some digging around first. Probably will have a PR up soon after.
from whispercpp.
Hi there, You can try with the latest version. The previous few ones has a wheel bug.
from whispercpp.
Hi,
Installed from pip successfully, but running
from whispercpp import Whisper
w = Whisper.from_pretrained("tiny.en")
Gives the error:
ImportError Traceback (most recent call last)
[<ipython-input-3-16f25927a5a0>](https://localhost:8080/#) in <module>
1 from whispercpp import Whisper
----> 2 w = Whisper.from_pretrained("tiny.en")
[/usr/local/lib/python3.8/dist-packages/whispercpp/__init__.py](https://localhost:8080/#) in from_pretrained(cls, model_name)
29 )
30 _ref = object.__new__(cls)
---> 31 _cpp_binding = api.WhisperPreTrainedModel(download_model(model_name))
32 context = _cpp_binding.context
33 params = _cpp_binding.params
[/usr/local/lib/python3.8/dist-packages/whispercpp/utils.py](https://localhost:8080/#) in __getattr__(self, item)
103 def __getattr__(self, item: t.Any) -> t.Any: # pragma: no cover
104 if self._module is None:
--> 105 self._module = self._load()
106 return getattr(self._module, item)
107
[/usr/local/lib/python3.8/dist-packages/whispercpp/utils.py](https://localhost:8080/#) in _load(self)
82 # Import the target module and insert it into the parent's namespace
83 try:
---> 84 module = importlib.import_module(self.__name__)
85 self._parent_module_globals[self._local_name] = module
86 # The additional add to sys.modules ensures library is actually loaded.
[/usr/lib/python3.8/importlib/__init__.py](https://localhost:8080/#) in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
128
129
/usr/lib/python3.8/importlib/_bootstrap.py in _gcd_import(name, package, level)
/usr/lib/python3.8/importlib/_bootstrap.py in _find_and_load(name, import_)
/usr/lib/python3.8/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
/usr/lib/python3.8/importlib/_bootstrap.py in _load_unlocked(spec)
/usr/lib/python3.8/importlib/_bootstrap.py in module_from_spec(spec)
/usr/lib/python3.8/importlib/_bootstrap_external.py in create_module(self, spec)
/usr/lib/python3.8/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/local/lib/python3.8/dist-packages/whispercpp/api.so)
from whispercpp.
Also the rate of transcription seems extremely slow. Tiny model took 22 seconds to transcribe a 4 second audio. Whisper.cpp does it in little more than a second one a single thread.
from whispercpp.
Are you running this on Colab? Might need a upgrade for GCC and libstdc++
from whispercpp.
what files are you using? On my end it seems the performance are the same. I'm using some of the bigger ogg files from the samples folder.
from whispercpp.
Can you share your preprocessing code?
from whispercpp.
Yup. On colab. Oddly enough, building the whl seems to work without GCC error.
Regarding the speed, I'm just running your example with a wav file - pcm_s16le format.
wav file
from whispercpp.
Yup. On colab. Oddly enough, building the whl seems to work without GCC error.
The GCC error probably stems from the bazel script that I'm using to compile the binary. It uses clang atm. I haven't tried with GCC yet, but potentially I can just use gcc if that works just fine.
from whispercpp.
cc @regstuff PR is up #11 . However, this is probably just a quick patch.
From local testing it does speed up by 70%. However,it still doesn't do very well with bigger file. I will create an issue for this.
from whispercpp.
Tracking in #12. I will close this and release 0.0.7 for the quick patch
from whispercpp.
You can try out 0.0.7
from whispercpp.
Related Issues (20)
- feat: cuBLAS Support HOT 1
- bug: Quantized Models not Loading HOT 3
- feat: Command mode
- Bug: ERROR: Failed to initialized SDL: dsp: No such audio device HOT 4
- bug: significantly lower performance compared to original whisper.cpp HOT 1
- bug: core dump where i try in ubuntu HOT 2
- from_pretrained load local model HOT 3
- feat: Cuda support?
- feat: do you provide a language=*** in transcribe_from_file() ?
- bug: from_pretrained() gives HTTP Error 401: Unauthorized HOT 2
- bug: RuntimeError: src/whispercpp/context.cc#L69: c.wctx is not initialized HOT 1
- bug: Doesn't install on wsl2 HOT 1
- bug: Custom model not loading. HOT 1
- bug: Runs Exclusively on CPU HOT 1
- bug: doesnt build HOT 2
- bug: submodule cron update doesn't update bazel commit pinning
- bug: Pip install fails HOT 2
- bug: Wheel doesn't build
- feat: CoreML support HOT 5
- bug: pi_cpp2py_export.so: Exec format error
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 whispercpp.