ThioJoe / Auto-Synced-Translated-Dubs

Automatically translates the text of a video based on a subtitle file, and then uses AI voice services to create a new dubbed & translated audio track where the speech is synced using the subtitle's timings.
GNU General Public License v3.0
1.56k stars 156 forks source link

MacOS support? #79

Closed MyEnthusiastic closed 7 months ago

MyEnthusiastic commented 10 months ago

You'll need the binaries for a program called 'rubberband' ( https://breakfastquay.com/rubberband/ ) . Doesn't need to be installed, just put both exe's and the dll file in the same directory as the scripts.

For this information, what should I do for the MacOS for this dependency?

ThioJoe commented 9 months ago

Right now that particular functionality would be windows only. However, if you use Azure for the speech generation, that can directly control the speech speed so you shouldn't need Rubberband at all in that case

ghost commented 9 months ago

I am still a little confused, cuz I use macOS, and it seems that I have to use google cloud as a API. Do I have to and make it accompany with Google translate?

ThioJoe commented 9 months ago

So basically there's 3 relevant processing stages: the translation, the speech synthesis, and the audio stretching. Google translate is required for the translation part. You could use DeepL (I forget if you can use DeepL exclusively without Google Translate), it's just that DeepL doesn't support as many languages.

Then for the speech synthesis, there is both Google Cloud and Microsoft Azure.

Then for the audio stretching there is the rubberband program. However, if you use Azure, it has the ability to basically do the 2nd and 3rd stage together at once, so the rubberband program is not needed when using Azure.

So at the moment if you're on macOS, your best bet right now is to use Google API for the translating, and Azure API for the speech synthesis. But that gets you higher quality results than using rubberband anyway.

There are macOS binaries for rubberband that I will take a look at and see about adding better macOS support for the future.

ThioJoe commented 9 months ago

The latest commit should make it all work equally on MacOS, you just have to download the macos version of the binaries described in the readme instructions. Also you'll want to run again pip install -r requirements.txt

ThioJoe commented 7 months ago

Closing this as fixed but let me know if there are any further issues