TL;DR;
I want to check if there is already a cache TTS file for my sentence. This shouldn’t be too hard to write in python, but there likely are people that are way better in creating that than I am. So, before I create a script i wonder if someone has a script that checks the availability of the TTS file and returns the result?
Full story
Based on the situation I like to increase the volume of a speaker during the TTS. The situation, when a member of a group that I can unjoin or when the speaker isn’t playing anything.
For as far as I know it’s not possible to detect if TTS is finished talking, so I calculate 0.51s per word, rounded to ‘ceil’ if the text is cached, and 0.8 when it’s not cached (in my case when I cache=false
).
I like to catch the scenario in which cache=true
, but the file is not already there. For as far as I know, there is no build in check for the cache file that “we” can use and since the filename is build using a SHA1 of the sentence with a postfix, this shouldn’t be too hard I guess.
I aim to write a script with the inputs sentence
and postfix
and that returnes true/false depending on the availability of the file.
I am planning this for the weekend and once succeeded I will of course post/share the result for feedback and for others to use.