Read aloud text with Google Text To Speak How to measure a rough speech time. I wrote an article because I had to give a speech for 3 minutes recently and I needed to find out how long it would take to read the manuscript roughly. First at the terminal
Put the voice reading package in and create an mp3 file with the reading function of hello.txt that describes the text. Since the file has the entire time information (how many minutes will it be displayed in the music app?) You can check the rough reading time of the 3-minute speech manuscript.
from gtts import gTTS
f = open('hello.txt','r',encoding="utf-8")
data1 = f.read() #Returns the data read all the way to the end of the file
f.close()
tts = gTTS(text=data1, lang='ja')
tts.save("good.mp3")
Recommended Posts