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

Potential UTF-8 / Latin-1 regression #60

Open
UsernamesLame opened this issue Sep 20, 2024 · 3 comments
Open

Potential UTF-8 / Latin-1 regression #60

UsernamesLame opened this issue Sep 20, 2024 · 3 comments

Comments

@UsernamesLame
Copy link
Contributor

UsernamesLame commented Sep 20, 2024

[2024-09-20 09:12:13,861] {model.py:132} INFO - Transcribing ...

Traceback (most recent call last):
  File "/Users/user/Desktop/whisper-metal/__main__.py", line 4, in <module>
    segments = model.transcribe('file.mp3')
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Desktop/whisper-metal/.venv/lib/python3.12/site-packages/pywhispercpp/model.py", line 133, in transcribe
    res = self._transcribe(audio, n_processors=n_processors)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Desktop/whisper-metal/.venv/lib/python3.12/site-packages/pywhispercpp/model.py", line 249, in _transcribe
    res = Model._get_segments(self._ctx, 0, n)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Desktop/whisper-metal/.venv/lib/python3.12/site-packages/pywhispercpp/model.py", line 154, in _get_segments
    text = pw.whisper_full_get_segment_text(ctx, i)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 57-58: invalid continuation byte

I think we have a regression!

Originally posted in #59 (comment)

Just generating a separate issue so we don't disrupt that thread. @abdeladim-s I'm assuming this has something to do with dropping pydub. Are we not normalizing values anymore?

@UsernamesLame
Copy link
Contributor Author

Uninstalled pywhispercpp I installed from git and re-installed from pip, and the regression is gone, but so is CoreML.

Also CoreML is a lot slower than CPU inference on M1 Pro in macOS Sequoia.

@UsernamesLame
Copy link
Contributor Author

@abdeladim-s Wanna follow up on this? or should I consider it a one off?

@abdeladim-s
Copy link
Owner

@UsernamesLame, I though you were following in #59, the issue was that the dylib files were not included in the wheel.
I think the new build resolved the issue!

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