ILikeAI / AlwaysReddy

AlwaysReddy is a LLM voice assistant that is always just a hotkey away.
MIT License
669 stars 69 forks source link

faster-whisper with multilingual #77

Closed RailWar closed 2 months ago

RailWar commented 2 months ago

There is new version of faster-whisper (but is has same version 1.0.3) on https://github.com/SYSTRAN/faster-whisper. It has a new parameter 'multilingual'. How can I update current package in vent/Lib/site-packages from sources?

Jobus0 commented 2 months ago

To update faster-whisper, navigate to the AlwaysReddy folder in your terminal/console, then enter this:

Windows: venv\Scripts\python.exe -m pip install --upgrade faster-whisper

Linux: venv\bin\python -m pip install --upgrade faster-whisper

But just so you know, that new 'multilingual' parameter is specifically for when there are more than one language in a single recording.

If you just want to use Whisper in a different language than English, just set WHISPER_MODEL in your config.py to one of the multilingual models. The default is tiny.en. If you just remove the ".en" suffix, it will understand other languages too. Also no need to update the package for this.

For reference:

Size Parameters English-only model Multilingual model
tiny 39 M tiny.en tiny
base 74 M base.en base
small 244 M small.en small
medium 769 M medium.en medium
large 1550 M N/A large
RailWar commented 2 months ago

I want to try the network instead of an Italian teacher. My native language is Russian. When I speak Italian, even with the tiny or base model, it says that it is English. I changed config.py and faster_whisper_client.py to specify the language. But it seems to me that using the multilingual parameter you can get better results.

RailWar commented 2 months ago

Unfortunately, upgrade faster-whisper installed the same version of the package. I would like it from https://github.com/SYSTRAN/faster-whisper

RailWar commented 2 months ago

however, I still don’t know if this version with two languages ​​will help me

Jobus0 commented 2 months ago

First remove the old version

Windows: venv\Scripts\python.exe -m pip uninstall faster-whisper

Linux: venv\bin\python -m pip uninstall faster-whisper

Then install directly from the git repo

Windows: venv\Scripts\python.exe -m pip install git+https://github.com/SYSTRAN/faster-whisper.git

Linux: venv\bin\python -m pip install git+https://github.com/SYSTRAN/faster-whisper.git

RailWar commented 2 months ago

Thank you. It works. Always Reddy works without errors with the new version of faster-whisper. Now I will see how it will work with two languages. It would also be great if Piper TTS or another could speak two languages