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

Nickolay V. Shmyrev nshmyrev at nexiwave.com
Tue Jul 5 22:23:14 CEST 2011


On Tue, 2011-07-05 at 20:50 +0100, H. Sasse wrote:
> 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.

Hi Florent

Hugh is 100% right here. Just by adding the log function into the
specified place and printing the value of the locale you can make your
problem two times smaller. Adding another log you will make it four
times smaller and reduce it to a single line. 

With information about values of variables during processing of the
request you can get much more meaningful advise than we can suggest you
right now.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://www.dfki.de/pipermail/mary-dev/attachments/20110706/7e4537a1/attachment.pgp 


More information about the Mary-dev mailing list