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

Some Azure dll error #30

Closed Wolterhon closed 1 year ago

Wolterhon commented 1 year ago

Good day. I get this when I try to run the script (I tried to follow all the requirements and instructions as close as possible). My Python version is 3.9 as the readme.md of this repo suggested.


------- 'Auto Synced Translated Dubs' script by ThioJoe - Release version 0.7.0 -------
Traceback (most recent call last):
  File "C:\Users\Andrey\Downloads\Auto-Synced-Translated-Dubs-main\main.py", line 13, in <module>
    import TTS
  File "C:\Users\Andrey\Downloads\Auto-Synced-Translated-Dubs-main\TTS.py", line 6, in <module>
    import azure.cognitiveservices.speech as speechsdk
  File "C:\Users\Andrey\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\cognitiveservices\speech\__init__.py", line 8, in <module>
    from .speech import *
  File "C:\Users\Andrey\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\cognitiveservices\speech\speech.py", line 13, in <module>
    from .interop import (
  File "C:\Users\Andrey\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\cognitiveservices\speech\interop.py", line 20, in <module>
    _sdk_lib = load_library.LoadLibrary(lib_path)
  File "C:\Users\Andrey\AppData\Local\Programs\Python\Python39\lib\ctypes\__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "C:\Users\Andrey\AppData\Local\Programs\Python\Python39\lib\ctypes\__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Users\Andrey\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\cognitiveservices\speech\Microsoft.CognitiveServices.Speech.core.dll' (or one of its dependencies). Try using the full path with constructor syntax.```
What can I do about this?
bolshoytoster commented 1 year ago

@Wolterhon does this comment from a similar issue help?

Wolterhon commented 1 year ago

@Wolterhon does this comment from a similar issue help?

Yep, I had to install 'Microsoft Visual C++ Redistributable'. For some reason they're not a requirement in the readme. Now I have this error: <HttpError 403 when requesting https://translation.googleapis.com/v3beta1/projects/hlepme:translateText?alt=json returned "Cloud IAM permission 'cloudtranslate.generalModels.predict' denied.". Details: "Cloud IAM permission 'cloudtranslate.generalModels.predict' denied. "> I probably did something wrong so I'll try to troubleshoot it myself for now. I did add myself as a test user, but I did it a minute ago, I think I'll have to wait for it to update or something.

bolshoytoster commented 1 year ago

@Wolterhon it says permission denied so it's probably to do with the google cloud account.

Wolterhon commented 1 year ago

@Wolterhon it says permission denied so it's probably to do with the google cloud account.

Yeah, but what exactly? I am 100% sure I did everything right. I still have this error though.

bolshoytoster commented 1 year ago

@Wolterhon you could try looking at the second half of this stackoverflow answer.

Wolterhon commented 1 year ago

@Wolterhon you could try looking at the second half of this stackoverflow answer.

I tried to troubleshoot all of this myself and I stumbled upon both this stackoverflow page and the issue from your comment above. For some reason I decided to skip them both cause surely it can't be the problem, right? 🤡 Again, for some reason the IAM & Admin is not in the readme / on the wiki of this repo, which is pretty strange. I had to add my other Google account (probably other is the key word) as a project owner, and then the problem disappeared. I thought that it'd be enough to add it as a tester to the OAuth thing. Now that I think about it I guess it's me with my two-account setup and not this project's wiki/readme. Finally I was able to run it and everything's just fine. Thank you so much for your help.