toolkit for whisper.cpp
Project description
whisper.cpp.cdll
Quick Start
1. Install whisper.cpp
git clone https://github.com/ggerganov/whisper.cpp
cd whisper.cpp
make tiny
gcc -O3 -std=c11 -pthread -mavx -mavx2 -mfma -mf16c -fPIC -c ggml.c
g++ -O3 -std=c++11 -pthread --shared -fPIC -static-libstdc++ whisper.cpp ggml.o -o libwhisper.so
2. Install whisper_cpp_cdll
pip install whisper_cpp_cdll
3. Usage
from whisper_cpp_cdll.core import run_whisper
from whisper_cpp_cdll.util import read_audio
# your whisper.cpp files path
libname = './whisper.cpp/libwhisper.so'
fname_model = './whisper.cpp/models/ggml-tiny.bin'
d = read_audio('./whisper.cpp/samples/jfk.wav')
result = run_whisper(data = d, libname = libname, fname_model = fname_model, language=b'en')
#=> [{'segment_id': 0, 'text': ' And so my fellow Americans ask not what your country can do for you ask what you can do for your country.', 'start': 0, 'end': 176000, 'tokens': [{..}]},..... ]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for whisper_cpp_cdll-0.0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35eaaac768eeec5ce1b6340b7539276b706a771fbd427df94be3c70ea11a6c64 |
|
MD5 | 09e320fde96d7ae9d638cc76bd5eb4b0 |
|
BLAKE2b-256 | a8afaa864a8112350c53c3669bc58c6539aedba4c5547257eb1d6f0c3110fca0 |