Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what's the cpp version pywhispercpp bind to? #73

Open
zillionare opened this issue Oct 11, 2024 · 3 comments
Open

what's the cpp version pywhispercpp bind to? #73

zillionare opened this issue Oct 11, 2024 · 3 comments

Comments

@zillionare
Copy link

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:

  1. same prompt: "好,我们开始上课。请输出简体中文,以下是专有名词“ (means: ok, let's start the lesson. Please output zh-cn, not zh-tw"
  2. 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
  3. 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?

@abdeladim-s
Copy link
Owner

@zillionare, how did you install pywhispercpp, through pip or from source ?

@zillionare
Copy link
Author

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.

@abdeladim-s
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants