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

[BUG] AttributeError: 'MosesTokenizer' object has no attribute 'split' #7

Closed
AmgadHasan opened this issue Aug 3, 2023 · 3 comments
Closed

Comments

@AmgadHasan
Copy link

AmgadHasan commented Aug 3, 2023

Hello again.

I managed to run the server. However, I got this error when I was translating foreign audio into English:

  File "/home/eng_amghasan/whisper_streaming/whisper_online_server.py", line 215, in <module>
    proc.process()
  File "/home/eng_amghasan/whisper_streaming/whisper_online_server.py", line 186, in process
    o = online.process_iter()
  File "/home/eng_amghasan/whisper_streaming/whisper_online.py", line 276, in process_iter
    self.chunk_completed_sentence()
  File "/home/eng_amghasan/whisper_streaming/whisper_online.py", line 322, in chunk_completed_sentence
    sents = self.words_to_sentences(self.commited)
  File "/home/eng_amghasan/whisper_streaming/whisper_online.py", line 376, in words_to_sentences
    s = self.tokenizer.split(t)
AttributeError: 'MosesTokenizer' object has no attribute 'split'
whisper-server-INFO: killing process 138718
@Gldkslfmsd
Copy link
Collaborator

hello,

have you installed the intended version? pip install opus-fast-mosestokenizer

@AmgadHasan
Copy link
Author

hello,

have you installed the intended version? pip install opus-fast-mosestokenizer

Yeah it works! Thanks
Maybe it's a good idea to create a requirements.txt file that contains librosa + the right version of moses tokenizer?
I'll open a pr.

@lucasjinreal
Copy link

has anyone able to install opus-fast-mosestokenizer on macOS?

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

3 participants