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

Nickolay V. Shmyrev nshmyrev at nexiwave.com
Fri Jul 8 22:05:50 CEST 2011


В Чтв, 07/07/2011 в 22:09 +0200, fxavier at ircam.fr пишет:
> Hello Nickolay,
> 
> Thanks for taking time to help me out. I'm just deducing that the local is
> nulle according to the exception
> 
> > 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
> 
> In particular the marytts.util.MaryUtils.string2locale (line 473)

Hello Florent

The value of locale is not null, otherwise there would be
NullPointerException. Since you get NoSuchElementException it means that
locale value is "", not null.

> I'm afraid I'm not able to get the value of the locale, I've never been
> involved in such a complex system (I'm a m2 student)! every time I want to
> test the value, I just put a System.out.println(), but of course no sense
> in doing this in openmary. But I'm willing to learn. So do I have to do:
> 
> logger.debug(locale) right?
> 
> And the value will be written in the server.log?
> 
> If it is right, I added some logger.debug(locale) in PronunciationModel
> (the generic module) at the beggining of the process method and the
> startup void. But I have nothing in the server.log, so I might be wrong in
> what I do.

1. If you are a student it's time to learn how to use a debugger. This
is the fastest way. I think it will take less than 2 hours to understand
the concepts.

2. If you print something, prepend it with some prefix, so it will be
visible in the log. 

logger.debug("!!!!!!!!!!!!!!!!!!!!!! " + locale +
"!!!!!!!!!!!!!!!!!!!!!")

 is easier to find.

3. System.out.println should also work.

-------------- 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/20110709/9806eebd/attachment.pgp 


More information about the Mary-dev mailing list