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.6k stars 158 forks source link

skip translation #47

Closed benshgit closed 1 year ago

benshgit commented 1 year ago

I don't want to translate the subtitles. I only want the project to read out the subtitles with Azure. So, I set skip_translation = True in config.ini file. In my expectation, the project then won't ask me to provide the Google API key (cloud_secrets_file.json) and the DeepL API key, but it still require me to provide the Google API or the DeepL API. Would the author of this project please help me?

ThioJoe commented 1 year ago

Hm I'll have to look

ThioJoe commented 1 year ago

Can you post the actual error message that comes up?

benshgit commented 1 year ago

I set tts_service = azure in cloud_service_settings.ini I set azure_speech_key = 4633**3a I set skip_translation = True in config.ini I set enabled_languages = 11 in cloud_service_settings.ini The subtitles.srt (Chinese) and video.mp4 files are in the same directory as main.py

Then I run python main.py It gives me the following message:

----- Beginning Processing of Languages ----- Traceback (most recent call last): File "E:\Auto_Dubs-0.9.2\main.py", line 258, in batchSettings = translate.set_translation_info(batchSettings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Auto_Dubs-0.9.2\translate.py", line 245, in set_translation_info langSupportResponse = auth.DEEPL_API.get_target_languages() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Benjamin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\deepl\translator.py", line 1141, in get_target_languages self._raise_for_status(status, content, json) File "C:\Users\Benjamin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\deepl\translator.py", line 560, in _raise_for_status raise AuthorizationException( deepl.exceptions.AuthorizationException: Authorization failure, check auth_key

benshgit commented 1 year ago

Sorry: I set enabled_languages = 11 in batch.ini

ThioJoe commented 1 year ago

Sorry: I set enabled_languages = 11 in batch.ini

You mean you got it working? Or are you still having the issue?

benshgit commented 1 year ago

I am still having the issue.

I set tts_service = azure in cloud_service_settings.ini I set azure_speech_key = 4633**3a I set skip_translation = True in config.ini I set enabled_languages = 11 in batch.ini The subtitles.srt (Chinese) and video.mp4 files are in the same directory as main.py

Then I run python main.py It gives me the following message:

----- Beginning Processing of Languages ----- Traceback (most recent call last): File "E:\Auto_Dubs-0.9.2\main.py", line 258, in batchSettings = translate.set_translation_info(batchSettings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Auto_Dubs-0.9.2\translate.py", line 245, in set_translation_info langSupportResponse = auth.DEEPL_API.get_target_languages() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Benjamin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\deepl\translator.py", line 1141, in get_target_languages self._raise_for_status(status, content, json) File "C:\Users\Benjamin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\deepl\translator.py", line 560, in _raise_for_status raise AuthorizationException( deepl.exceptions.AuthorizationException: Authorization failure, check auth_key

ThioJoe commented 1 year ago

The line at the bottom describes the error, and it looks like it might be an issue with authorizing with the DeepL API. Do you have a DeepL account and API key?

benshgit commented 1 year ago

I have not a DeepL API key, and it is the reason that I don't want your project to translate subtitles. I just want your project to read out the subtitles, so I set skip_translation = true in config.ini file, but it still requires me to provide translate API. This is the issue.

ThioJoe commented 1 year ago

Ah ok yea that's an issue I'm aware of, I'll get around to fixing it at some point

benshgit commented 1 year ago

thank you very much. the deepL doesn't support credit card from China, so I am not able to apply a deepL API. I'm waiting you to make the project skip translation.

ThioJoe commented 1 year ago

Ok with the latest release 0.11.1, this should be fixed.