TTS cached

by Eugen Gez

Version 6 (July 28, 2020)

Download (80 downloads)

A simple text-to-speech flow with a cache feature.

TTS engines sometimes need a little bit more time to process some texts. It also makes no sense to process the same text again and again. This flow builds a unique file path from the text and, if it does not exist yet, uses the "Speak to file" block to create a wav file containing the spoken text.

Start this flow from another one and it will speak the payload using default language and TTS engine.

To force a non-default language, prefix the text with a language code followed by hash character, just like:
"de_DE#Sprich deutsch!"
"en_GB#Speak english!"

Limitations: You cannot directly wait until it's finished. Use "Fiber stopped?" block as workaround.

Changelog:
2020-07-28:
- Accept arrays of texts as well.
2019-06-09:
- Added queuing to avoid parallel processing.
NOTE: This brakes the "Fiber stopped?" workaround if you rely on.
2017-12-03
- Create cache directory if missing.
- Limit file name length.
2017-11-30
- Support optional language override.

4.0 average rating from 2 reviews

5 stars
1
4 stars
0
3 stars
1
2 stars
0
1 star
0
Reports
0

Rate and review within the app in the Community section.