SnipsSuperTTS, one script to rule them all



Ever wanted to use an online TTS but go back to offline in case internet goes off? Ever wanted your assistant to be able to use Amazon or Google or pico, at the same time? Well, search no further, this is now possible!

"Unknown value type" with customtts
Change voice feedback to german

Amazing works dude !!!

Do you have some feedback on any delay implied by using online TTS ?
Voices are for sure faaaaar better than pico default snips, but even a few seconds delays would really hurt.



Well, for now Google Wavenet seems to have more delay than Amazon Polly. You can count with 2 seconds delay, if the file is not yet cached

All the things you assistant says gets cached and reused for instant speaking if available.


Yes I saw your caching implementation.

But my TTS is done by scripts to generates different sentences each time regarding different stuff (person seen, time, working/holidays, weather etc etc) so caching wouldn’t give me much.


I have a random talk generator too, and personalization, but caching is still useful :slight_smile:


Really nice! My only thoughts are that I would enable ssml by default since it doesn’t hurt anything if there are no ssml tags but allows you to use ssml if you want. The jokes are funnier if you can add some tweaks! :-). For amazon and google you can also then use to fetch and speak arbitrary audio from the interwebs

For the same reason I might add an espeak option since espeak supports most ssml tags whereas pico does not at all.


ssml would rocks for sure. Playing audio files isn’t of much interest for me, but stuff like <prosody>, <emphasis>, <say‑as>, and <break> , all that with a more natural voice like wavenet, would just put snips to life :cry:


Of course, but I’m sending ssml directly from snips in the text. It’s not done for wavenet because I have troubles with it. It here to evolve, gladly, I just needed it ready and working with polly for next week maker faire :slight_smile:


Have you had a look at as a local TTS solution?


+1 SSML (plus twenty characters to fullfill my requirements to post ;))


Ok, upon checking, I have pushed the ssml version of it already… Amazon has the tags on, up to you to send your strings with ssml. The Google part hasn’t, because I always ended up with faulty string response from google. I’ll fix it asap.

Re Mycroft, no, I did not check it, but can easily add the support for it as well

  • ssml support added for google and cleaned for amazon


Added Mycroft support


OK. I’m doing something wrong here. I’ve got it set up, and when I try to run the script from the command line it works fine and creates and saves a file (and confirmed using _snips user too). Only using mycroft at the moment

~/snipsSuperTTS/ "test.wav" "mycroft" "%%LANG%%" "US" "ksp" "FEMALE" "hello there - this is working" "10"

However when I use Snips it’s using the default voice.

provider = "customtts"
customtts = { command =  ["/home/pi/snipsSuperTTS/" "%%OUTPUT_FILE%%" "mycroft" "%%LANG%%" "US" "ksp" "FEMALE" "%%TEXT%%" ""] }

My responses are called from scripts mainly, for example:

hermes.publish_end_session(current_session_id, "Turning " + myState + " " + myDeviceName)

Have I missed something fundamental here?

(For completness of info - I removed all non-mycroft code in my investigation. My current superscript is a rather basic:



function mycroft() {
    text=$(sed 's/<[^>]*>//g' <<< "$text")
    ."$mycroftPath"/mimic -t "$text" -o "$outfile" -voice "$mycroftPath""/voices/cmu_us_""$voice"".flitevox"



You reloaded snips right? I mean, after editing snips.toml? sudo systemctl restart snips-* I’d imagine so, but I prefer to ask


If you’re building Mycroft mimic on a raspberry device and run out of memory while building like I did, you should increase the swap size in /etc/dphys-swapfile. It’s only 100MB by default and easily runs out.


Thanks! Added to gist!


Try to follow the instructions to install mycroft, but I already stuck at

./ --prefix="/usr/local"

The command ends with

inflating: pcre2-10.23/
patching file src/pcre2grep.c
./ 59: ./ autoreconf: not found

Any hint what I am doing wrong.


Requirements installed? sudo apt-get install gcc make pkg-config automake libtool libasound2-dev

I see I missed mentionning them on the gist


Thank you. That did it. I got microft running.
Nevertheless, I do not find the mentioned mycroft.conf file to change the language to German.
Do you know how to proceed?

Thank you in advance and a happy new year.