Excellent video, thank you Thorsten! A member of the Piper community has created a new streaming mode for Piper that I hope to get released soon. The current streaming mode only works on sentences, but his will start outputting audio in around 100 ms :)
Thanks for that information, that is actually THE feature I was waiting for. I love piper, but for a 'realtime' llm chat it takes a bit too long to process a longer text.
If somebody is trying this right now, with the current pre-release (2023.11.14-2), you'll need to add also the model config file's path to the command, or it won't work (and the worst thing is that you won't get an error message, so you won't know what's happening ^^U). Here's an example of what you'll need to input for it to work: echo "Hello, this is a test using Piper TTS." | piper.exe -m en_US-kathleen-low.onnx -c en_en_US_kathleen_low_en_US-kathleen-low.onnx.json -f test1.wav As always, thank you very much for your great videos! :D
@@ThorstenMueller sadly no, as the above user says no error message is displayed when something goes wrong, I run with --debug too and nothing i tried running ps as admin too
I love the results-driven adjustment to your script. (Seeing/hearing the end result at the beginning was great.) I've really wanted to export some of my epub books into audiobooks and this looks like one of the first steps. Thanks for all you do Thorsten.
It's great that these models are making progress. I'm still surprised that open source models have less consistency in the output than 15+ yr old model like Microsoft Zira.
Hallo Thorsten, ich muss Dir dreifach DANKEN. 1. Habe mit Piper genau die AI Anwendung gefunden die ich schon lange gesucht habe. 2. Danke für Deine super Piper Stimme und vielen danke für Deine Arbeit und Bemühungen. 3. Habe nun selber ein RU-vid Kanal und verwende dafür Deine Stimme :-) Natürlich erwähne ich Dich in jedem Video. Siehe @MundusInfo | www.youtube.com/@MundusInfo
Hallo, dann sage ich Dir dreifach GERN GESCHEHEN 😊. Es war tatsächlich eine lange Reise, bis ich mit meiner Thorsten-Voice TTS Stimme zufrieden war. Umso mehr freut es mich, wenn meine Stimme als nützlich empfunden wird.
🎯 Key Takeaways for quick navigation: - Introduction to Piper TTS - Description of Piper TTS - Link to related Piper TTS videos - Downloading the Piper TTS Windows installer - Extracting the Piper TTS files - Copying the Piper TTS files to a desired location - Checking the Piper TTS directory contents - Opening a PowerShell window - Navigating to the Piper TTS directory - Running the Piper TTS help command - Understanding the required arguments for Piper TTS - Downloading the Piper TTS English US Castline TTS model files (.onnx and .json) - Saving the downloaded TTS model files to the Downloads folder - Copying the downloaded TTS model files to the Piper TTS directory - Echoing test text to the standard input - Piping the echoed text to the Piper TTS command - Providing the downloaded TTS model file name as an argument to Piper TTS - Running the Piper TTS command - Generating test audio using Piper TTS - Specifying output filename using the -F parameter - Observing real-time audio generation speed - Downloading a different Piper TTS voice model (English US Castline High) - Generating test audio using the new voice model and saving it as test2.wav - Observing the difference in voice quality between the two models - Creating a text file (demo.txt) with longer content - Using the cat command to pass the contents of demo.txt to Piper TTS - Generating test audio (test3.wav) from the contents of demo.txt - Recap of the process for using Piper TTS on Windows - Encouragement to subscribe to the Thorsten Voice RU-vid channel - Invitation to share feedback on the video Made with HARPA AI
Freut mich, dass Dir das Video gefällt 😊. Gute Frage wegen Untertitel Dateien. Vielleicht sollte ich mir das mal anschauen - klingt auf jeden Fall spannend 🤔. Müsste mir mal eine SRT/SBV Datei anschauen.
I wish there was just a simple download executable that would install everything on Windows 11. This seems like you'd need a degree in computer science to get it running.
I guess a solid computer knowledge is not too bad to get it set up. Maybe there will be more easy ways to set it up in future - but i guess it's not too soon on their roadmap. Maybe ask on an easier way on Piper github community to get it more into the spotlight.
Thanks for the video! Any suggestions on introducing better natural pauses within the text to slow down voice? It doesn't seem to respond much to commas and periods.
hey there thorsten i just came across your channel and it so amziang i get the stuffs i as looking for ,these tts model but i have a question iis there a one where he nvidia graphics card is not necessary and it sounds very much human like with easy setup and probably a ui. thank you
It gets 5 stars from me due to simple install and running. Voices are pretty ok, certainly good enough for what what I wanted to use it for. Now for the next challenge. How to create new voices for it. :) - Would have been cool if there was some online tool for it.
I guess you already know my tutorial on how to create your own cloned voice for Piper TTS, or 😊? ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-b_we_jma220.htmlsi=FV-6UatCjN4f8a4Z
@@ThorstenMueller , yes I have just integrated Piper-TTS in a Unity VR "sandbox" app I am working on now and it works brilliantly. Definitely need to see if I can get some more voices or train new ones although the task of creating those datasets seems rather daunting. I hope someone creates a repository of voices (even paid ones) to use with Piper-TTS as I feel it is more than good enough for a lot of applications.
Great video Thorsten! I was hoping at some point that you would explain how to implement this into a python project since the documentation is pretty limited? That would be amazing.
If this do not work for you and the one in the description does not work, try this (no * start and .\ before piper.exe) : echo "Hello, this is a test using Piper TTS." | .\piper.exe -m en_US-kathleen-low.onnx -c en_en_US_kathleen_low_en_US-kathleen-low.onnx.json -f test1.wav Also, you can right click in your folder and chose the option "open in the terminal" so you will not need to do the "cd" part to move inside your folder!
Do you know my tutorial on how to create your own AI voice with Piper TTS? ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-b_we_jma220.htmlsi=00Y1-7IS7WV514VY
Yes! I've found this video at last!! :) Thank you very much indeed, friend, for your wonderful video tutorial! Everything is clear explained. Finally, my dream is soooo close to be realized! :) (a few moments later...) Unfortunately, it cannot convert a russian (cyrillic) text to *.wav file :( Just wrote: "Real-time factor: 5.776e-321 (infer=0 sec, audio=0 sec)" and created an empty *.wav file.
Helo sir, thank you I already practice with this tutorial, succes i can make voice. wtih this TTS. I have question. write what letters or what code in the txt file, to produce a pause in the voice results. For example, I have 2 paragraphs in the text file, but between the paragraphs I want there to be a 3 second pause in the voice results. So in the audio voice file, he reads paragraph 1, then pauses 3 seconds, then reads the second paragraph again. in this example, I place code DDDD. ( but audio result , say DDDD , I want result a pause 3 second on code DDDD ) The story begins with a spaceship returning to Earth. However, the spacecraft encounters an error, causing it to crash into a forest in Malaysia. DDDD The spaceship belongs to a company called Life Foundation, led by an ambitious man named Drake. The spaceship was carrying samples of extraterrestrial life, prompting Drake to urge his team to quickly gather all the salvageable samples. DDDD Out of all the crew members found, only the pilot survived. Medical personnel quickly transported him to an ambulance. However, suddenly... DDDD Yes, an entity possessed the pilot's body and then transferred to a medical staff member. The entity saw the Life Foundation logo and intended to go to the company's location. DDDD Upon arriving at the outskirts of the city, the entity possessing the medical staff member grabbed a catfish and ate it alive, terrifying everyone around. Eventually, the local thugs approached to confront the entity. But... DDDD Feeling that its current host was no longer suitable, the entity transferred to the body of an elderly woman, instantly revitalizing her. The entity then headed to the airport to find another host bound for America, which happened to be a little girl. And thus, Venom begins.
Awesome tutorial! I followed all of the steps, but I'm running into a problem. The program runs, but it doesn't give any output. It doesn't matter if I try to stream to stdout, or if I try to write to a file. The program runs and nothing happens. Any idea what might be going wrong? I'm running the latest version on windows, btw.
Hey thorsten ! I would like to ask you, i am trying to find a free realistic male voice for tts in python (i dont mind being locally) Do you have any suggestions ??
Ich habe Piper TTS mit mycroft-ai Mimic3 verglichen und kann bei der gleichen Stimme keinen Unterschied feststellen. Gibt es irgendwelche Vorteile von Piper TTS die einen Umstieg interessant machen könnten?
IMHO Piper TTS does not yet support SSML. Maybe there's a way to add phonetical stress by adjusting eSpeak dictionary. Do you know this video? ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-493xbPIQBSU.htmlsi=XbNJcOy7JODR7ome
i would like to use piper but with my own voice, like training it with lots of audios. Im from argentina i need it to speak spanish, what i´ve seen is the hardest is the accent
hi .tnx4da hlp. question: how long can input file "demo.txt" be? and for 1 minute of high quality wav file, how much space occupied on the storage device in MegaBytes? tnx
I'm not sure if there's a hard limit on text input, but obviously it'll take more time to compute when inputting longer text. I guess disk space is really low for one minute of audio in 22kHz samplerate. Guessing 3-5 megabyte
@@faizanibrahim8320 ./piper --model en_US-libritts_r-medium.onnx --speaker 341 --sentence-silence 0.6 --length-scale 1.3 --output_file ./audiobook.wav < ./text.txt Where "--sentence-silence" is the pause in seconds after each sentence and "--length-scale" is the inversely proportional speed factor. 0.5= double reading speed, 2.0= half reading speed.
Bro how to create text to speech and voice cloning multilingual model like eleven labs and deploy it has a website or app. Can you make a video for that please ❤...
I have compared Piper TTS with mycroft-ai Mimic3 and can't tell any difference with the same voice. Are there any advantages of Piper TTS that might make a switch interesting?
Might be the reason that the developer of Mimic3 is the same as the main developer of Piper TTS 😁. Personally i'd prefer Piper TTS because there's more active development. For example there will be a streaming feature in nearer future 😊.
@@ThorstenMueller I have now experimented with it and realised that Piper is really much more advanced than Mimic3. It is faster thanks to better multi-core support (RTF 0.06 with a very old Intel i5 4670), uses only a fifth of the RAM memory, makes fewer errors, can handle larger text files and audio books with significantly more than 1,000,000 characters and, with the --model en_US-libritts_r-medium.onnx, has an incredible number of very good voices that can compete in the pronunciation quality with coqui-ai TTS. I am impressed! Thanks for the video and for pointing out Piper.
Here is an example of text file input, for example for audio books of any size: ./piper --model en_US-libritts_r-medium.onnx --speaker 341 --sentence-silence 0.6 --length-scale 1.3 --output_file ./audiobook.wav < ./text.txt (Note: -sentence-silence and --length-scale can be dropped, but for my taste the voice then speaks too fast.)
you mention "piper is It is faster thanks to better multi-core support" if i train on specific voice dataset and use case only need one type of voice will i be able to run it on a mobile device?
In general i would go with Piper, because it's both developed by the same person, but Mimic isn't active in development any more, but Piper is. But IMHO both is not supported on Mobile, yet.
You're welcome 😊. I encountered problems running Piper TTS on m1, too but had not time to give it a closer look. Have you already asked on Piper community? Maybe there's someone who got it working already.
@ThorstenMueller CMDbut I already wrote a python script that uses a subprocessimport os import subprocess import argparse def run_speech_generation(text, model_name, json_name, output_file): os.chdir('C:/piper') command = f'echo "{text}" | .\\piper.exe -m {model_name} -c {json_name} -f {output_file}' subprocess.run(command, shell=True)and now I generate speech through python programsthanks for tutorial BTW 🤝👍🙏
Technically i guess yes. Depends on the training voice data. Maybe cartoon voices are not "neutral" enough and have too much voice variation in it to create a consistent tts voice. And of course you have to think about licences when using foreign voices.
@@Lc9real I've chatted with Mike about native Python integration and there's seems to be room for improvement. So maybe keep an eye on that for future upcoming updates.
IMHO opinion i guess this is not possible by now. I tried integrating Piper to Windows SAPI, which could help on that use case, but this didn't work yet.
@@ThorstenMueller, I would like to use Piper to reproduce the text I select as I read the document. My intention is to play the Piper parallel to my reading of an article, for example, in order to facilitate my concentration on the reading. It doesn't need to be in Microsoft Word. The "Read Aloud: A Text to Speech Voice Reader" extension provides something similar, but is buggy regarding Pitch. I found the "Balabolka" interface, but I couldn't install the Piper voice in it. I have some knowledge in IT, but using Piper is something very advanced for me.
@@WorldOLuxury Okay, i have not used it for adjusting speed myself so i have no practical experiences. It's on my (growing) TODO list. Maybe you want to ask this question on Piper or Coqui TTS community. Maybe there's some practical experiences.
piper -h shows these parameters available to adjust the output: --length_scale NUM phoneme length (default: 1.0) --noise_w NUM phoneme width noise (default: 0.8) --sentence_silence NUM seconds of silence after each sentence (default: 0.2)
@@ThorstenMueller We want to run this on an A100. can it convert in less than 50 MS? also, are you the lead dev? i have some questions. maybe we can email each other if that is ok
Yes as a phonemizer. A LLM that can turn text into phonics would be interesting. I can't find a good collection of phonics sound samples. Which could be used for experimenting.
@@Владик-щ8ъ Okay, maybe it's worth to post this on Piper TTS Github repo (github.com/rhasspy/piper/issues). I guess there are more (experienced) people that might be able to support you on this.
Should work in general. I'm not sure if there's any arabic model available yet. You can see all models here: github.com/coqui-ai/TTS/blob/dev/TTS/.models.json Maybe it's worth to ask on their community for arabic support.
After literally wasting "hours" of trying to make it work, on different Windows system, trying all the switches, options, way to use them, its a total failure to a point. Fuck this garbage and fuck whoever did this awful Windows port.
It always amazes me how entitled some people feel about things they get for free. It worked flawlessly for me, but depending on the model you downloaded, if the config filename doesn't match the model filename, you might have to manually specify it.
Hi thorsten is this still working because when i run this command "echo "Hello, this is a test using Piper TTS." | .\piper.exe -m en_US-kathleen-low.onnx -f test1.wav" there is no output
Make sure that your config file has the same name as the model file. I noticed that all the ones I've downloaded so far have duplicated filenames, like "en_en_US_kathleen_low_en_US-kathleen-low.onnx.json". Either rename the config file to match the model file, or manually specify it with the --config trigger.
Not sure where I went wrong. echo 'Welcome to the world of speech synthesis!' | ./piper.exe --model en_US-lessac-medium.onnx --output_file welcome.wav has no output on windows it does something for a second but no output in the shell or in the folder. I have powershell open inside of the directory that I extracted the zip file to. ./piper.exe --help does work
Thanks for your comment and reply 😊. Normally piper should detect config file automatically if their name is identical to model file (+ json) if it's in the same directory. Does it generate audio then or still produce no output?
@@ThorstenMuellerI finally found the issue after getting it to work on another computer. The model files I downloaded corrupted at some point. After redownloading them it works.
So, I have just given this a go, followed all the steps, running Powershell as Administrator and it wouldn't produce just goes back to C:\Ai\piper folder... C:\Ai\piper> echo "Hello this is a test of piper TTS." Hello this is a test of piper TTS. C:\Ai\piper> echo "Hello this is a test of piper TTS." | .\piper.exe -m .\en_US-lessac-high.onnx -f test1.wav C:\Ai\piper> And that's it, tried with multiple voices, read through the comments saying you also need to use the model, so have the model in the folder as well tried with Kathleen low voice as well using the command in the description for her voice C:\Ai\piper> echo "Hello, this is a test using Piper TTS." | .\piper.exe -m en_US-kathleen-low.onnx -c en_en_US_kathleen_low_en_US-kathleen-low.onnx.json -f test1.wav C:\Ai\piper> Nada. Other issue is, even if it did somehow work, it's a lot of faffing around just for a line of audio. Just want to be able to clone my voice and my friends voice from prerecorded clean audio, and be able to produce a podcast without us actually having to do any talking. I don't think Piper is going to be the answer on this one, Tried Tortoise TTs, it was ok, but outputs were generally either quite a way off, or different pitches altogether, want something like Tortoise TTs that is user friendly, but one that actually works. What do you suggest, has to be locally, not paying anyone like Elevenlabs. Can do it all on my gaming computer.