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

Incorrect pronunciation of some single words with libritts model #2

Open
dscripka opened this issue Oct 13, 2023 · 2 comments
Open

Comments

@dscripka
Copy link
Contributor

Based on an issue from the openWakeWord repo, I'm exploring why the initial pronunciation of certain single words is incorrect for most combinations of speaker IDs and noise scale values (though some seem fine).

It seems to be due to this line, where the phonemes for the target text have the "^" phoneme (id 1) preprended. I experimented by instead prepending the "^_" phoneme sequence (ids [1, 0]) when the target text is only a single word and the produced speech then sounds correct.

This is fairly odd behavior, as the pronunciation of these same words is correct when they are part of a multi-word text sequence. I could theorize that since most TTS datasets are trained on sentences and not single words this is an example of unexpected out-of-domain behavior, but ultimately I'm not sure.

Does using the [1, 0] phoneme sequence seem like a viable work-around? Might that cause any detrimental side-affects that I'm not considering?

@lumpidu
Copy link

lumpidu commented Jan 15, 2024

I think, you are right: this is a bug. All phoneme symbols need to be accompanied by the padding symbol (binary 0). The above symbol is the so called BOS (begin of sentence) symbol. Looking at the code, also the EOS (end of sentence) symbol ($) should be padded with a 0, but isn't.

@synesthesiam
Copy link
Contributor

I've now added the proper padding after BOS. There is not a pad symbol after EOS.
Maybe related, but there is now some options to help with shorter phrases: https://github.com/rhasspy/piper-sample-generator?tab=readme-ov-file#short-phrases

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

No branches or pull requests

3 participants