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

Nickolay V. Shmyrev nshmyrev at nexiwave.com
Tue Jul 5 22:43:17 CEST 2011


On Tue, 2011-07-05 at 21:41 +0100, H. Sasse wrote:
> On 05/07/2011 21:23, Nickolay V. Shmyrev wrote:
> > 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
> 
> Thank you.  You didn't say anything about my "cut and paste" remark.  
> Have I found
> a missing " in the code?

No, the source code is ok. It's cut and paste which is always unprecise
you know ;)

-------------- 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/e6f068e0/attachment.pgp 


More information about the Mary-dev mailing list