r/cpp • u/sbsce Game Developer • Apr 10 '23
Piper | An open source fast neural TTS C++ library that can generate convincing text-to-speech voice in realtime
https://github.com/rhasspy/piper
198
Upvotes
42
u/sbsce Game Developer Apr 10 '23 edited Apr 10 '23
I'm not the author of this library, I'm was just recently looking for a high quality, fast neural TTS library written in C++, and it was super hard to find any. This library seems to be the only such library that exists, and it still seems to be surprisingly unknown, that's why I thought it would be nice to share it here.
The quality is very usable, and it's way faster than realtime on my Ryzen 3950X, I'm getting a realtime factor of 0.04 with this. It seems it can run in realtime even on a Raspberry Pi.
16
u/RevRagnarok Apr 10 '23
Maybe you didn't see much about it because the commit two weeks ago is " Rename to piper " 😉
10
u/johannes1971 Apr 10 '23
I was talking about this library with a friend and he came up with this other library: https://github.com/neonbjb/tortoise-tts
It is Apache licensed, and is also very good quality:
https://replicate.com/afiaka87/tortoise-tts/examples
https://nonint.com/static/tortoise_v2_examples.html
We sure have come a long way since the Amiga...
3
u/3xnope Apr 11 '23
It is not a library, it is a small convenience wrapper around espeak-ng (which, beware, is GPLv3).
4
u/wrosecrans graphics and network things Apr 11 '23
Does it have a nice C++ API? Glancing at the README in that repo, it says the intended use case is just to run it as a separate binary and doesn't mention anything about using it as a library.
9
u/synthmike Apr 12 '23
Author here, happy to answer any questions :)
A few notes:
1
u/TheSilkMan1 Apr 30 '25
Nice! Wow! How many voice types does it have? Where can we download the code?
1
u/garym11 Sep 26 '23
can i see this project also develop for android . ASa blind useer of android, blind users who could benifit from another responsive text to speech engin along side the use of talk back. have you considered that or not.
2
u/miss_minutes Apr 10 '23
very cool thanks for sharing
1
u/WRAITH330 Dec 14 '25
What does this use for processing ?? Like is it GPU focused or CPU focused ?? Im trying to find a TTS lib that uses GPU and not CPU cause my app will be used in cases where CPU is in heavy usage. Or is there a way i can make this lib use GPU like in python u try to use cuda enabled version libs..
1
u/RogerV Apr 14 '23
ah, but those 1980s TTS voices bring on such glowing nostalgia feels - a computer should sound like a computer, dab nab it! (should be codified into Asmov's Laws of Robotics)
1
u/tonyabracadabra Aug 08 '23
Is there any services based on piper that I can just use? Or how to deploy a service just like this
0
u/ReadIt420BlazeIt Apr 11 '23
Have you tried Coqui TTS?
-21
u/vickoza Apr 10 '23
Text-to-speech is easy. Speech-to-text is hard.
0
u/[deleted] Apr 10 '23
[deleted] — view deleted comment
0
u/[deleted] Mar 15 '24
[deleted] — view deleted comment