Closed Tizioincognit0 closed 2 years ago
Hi,
I updated the Readme with known limitation, such as the fact that text have to be on a single line
P.S: I also added a print indicating when it fails. In your example it as at line 44 where the text starts a second line
[0:02] Decoding of enVI0JT-11.wav.tmp.mp3 finished.
Error at line 44 in /data/01.srt
Traceback (most recent call last):
File "/subtitle_to_speech.py", line 116, in <module>
scriptine.run()
File "/usr/local/lib/python2.7/site-packages/scriptine/command.py", line 196, in autocmds
add_verbosity_option=add_verbosity_option)
File "/usr/local/lib/python2.7/site-packages/scriptine/command.py", line 105, in parse_and_run_function
return function(*args[:len(required_args)], **kw)
File "/subtitle_to_speech.py", line 50, in convert_str_to_wav_in_docker_command
tempo=tempo,
File "/subtitle_to_speech.py", line 102, in convert_str_to_wav_command
raise e
ValueError: invalid literal for int() with base 10: ''
When I'm triyng to convert to voice the Italian subtitle file which I attached to this issue, I get the following error. I'm using macOS Monterey 12.0.1. ` [0:01] Decoding of itD6WT6-10.wav.tmp.mp3 finished. /usr/local/lib/python2.7/site-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host 'translate.google.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning, High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3 version 1.25.10; written and copyright by Michael Hipp and others free software (LGPL) without any warranty but with best wishes
Directory: /tmp/
Terminal control enabled, press 'h' for listing of keys and functions.
Playing MPEG stream 1 of 1: itD6WT6-11.wav.tmp.mp3 ...
MPEG 2.0 L III cbr32 24000 mono
[0:02] Decoding of itD6WT6-11.wav.tmp.mp3 finished. Traceback (most recent call last): File "/subtitle_to_speech.py", line 128, in
scriptine.run()
File "/usr/local/lib/python2.7/site-packages/scriptine/command.py", line 196, in autocmds
add_verbosity_option=add_verbosity_option)
File "/usr/local/lib/python2.7/site-packages/scriptine/command.py", line 105, in parse_and_run_function
return function(*args[:len(required_args)], *kw)
File "/subtitle_to_speech.py", line 50, in convert_str_to_wav_in_docker_command
tempo=tempo,
File "/subtitle_to_speech.py", line 105, in convert_str_to_wav_command
delay = ((int(timming[0:2]) 60 + int(timming[3:5])) * 60 + int(timming[6:8]))
ValueError: invalid literal for int() with base 10: ''
`
01.srt.zip