rany2 / edge-tts

Use Microsoft Edge's online text-to-speech service from Python WITHOUT needing Microsoft Edge or Windows or an API key
https://pypi.org/project/edge-tts/
GNU General Public License v3.0
4.24k stars 447 forks source link

A strange reminder #123

Closed zqq-nuli closed 10 months ago

zqq-nuli commented 11 months ago

cmd = "edge-tts --text '{}' --write-media '{}' --voice '{}' --write-subtitles '{}' -y".format(str(clean_text), save_path, model, save_vtt)

I used os. system to run this command in this way, but he prompted me:

Warning: TTS output will be written to the terminal. Use --write-media to write to a file. Press Ctrl+C to cancel the operation. Press Enter to continue.

It seems like it's because of my clean_ I have limited the length of the text field to no more than 7000 words due to the problem caused by the length being too long

May it be due to the presence of Chinese quotation marks in my text?

zqq-nuli commented 11 months ago

I want to use Python to call edge tts, but I couldn't find the option to generate subtitles. At first, there was no problem, but after using it for a period of time, this problem occurred. I don't know if anyone can provide me with a solution, and I am willing to pay for it

rany2 commented 11 months ago

@zqq-nuli please put the text in a file and have edge-tts read the file using --file instead of --text with the argument being the file path containing the text instead of the text itself.

rany2 commented 10 months ago

If you still have this issue, please let me know.