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

HTTPError during runninf main.py #42

Closed a-russkikh closed 1 year ago

a-russkikh commented 1 year ago

Hi! Could someone help me with this error please?

----- Beginning Processing of Languages ----- ----- Beginning Processing of Language: es-MX ----- Translating text using Google...

raise HttpError(resp, content, uri=self.uri)

googleapiclient.errors.HttpError: <HttpError 400 when requesting https://translation.googleapis.com/v3beta1/projects/sasa:translateText?alt=json returned "Empty request.". Details: "[{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'field': 'contents', 'description': '_**No text contents provided.'}]}]">_**

image

ThioJoe commented 1 year ago

Can you provide your original srt file?

a-russkikh commented 1 year ago

PFA, I made it manually by the way. But I used a template from another srt file.

subtitles.zip

Can you provide your original srt file?

ThioJoe commented 1 year ago

Ah, those subtitles don't appear to have the correct format for the timestamps.

See this article

The timecode format used is hours:minutes:seconds,milliseconds with time units fixed to two zero-padded digits and fractions fixed to three zero-padded digits (00:00:00,000). The fractional separator used is the comma, since the program was written in France.