[mary-dev] [Mary-dev] PronunciationModel not working

H. Sasse hgs at vermilion.plus.com
Tue Jul 5 21:50:22 CEST 2011

Insertions below...
On 04/07/2011 18:51, Nickolay V. Shmyrev wrote:
> Hello Florent
> This part of stacktrace
> Caused by: java.util.NoSuchElementException
>          at java.util.StringTokenizer.nextToken(StringTokenizer.java:349)
>          at marytts.util.MaryUtils.string2locale(MaryUtils.java:473)
>          at
> marytts.modules.phonemiser.AllophoneSet.determineAllophoneSet(AllophoneSet.java:93)
>          at
> says that something goes wrong with parsing the locale. Maybe somewhere
> the locale is specified incorrectly or incorrectly determined in mary
> itself.
> Looking on the code
>          if (maryVoice != null) {
>              allophoneSet = maryVoice.getAllophoneSet();
>          } else {
>              Locale locale =
> MaryUtils.string2locale(e.getOwnerDocument().getDocumentElement().getAttribute("xml:lang));
That is a cut and paste, is it?  Why does '("xml:lang)' only have the 
opening " mark?
Unless something got corrupted, I'm not sure how this compiled.  But I 
don't really do Java.
>              allophoneSet = determineAllophoneSet(locale);
>          }
> It feels like you don't have voice defined (that's not a good thing but
> should be ok) as well as you don't specify xml:lang in your document.
> The exception in this case is not quite correct OpenMary behavior.
Well, if you do add a voice tag, this bit of code should not be 
exercised, so if the bug is
there, then you will have worked around it.  I think.

More information about the Mary-dev mailing list