I would like to keep a record of Mycroft’s tts answers and I’m wondering if Mycroft has some tmp folder where it stores the tts output, or is it synthesized in real time?
Is there a command that would allow me to save tts output as audio in a specific directory every time Mycroft utters?
Ok I ran into a follow-up problem. Is it somehow possible to know which file Mycroft is “reading” from? Since the cache is not modified unless Mycroft says something new, I would need to somehow know when it’s reading from an already cached file, and which one.
That’s what I’d normally do but there are a few more things involved. Basically if I clear the cache sometimes the file has not yet been copied, and sometimes there’s still a tts lined up to be spoken, so I want to know if the file has been both, backed up and spoken out before cleaning it.
I sorted it with a fresh head this morning haha I just clean the oldest files in the cache and then ones created within a close range (supposedly of the same utterance) . This is definitely not the most accurate way but if I come up with something better I will post it here.
The file names of the audio cache files are hash-values of the actual phrase. Look into mycroft-core code to see how it is done, from there you should be able to identify the files.