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

Lexicon update #952

Closed
nikigre opened this issue Feb 22, 2020 · 7 comments
Closed

Lexicon update #952

nikigre opened this issue Feb 22, 2020 · 7 comments

Comments

@nikigre
Copy link

nikigre commented Feb 22, 2020

Hi!
So I successfully built a few voices using HMM and UnitSelection but now I have a problem, that a lot of words are mispronounced. I updated SAMA text and did a process 3 and 4 again (https://github.com/marytts/marytts/wiki/New-Language-Support), then build marytts-lang-sl-5.1.2 and tried synthesising again but the results are the same.
Do I need to build the whole voice again or what? Is this still applicable
Thank you for all your help :D

@nikigre
Copy link
Author

nikigre commented Mar 21, 2020

Hi!
Does anyone have an idea on what to do?
Thank you

@seblemaguer
Copy link
Member

Hello,

have you tried to generate only the XML file to see if your change are taken into account in the front end?

@nikigre
Copy link
Author

nikigre commented Mar 22, 2020

Hi!
I tried again. I changed the pronunciation of word "Avstrija". The first example is before the change and second after the change.

<?xml version="1.0" encoding="UTF-8"?><maryxml xmlns="http://mary.dfki.de/2002/MaryXML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.5" xml:lang="sl">
<p>
<s>
<prosody pitch="+5%" range="+20%">
<phrase>
<t accent="L+H*" g2p_method="lexicon" ph="s O s e: d_n n j E" pos="content">
Sosednje
<syllable ph="s O s e: d_n n j E">
<ph p="s"/>
<ph p="O"/>
<ph p="s"/>
<ph p="e:"/>
<ph p="d_n"/>
<ph p="n"/>
<ph p="j"/>
<ph p="E"/>
</syllable>
</t>
<t accent="L+H*" g2p_method="lexicon" ph="d r Z a: v E" pos="content">
države
<syllable ph="d r Z a: v E">
<ph p="d"/>
<ph p="r"/>
<ph p="Z"/>
<ph p="a:"/>
<ph p="v"/>
<ph p="E"/>
</syllable>
</t>
<t accent="L+H*" g2p_method="lexicon" ph="s o:" pos="content">
so
<syllable ph="s o:">
<ph p="s"/>
<ph p="o:"/>
</syllable>
</t>
<t accent="L+H*" g2p_method="lexicon" ph="a v s t r i: j a" pos="content">
Avstrija
<syllable ph="a v s t r i: j a">
<ph p="a"/>
<ph p="v"/>
<ph p="s"/>
<ph p="t"/>
<ph p="r"/>
<ph p="i:"/>
<ph p="j"/>
<ph p="a"/>
</syllable>
</t>
<t pos="$PUNCT">
,
</t>
<boundary breakindex="4" tone="H-L%"/>
</phrase>
</prosody>
<prosody pitch="-5%" range="-20%">
<phrase>
<t accent="L+H*" g2p_method="lexicon" ph="m a dZ a: r s k a" pos="content">
Madžarska
<syllable ph="m a dZ a: r s k a">
<ph p="m"/>
<ph p="a"/>
<ph p="dZ"/>
<ph p="a:"/>
<ph p="r"/>
<ph p="s"/>
<ph p="k"/>
<ph p="a"/>
</syllable>
</t>
<t accent="L+H*" g2p_method="lexicon" ph="i n" pos="content">
in
<syllable ph="i n">
<ph p="i"/>
<ph p="n"/>
</syllable>
</t>
<t accent="!H*" g2p_method="lexicon" ph="x r v a: S k a" pos="content">
Hrvaška
<syllable ph="x r v a: S k a">
<ph p="x"/>
<ph p="r"/>
<ph p="v"/>
<ph p="a:"/>
<ph p="S"/>
<ph p="k"/>
<ph p="a"/>
</syllable>
</t>
<t pos="$PUNCT">
.
</t>
<boundary breakindex="5" tone="L-L%"/>
</phrase>
</prosody>
</s>
</p>
</maryxml>

Second:

<?xml version="1.0" encoding="UTF-8"?><maryxml xmlns="http://mary.dfki.de/2002/MaryXML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.5" xml:lang="sl">
<p>
<s>
<prosody pitch="+5%" range="+20%">
<phrase>
<t accent="L+H*" g2p_method="lexicon" ph="s O s e: d_n n j E" pos="content">
Sosednje
<syllable ph="s O s e: d_n n j E">
<ph p="s"/>
<ph p="O"/>
<ph p="s"/>
<ph p="e:"/>
<ph p="d_n"/>
<ph p="n"/>
<ph p="j"/>
<ph p="E"/>
</syllable>
</t>
<t accent="L+H*" g2p_method="lexicon" ph="d r Z a: v E" pos="content">
države
<syllable ph="d r Z a: v E">
<ph p="d"/>
<ph p="r"/>
<ph p="Z"/>
<ph p="a:"/>
<ph p="v"/>
<ph p="E"/>
</syllable>
</t>
<t accent="L+H*" g2p_method="lexicon" ph="s o:" pos="content">
so
<syllable ph="s o:">
<ph p="s"/>
<ph p="o:"/>
</syllable>
</t>
<t accent="L+H*" g2p_method="lexicon" ph="a v s t r i: j a" pos="content">
Avstrija
<syllable ph="a v s t r i: j a">
<ph p="a"/>
<ph p="v"/>
<ph p="s"/>
<ph p="t"/>
<ph p="r"/>
<ph p="i:"/>
<ph p="j"/>
<ph p="a"/>
</syllable>
</t>
<t pos="$PUNCT">
,
</t>
<boundary breakindex="4" tone="H-L%"/>
</phrase>
</prosody>
<prosody pitch="-5%" range="-20%">
<phrase>
<t accent="L+H*" g2p_method="lexicon" ph="m a dZ a: r s k a" pos="content">
Madžarska
<syllable ph="m a dZ a: r s k a">
<ph p="m"/>
<ph p="a"/>
<ph p="dZ"/>
<ph p="a:"/>
<ph p="r"/>
<ph p="s"/>
<ph p="k"/>
<ph p="a"/>
</syllable>
</t>
<t accent="L+H*" g2p_method="lexicon" ph="i n" pos="content">
in
<syllable ph="i n">
<ph p="i"/>
<ph p="n"/>
</syllable>
</t>
<t accent="!H*" g2p_method="lexicon" ph="x r v a: S k a" pos="content">
Hrvaška
<syllable ph="x r v a: S k a">
<ph p="x"/>
<ph p="r"/>
<ph p="v"/>
<ph p="a:"/>
<ph p="S"/>
<ph p="k"/>
<ph p="a"/>
</syllable>
</t>
<t pos="$PUNCT">
.
</t>
<boundary breakindex="5" tone="L-L%"/>
</phrase>
</prosody>
</s>
</p>
</maryxml>

So as you can see, the word "Avstrija" is the same...

@seblemaguer
Copy link
Member

seblemaguer commented Mar 22, 2020

Hello,

I don't see the word "tako" in your xml. So I am confused about your problem.

@nikigre
Copy link
Author

nikigre commented Mar 22, 2020

@seblemaguer
I am so sorry!
Now I have update the coment. So now it is about word "Avstrija". The correct form should be: a: v s t r i j a. And not a v s t r i: j a.

@psibre
Copy link
Member

psibre commented Mar 23, 2020

As you can see from the token attribute g2p_method="lexicon", the pronunciation is taken from your lexicon. So if you want to fix that, you need to update that component. Note that you do not need to rebuild your voice all the time while you're working on the lexicon component. I recommend you run a local MaryTTS server with the lexicon and language components (but without your voice), then ensure your pronunciation is correct via GET requests to http://localhost:59125, with OUTPUT_TYPE=PHONEMES and LOCALE=sl. You can easily do this through your browser from http://localhost:59125/documentation.html (scroll to the bottom).
Note that you will have to restart the local MaryTTS server after changing the loaded components.

After you fix your lexicon, you can rebuild your voice.

@nikigre
Copy link
Author

nikigre commented Mar 26, 2020

Hi!
I did as you said. I removed my voice and tried with GET request. But I got the same result. I was very mystified.
So I tried again the whole process (changing a word in the lexicon, train it, rebuild NLP) and now looks like it works!
Ps: One question about steps that MaryTTS takes to convert text to audio file. Is there any order that MaryTTS calls functions that filters text and where could I set that? I wrote a method that converts numbers to strings but I don't know wehere to call it. I tired in "Tokenizer.java" but all values appear to be NULL.
@psibre and @seblemaguer Thank you both for your help :D

@nikigre nikigre closed this as completed Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants