pndurette / gTTS

Python library and CLI tool to interface with Google Translate's text-to-speech API
http://gtts.readthedocs.org/
MIT License
2.26k stars 361 forks source link

Timestamps of the spoken words #398

Closed olgabaranov closed 11 months ago

olgabaranov commented 1 year ago

Is it possible to retrieve the timing of the spoken words from the gtts itself? (Like the ones that will be used in srt subtitle files, though I don't care about the exact format) I know that there might be hacky ways of speech-to-text'ing it back or splitting text into separate word, but I would prefer not to go this route.

pndurette commented 1 year ago

Sorry for the delay— Yeah, hmm that would be pretty difficult for what this library does (which is request a byte stream and saving it to a file), so there's nothing really that it could directly do for this, since it's not really aware of the resulting data.