#Piper TTS Cache with External Server

1 messages · Page 1 of 1 (latest)

wild lion
#

I’m running Piper TTS on an external server and it seems like it only works through the Home Assistant UI, not via YAML.
I want to disable the cache so messages aren’t stored, but I can’t find any option in the UI to do this globally.

Am I wrong, or is there really no way to turn off caching for an external Piper server in the UI?
Any suggestions or workarounds would be appreciated!

Thanks!

marsh basin
#

as for a work around... if you really wanted to i guess you could make an automation that triggers off the piper entity changing (meaning its been used) that calls tts.clear_cache.
although you will need to put in a short delay so the generated file can be used before you delete it

wild lion
marsh basin
#

the file has to be written at least once anyway

#

so if anything your causing more wear by not caching because in cases of the same response its rewriting instead of using a cached version.
as for storage. i think it auto cleans itself on occasion to prevent that being an issue. but the files are pretty small anyway.

#

so when you generate tts with piper it calls piper which sends it a file which it stores. that file is then made accessible on the network from the HA server. and the link is send to the voice assistant.

a voice assistant does not stream directly from the piper server it streams from the HA server which gets the files to stream from piper.

wild lion
#

i can disable the cache via configuration.yaml, but I can’t configure an external Piper server that way, only through the UI.

marsh basin
#

I believe that just means its generating a new file each time so if you have the same tts multiple times it will generate the file each time. the file is still there and written to the system

#

when a voice assistant plays tts it is streaming from a file that is on the home assistant server where that file is written and made accessible

#

what your trying to do is not a thing.

#

what are you running on with eMMC? a green i guess?

wild lion
#

yes

#

“The in-memory cache for fast responses to media players will be auto-cleaned after a short period.”
Sounds like with cache: False, TTS files are only kept in memory and not stored long-term on the filesystem.

marsh basin
#

in the case of wyoming for a voice pipeline i dont think there is an option to keep it only in memory

wild lion
#

Ok, thanks for the help! Guess I’ll just have to live with the cache then, but really appreciate your support anyway

marsh basin
#

to be honest, unless you have like... 100 people constantly talking to it then its not going to be an issue

#

you could add a ssd to your green by usb and move your storage over to it if your really concerned...

wild lion
#

Yeah, I’ll see, maybe I’m overreacting. Thanks for the help

marsh basin