Open kenaycock opened 9 months ago
dude, this is awesome, this is exactely what i was looking for, since what whisper understands whisper can translate, too... would be awesome to have the possibility to "translate any (understood/trained) language into any other (understood/trained) language, possible live" ..... and then use rvc/bark/voicecloning to "speak the translated to YOUR language text with the NATIVE speaker's VOICE" <3 🚀
(there are similar products, but I would love an open source solution)
Building on Yasmin Moslem's tutorial on opennmt, I made a first pass at incorporating translation into whisperlive using ctranslate2, sentencepiece, and nllb-200. This is working, although it is a little slow in CPU mode on the X220 I'm using.
There are two insertions within
client.py
: at the beginning to initializectranslate2.Translator
, and withinon_message
to overwrite the English transcription with the target language (see triple hash blocks).Q: Is this moving in the right direction? Interested in any suggestions to improve performance. Realtime local transcription+translation on, say, a Raspberry Pi 5 does not seem far away!