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

H. Sasse hgs at vermilion.plus.com
Tue Jul 5 22:41:11 CEST 2011


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?

> 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.
>
     Thank you,
     Hugh


More information about the Mary-dev mailing list