Hi guys, got stuck with things seemed obvious ...

Known issue of Russian in MaryTTS 5.2 (no voice file in the build) , so following recommendationsI  put the necessary voice files, taken from Russian version of MaryTTS 5.1

Script looks fine.

voice="voxforge-ru-nsh"
text="я говорю"
mouth = Runtime.createAndStart("i01.mouth", "MarySpeech")
mouth.setLanguage("ru")
mouth.setVoice(voice)
mouth.speak(text)
 
But no voice out - Inmoov is silently ignoring me)

Apparently, MaryTTS server works fine, client speks all right. I looked at the logs - and found this:

python] [INFO] exec(String) 
voice="voxforge-ru-nsh"
text="я говорю"
mouth = Runtime.createAndStart("i01.mouth", "MarySpeech")
mouth.setLanguage("ru")
mouth.setVoice(voice)
mouth.speak(text)
[python.interpreter.7] [INFO] Runtime.createService i01.mouth
[python.interpreter.7] [INFO] speakInternal Blocking false Text: я говорю
[Thread-11] [INFO] Starting to speak: я говорю
[Thread-11] [INFO] Ok.. here we go.
[Thread-11] [INFO] End speaking: я говорю
 
I.e. the string is broken iside when sent to Mary API (Coding issue? UTF?)??
 
Did anyone noticed it before? Could it be due to MAC I'm running Java on??
 
Thank you beforehand!!

Konstantin

5 years ago

Same (or connected) issue is on the speach recognition.

 

[python.input] [ERROR] ------
Traceback (most recent call last):
  File "<script>", line 1, in <module>
  File "<string>", line 2, in heard
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128)
 
It can not encode Russian Unicode characters through ASCII encoding somewhere in the middle

Thank you! Now I learned the "u" before string will make Unicode coding instead of ascii)

The test fails though:

[python.interpreter.11] [INFO] speakInternal Blocking true Text: привет
[python.interpreter.11] [ERROR] python error PyException - null Traceback (most recent call last):
  File "<string>", line 4, in <module>
at marytts.unitselection.data.DiphoneUnitDatabase.getCandidates(DiphoneUnitDatabase.java:84)
at marytts.unitselection.select.viterbi.Viterbi.apply(Viterbi.java:206)
at marytts.unitselection.select.UnitSelector.selectUnits(UnitSelector.java:117)
at marytts.unitselection.UnitSelectionSynthesizer.synthesize(UnitSelectionSynthesizer.java:164)
at marytts.modules.synthesis.Voice.synthesize(Voice.java:521)
at marytts.modules.Synthesis.synthesizeOneSection(Synthesis.java:252)
at marytts.modules.Synthesis.process(Synthesis.java:222)
at marytts.server.Request.processOneChunk(Request.java:547)
at marytts.server.Request.processOrLookupOneChunk(Request.java:385)
at marytts.server.Request.process(Request.java:327)
at marytts.LocalMaryInterface.process(LocalMaryInterface.java:438)
at marytts.LocalMaryInterface.generateAudio(LocalMaryInterface.java:348)
at org.myrobotlab.service.MarySpeech.speakInternal(MarySpeech.java:121)
at org.myrobotlab.service.MarySpeech.speakBlocking(MarySpeech.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
 
java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: gnu/trove/TIntHashSet
 
at org.python.core.Py.JavaError(Py.java:546)
at org.python.core.Py.JavaError(Py.java:537)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:188)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
at org.python.core.PyObject.__call__(PyObject.java:478)
at org.python.core.PyObject.__call__(PyObject.java:482)
at org.python.core.PyMethod.__call__(PyMethod.java:141)
at org.python.pycode._pyx18.f$0(<string>:4)
at org.python.pycode._pyx18.call_function(<string>)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1386)
at org.python.core.Py.exec(Py.java:1430)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:267)
at org.myrobotlab.service.Python$PIThread.run(Python.java:161)
Caused by: java.lang.NoClassDefFoundError: gnu/trove/TIntHashSet
at marytts.unitselection.data.DiphoneUnitDatabase.getCandidates(DiphoneUnitDatabase.java:84)
at marytts.unitselection.select.viterbi.Viterbi.apply(Viterbi.java:206)
at marytts.unitselection.select.UnitSelector.selectUnits(UnitSelector.java:117)
at marytts.unitselection.UnitSelectionSynthesizer.synthesize(UnitSelectionSynthesizer.java:164)
at marytts.modules.synthesis.Voice.synthesize(Voice.java:521)
at marytts.modules.Synthesis.synthesizeOneSection(Synthesis.java:252)
at marytts.modules.Synthesis.process(Synthesis.java:222)
at marytts.server.Request.processOneChunk(Request.java:547)
at marytts.server.Request.processOrLookupOneChunk(Request.java:385)
at marytts.server.Request.process(Request.java:327)
at marytts.LocalMaryInterface.process(LocalMaryInterface.java:438)
at marytts.LocalMaryInterface.generateAudio(LocalMaryInterface.java:348)
at org.myrobotlab.service.MarySpeech.speakInternal(MarySpeech.java:121)
at org.myrobotlab.service.MarySpeech.speakBlocking(MarySpeech.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
... 12 more
 

Thnks a lot.

It works, voice is OK. The new build is quite heavy though. Works so slowly. 

The new release with MaryTTS 5.2 integrated should be ok.

Thank you anyway!

 

 

Hi Anthony, 

I ended up with Amazon Polly TTS.

Voice Maxim sounds perfect in Russian! The guy sounds very famous - he had made dubbing of few shows and series here, so my kids are starring at Robot asking for more)))

So will stay with Polly - for 12 mths of free tier at least))

Tnx for wiki - great help))