Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for --phoneme-input for having pure phonemes as input #403

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

contentnation
Copy link

Feature to have pure phonemes as input, instead of text.
Can be (ab)used to create language mixing.
Example:
echo -n -e "ðɪs ɪz ˈɪŋɡlɪʃ wɪð ɐ fɹˈɛntʃ ˈaksənt" | piper -p -m fr_FR-upmc-medium
"This is english with a french accent" spoken by a french voice.

@fullymiddleaged
Copy link

Nudge, does this work now?

@contentnation
Copy link
Author

@fullymiddleaged it works for me, if you have any cases where it breaks, please report it so it can be fixed.

@fullymiddleaged
Copy link

@fullymiddleaged it works for me, if you have any cases where it breaks, please report it so it can be fixed.

Oh, okidoke, I'll try again!

@HF353
Copy link

HF353 commented Jun 5, 2024

Hello, I was searching all around and finally looks like I found it. Just please can you axplain exactly what I shoud to do and where to type to use french model for English. I mean I want to use french accent. And I'm interesting to use all foreign models for accents. Is it possible? Thank you in advance!

@contentnation
Copy link
Author

As written above:
echo -n -e "ðɪs ɪz ˈɪŋɡlɪʃ wɪð ɐ fɹˈɛntʃ ˈaksənt" | piper -p -m fr_FR-upmc-medium
-p for phoneme input instead of plain text
-m for the voice model and the matching accents.
plus the usual extra options like -wav output.wav
In theory it should work with every language/voice combination as long as the voice has the given phonemes.
Western phonemes with asian voice might not work correctly or the other way around.
To create the phonemes, you can use
echo "This is english with a french accent" | espeak-ng --ipa -q -v en
--ipa to output phonemes
-q to not create audio
-v to select language (if not given, english is used)

@HF353
Copy link

HF353 commented Jun 5, 2024

As written above: echo -n -e "ðɪs ɪz ˈɪŋɡlɪʃ wɪð ɐ fɹˈɛntʃ ˈaksənt" | piper -p -m fr_FR-upmc-medium -p for phoneme input instead of plain text -m for the voice model and the matching accents. plus the usual extra options like -wav output.wav In theory it should work with every language/voice combination as long as the voice has the given phonemes. Western phonemes with asian voice might not work correctly or the other way around. To create the phonemes, you can use echo "This is english with a french accent" | espeak-ng --ipa -q -v en --ipa to output phonemes -q to not create audio -v to select language (if not given, english is used)

Thank you so much for quick repley. I tried already command with no luck, but wasn't aware of espeak... so I'm gonna try and dig more to not distrub you, but I will return tomorrow for help sorry and big thanks!
P.S. I'm new on that, just few days, but managed already process of learning of model. And I tried to change in .json from fr to en-us. It's work, but unfortunateley some pronounce of course not like that (five instead Faive)...
Anyway, thank you once again I'm gonna learn!

@HF353
Copy link

HF353 commented Jun 14, 2024

I used the following command:
echo -n -e "ðɪs ɪz ˈɪŋɡlɪʃ wɪð ɐ fɹˈɛntʃ ˈaksənt" | piper -p -m fr_FR-upmc-medium.onnx -f .\phonemic.wav
She just reading letters kind of... Do you know what I'm doing wrong?

@contentnation
Copy link
Author

I just checked the command. It worked fine here.
Just a few hints/questions. If you are on the wrong branch, it should not run and complain that -p is unrecognized.
So if works, you used the right branch/installation.
the output filename of .phonemic.wav is a little odd, but it does not break the logic. Maybe you are playing back the wrong file from a previous run?
Here is the audio created with the above command (and converted to ogg to save space).
https://userdata.contentnation.net/a5970e0955da4472b5f84a8dbb740273/phonemic.ogg

@HF353
Copy link

HF353 commented Jun 14, 2024

Yes, I wish to listen example (it's not playing, please check the link), as maybe it's fine... Basically I have the same sound if I will change in .json from "fr" to en-us....

@HF353
Copy link

HF353 commented Jun 14, 2024

Ah, okey, I saved the link and able to play. Thanks

@HF353
Copy link

HF353 commented Jun 14, 2024

Yes, I confirm! Absolutely the same result! I edit json file and rename to en-us.... Ah, too strong accent for my project. So need to find speaker that will read a text and then I will train the voice, I think it's only one best solution. Thank you very much for help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants