Closed stevieoj closed 6 years ago
Sorry, just seeing this post. So that doesn't have to do with longer words, it is used to deal with longer responses. Since the STT API sends back transcripts in varying lengths, this code splits those in half if they are too long. I did this because if the line is too long the subtitles take up too much space in the video and start to block the content. It essentially limits the size of the subtitles to about two lines of text. I don't believe this works with all cases but it was pretty effective for what I was doing with the program.
https://github.com/Naki21/google-speech-to-text/blob/5b7c6365f21b43f42bc804f16e6fbc4f2a6998fe/format_response.py#L43
I find your work here helpful, but i'm not very sure what you did for longer words and why?