fonoster icon indicating copy to clipboard operation
fonoster copied to clipboard

Use cache files instead of regenerating tts

Open psanders opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe.

Fonoster Voice could benefit from re-using the files generated by a TTS Engine. It will make things faster and reduce costs for the users.

Describe the solution you'd like

The Voice server could maintain a list (perhaps in memory). The list should be a hash of the parameters used to create the transcriptions.

Also, consider storing the following information to be able to filter out aged entries.

{
 "path": "/etc/tts/618572e3ec11d10600000001.wav",
 "format": "wav",
 "ttl": "24h",
 "createAt": 1651601950221 
}

After that, all that is left is to check every request by the Say verb and serve the file from the disk.

Describe alternatives you've considered

No.

Additional context

Related feature: https://github.com/fonoster/fonoster/issues/260

psanders avatar May 03 '22 18:05 psanders