Open Nardol opened 1 year ago
The "medium" model is not available here: https://github.com/rhasspy/models/releases/tag/v1.0 It was quite large, so I didn't upload it or the large model.
You can create it yourself by following these steps: https://github.com/guillaumekln/faster-whisper#model-conversion
Before trying procedure you linked to, I've just tested with tiny-int8
to test with smaller before but with the same 404 result.
What do I do wrong?
python3 -m wyoming_faster_whisper --uri 'tcp://0.0.0.0:10300' --model tiny-int8 --beam-size "1" --language "fr" --data-dir ./data --download-dir ./data
Weird. Can you get the full URL it's trying for the model?
I added a print(model_url)
before the urlopen
which gave me the following:
https://github.com/rhasspy/models/releases/download/v1.0/asr_faster-whisper-FasterWhisperModel.TINY_INT8.tar.gz
The dash is replaced by a period if using model instead of model.value.
Python version 3.11.2
I have not found where the source code is to make a PR.
Ok, so this must be a difference with enums and Python 3.11. Thanks!
Hi, I had the same problem as @Nardol. @synesthesiam , as you said, this is a difference in Python 3.11 where you now have to replace:
model_url = URL_FORMAT.format(model=model)
with
model_url = URL_FORMAT.format(model=model.value)
in download.py (in download_model
)
As @Nardol , I also didn't find the source code to make a PR. Could you point us to where it is? Even if you've probably already fixed this, it would be nice to know where it is, just in case someone wants to submit some other fix/improvement.
Thanks!
Hi, I had the same problem as @Nardol. @synesthesiam , as you said, this is a difference in Python 3.11 where you now have to replace:
model_url = URL_FORMAT.format(model=model)
withmodel_url = URL_FORMAT.format(model=model.value)
in download.py (indownload_model
)As @Nardol , I also didn't find the source code to make a PR. Could you point us to where it is? Even if you've probably already fixed this, it would be nice to know where it is, just in case someone wants to submit some other fix/improvement.
Thanks!
I'm answering since no one did. The source code is sitting over in the v0.1.0 branch. It can be found here: https://github.com/rhasspy/rhasspy3/blob/v0.1.0/programs/asr/faster-whisper/script/download.py
Ok, so this must be a difference with enums and Python 3.11. Thanks!
That's spot on, tested using the following reproducer. Should be patched to use the value
accessor as indicated by @antlarr. The code is on the wyoming-v1
branch.
from enum import Enum
URL_FORMAT = "https://github.com/rhasspy/models/releases/download/v1.0/asr_faster-whisper-{model}.tar.gz"
class FasterWhisperModel(str, Enum):
"""Available faster-whisper models."""
TINY = "tiny"
TINY_INT8 = "tiny-int8"
BASE = "base"
BASE_INT8 = "base-int8"
SMALL = "small"
SMALL_INT8 = "small-int8"
MEDIUM = "medium"
MEDIUM_INT8 = "medium-int8"
tiny = FasterWhisperModel.TINY
print(URL_FORMAT.format(model=tiny))
print(URL_FORMAT.format(model=tiny.value))
$ python3.8 enumtest.py
https://github.com/rhasspy/models/releases/download/v1.0/asr_faster-whisper-tiny.tar.gz
https://github.com/rhasspy/models/releases/download/v1.0/asr_faster-whisper-tiny.tar.gz
$ python3.9 enumtest.py
https://github.com/rhasspy/models/releases/download/v1.0/asr_faster-whisper-tiny.tar.gz
https://github.com/rhasspy/models/releases/download/v1.0/asr_faster-whisper-tiny.tar.gz
$ python3.10 enumtest.py
https://github.com/rhasspy/models/releases/download/v1.0/asr_faster-whisper-tiny.tar.gz
https://github.com/rhasspy/models/releases/download/v1.0/asr_faster-whisper-tiny.tar.gz
$ python3.11 enumtest.py
https://github.com/rhasspy/models/releases/download/v1.0/asr_faster-whisper-FasterWhisperModel.TINY.tar.gz
https://github.com/rhasspy/models/releases/download/v1.0/asr_faster-whisper-tiny.tar.gz
$ python3.12 enumtest.py
https://github.com/rhasspy/models/releases/download/v1.0/asr_faster-whisper-FasterWhisperModel.TINY.tar.gz
https://github.com/rhasspy/models/releases/download/v1.0/asr_faster-whisper-tiny.tar.gz
I post it here because Python package index website indicate this repository for home page so first of all, sorry if it is the wrong place.
I would like to test Whisper using Wyoming. I use Home Assistant core installation, so I have not Docker for anything. Having Docker installed only for one thing does not look reasonable for me, so I try to install Wyoming Whisper manually.
I looked into the add-on code to see how Wyoming Whisper installed and made the following on my side:
But when running the last command, I have the following:
How it could work for the add-on but not manually? And how could I solve this? I also posted a topic on Home Assistant community but it looks like I am alone to do that kind of setup :slightly_frowning_face: