Python bindings for whisper.cpp
Go to file
2023-03-03 18:31:53 +00:00
whisper.cpp@ad1389003d whisper.cpp v1.2.1 2023-03-02 18:10:36 +00:00
.gitignore init 2023-02-18 22:59:42 +00:00
.gitmodules whisper.cpp v1.2.1 2023-03-02 18:10:36 +00:00
pyproject.toml Create pyproject.toml 2022-12-12 18:22:49 +00:00
README.md init 2023-02-18 22:59:42 +00:00
requirements.txt init 2023-02-18 22:59:42 +00:00
setup.py release 1.1.0 2023-03-03 18:31:53 +00:00
whispercpp.pxd whisper.cpp v1.2.1 2023-03-02 18:10:36 +00:00
whispercpp.pyx Clarified documentation 2023-03-02 18:13:32 +00:00

Python bindings for whisper.cpp

git clone --recurse-submodules https://git.ecker.tech/lightmare/whispercpp.py
cd whispercpp.py
pip install .

or

git clone https://git.ecker.tech/lightmare/whispercpp.py
cd whispercpp.py
git submodule update --init
pip install .
from whispercpp import Whisper

w = Whisper('tiny', models_dir='./models/', language=b'en')

result = w.transcribe("myfile.mp3")
text = w.extract_text(result)

Note: default parameters might need to be tweaked.
See Whispercpp.pyx.

Changes made (not exhaustive):

  • changed defaults
  • whisper.cpp submodule set to 1.2.0
  • removed requests dependency
  • models dir can be changed in constructor
  • added support for setting params
  • added back support for large-v1 model
  • added support for english-only models