I would like to have Mimic3 pull text from a .txt file and output it as a .wav file. I can get it to do singular sentences just fine but anything with a line break and it won’t do it. There is an example on the Mimic3 website but it pulls from a URL which is posted below in Italics. I tried this, but since it is not a url it of course didn’t work.
Please let me know if anyone out there has some words of wisdom.
BTW I am brand new to coding in python and have zero experience beyond installing Mimic3 and testing out the server function.
Thank you in advance for your time,
If your long text is fixed-width with blank lines separating paragraphs like those from Project Gutenberg, use the
--process-on-blank-line option so that sentences will not be broken at line boundaries. For example, you can listen to “Alice in Wonderland” like this:
Just so we’re clear on what’s what, this part is neither Python nor the assistant, but Unix!
curl is a program, which comes with most Linux distributions, that downloads whatever’s at the other end of a URL. The
| operator is called a pipe. It allows you to chain programs together; it takes the output of the program on the left and passes it along to the program on the right.
You need to replace everything on the
curl side of the pipe with a command to read your text file and print its output. The command to do that is
All of that said, I don’t know what will happen if you hit the public instances with large input. OVOS doesn’t maintain Mimic. It’s running, but it’s abandonware. We suggest self-hosters switch to Piper, from the same author after he went back to his old project.
I don’t know anything about MIMIC3 and very little about curl, but curl outputs to stdout by default, so
curl ‘https://www.gutenberg.org/files/11/11-0.txt’ |
mimic3 --interactive --process-on-blank-line
should work. I tried:
curl https://www.gutenberg.org/files/11/11-0.txt | wc
on my debian bullseye laptop and it worked fine, except that there was a long delay before any data transfer started. (Maybe delay was because of something on the gutenberg.org end.)
It will work, but only if the file is on the internet, because curl downloads from the internet.
I really can’t stress enough that these are Linux questions, nothing to do with Mycroft.
I should have been more specific. I do not need to use the curl tool that was just the example given on the site. I was just looking for a way to get the text from a local file.
Do you have a link for the Piper project?
And thanks again for sharing your experience.
In case you missed it:
cat filename.txt in place of everything left of the
Thanks for all your help. I very much appreciate it. I’ll be trying it out next time I get a chance.
mimic3 --interactive --process-on-blank-line < filename.txt
should also work and would use fewer processes.
< filename.txt means read stdin from filename.txt