pywhispercpp
pywhispercpp copied to clipboard
what's the cpp version pywhispercpp bind to?
Forgive me if the question is dumb. I'm totally unfamiliar with pybind. But when I compare pywhispercpp and whispercpp cli, I found the difference.
The comparison is under same conditions:
- same prompt: "好,我们开始上课。请输出简体中文,以下是专有名词“ (means: ok, let's start the lesson. Please output zh-cn, not zh-tw"
- this is how cpp is invoked:
./main -l zh -t 8 -m models/ggml-large-v2.bin -osrt --prompt '好,我们开始上课.请输出简体中文' -of /tmp/whisper.cpp.srt /tmp/output005.wav - this is how I construct pywhispercpp model:
model = Model(model,
n_threads=8,
n_max_text_ctx=448,
max_len=30,
split_on_word=True,
initial_prompt=prompt,
language="zh"
)
segments = model.transcribe(input_audio, new_segment_callback=new_segment_callback)
however, pywhispercpp yields traditional Chinese characters, and its output is not as accurate as whispercpp.
So, is there any difference between pywhispercpp and whispercpp? The version of whispercpp I used is 1.7.1, released four days ago, so I wonder pywhispercpp has not bound to latest one yet?
@zillionare, how did you install pywhispercpp, through pip or from source ?
can't remember exactly and can't find by history command( weired). But I should follow the readme, so it is probably pip install pywhispercpp.
yeah, the pypi version is very old, I am planning to release a new version soon. Please compile it from source for now and let me know if you still have issues. Make sure to remove the old pypi version or create a new virtual env.
Hi, does the master branch update to date now?
THIS is the only whipser.cpp bind that looks like good.
Hi, does the master branch update to date now?
THIS is the only whipser.cpp bind that looks like good.
Hi @MonolithFoundation, The PYPI wheels are up to date with the main branch.
Hi,is there any way to set language='en' or other lans same as transformers whisper pipeline?
it can be achieved by sepcific some decoder id
Hi,is there any way to set language='en' or other lans same as transformers whisper pipeline?
it can be achieved by sepcific some decoder id
Yes, you can set the language parameter in the transcribe function to any language code supported by whisper.
Take a look at the docs to see all the parameters you can use.
hi, another question would be, what if i have VAD already, how to transcribe without timestamp output?
hi, another question would be, what if i have VAD already, how to transcribe without timestamp output?
Each segment output has t0, t1 and text; if you are using a VAD, you can use the text attribute and ignore the timestamps very simply.
thanks so much.
I have a Chinese finetune whisperv3-turbo model from community, do u know why it can not inference with pywhispercpp?
(the offcial turbo model is ok).
https://huggingface.co/BELLE-2/Belle-whisper-large-v3-turbo-zh-ggml/tree/main
This load got some key errors. It's the ggml version too old or pywhispercpp too old?
@MonolithFoundation, Is it working with the actual version whisper.cpp ? if not then maybe your ggml is too old. Otherwise please open a new issue with the errors you are getting.
I suspect that the ggml model version might be too old. Is there any tool that can convert this ggml to the newest version? Or can pywhispercapp directly load the pth model (or the transformers version) and convert it to ggml upon first loading?
pywhispercpp cannot load pt models directly, but the conversion script is already available in the whisper.cpp repo, you can use it to convert that model and use it with pywhiserpercpp.