MaryTTS no longer has a binding?

561 views
Skip to first unread message

Will Stewart

unread,
Mar 10, 2014, 10:37:26 PM3/10/14
to ope...@googlegroups.com
I had seen that MaryTTS once had a binding, but seems to have been dropped - or was it renamed? A high quality text-to-speech can make all the difference...

Tobias Bräutigam

unread,
Mar 11, 2014, 4:18:17 AM3/11/14
to ope...@googlegroups.com
I just checked that and found the MaryTTS binding in the source tree, in the release build and in the snapshot build. Where are you missing it?

Will Stewart

unread,
Mar 11, 2014, 6:39:02 AM3/11/14
to ope...@googlegroups.com
I hadn't seen it under bindings in the main openhab.org page, on the wiki, in the source tree, or in the addon jars, though now I see it is under openhab.io.multimedia, not bindings.

Are there any available examples of how to use it? How do I choose the voice aside from the default (and do I need to load voice files)?

Tobias Bräutigam

unread,
Mar 11, 2014, 6:59:43 AM3/11/14
to ope...@googlegroups.com
You´re right, it is not described in the wiki. Should be added, but as it is no real binding (which "bind" external things to the system) I am not sure about the right placement. Same problem with the openhag.org page. Maybe Thomas or Kai have an idea?
But it is part of the addon.zip file (both snapshot and release) and it has always been part of the openhab.io.multimedia package.

The usage and the available voices are described in the openhab_default.cfg file in the "MaryTTS configuration" section.

If you don´t want the default voice copy this section to your openhab.cfg file, uncomment and change "#marytts:voice=" line, to one of the available voices. As far as I know there is currently no possibility to add additional voices.
--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/aicXy9HE6io/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
For more options, visit https://groups.google.com/d/optout.

Will Stewart

unread,
Mar 11, 2014, 11:40:05 AM3/11/14
to ope...@googlegroups.com
Thanks, Tobias, I appreciate your excellent work on this! I'm going to give it a quick test once back home, and (if successful), see if I can use an SSML string as well.

FYI, my current execution environment is Ubuntu Studio 13.10, which has a low-latency Linux kernel that is quite effective at avoiding sound dropouts and interruptions.

Cheers,

Will

Will Stewart

unread,
Mar 11, 2014, 8:34:23 PM3/11/14
to ope...@googlegroups.com
It was easy to get MaryTTS working, thanks again Tobias.  I tried a few SSML strings unsuccessfully, though undoubtedly due to my lack of SSML knowledge.  Some example strings included;

<?xml version="1.0"?>
<speak xmlns="http://www.w3.org/2001/10/synthesis"
       xmlns:dc="http://purl.org/dc/elements/1.1/"
       version="1.0">
  <metadata>
    <dc:title xml:lang="en">Telephone Menu: Level 1</dc:title>
  </metadata>
 
  <p>
    <s xml:lang="en-US">
      <voice name="David" gender="male" age="25">
        For English, press <emphasis>one</emphasis>.
      </voice>
    </s>
    <s xml:lang="es-MX">
      <voice name="Miguel" gender="male" age="25">
        Para español, oprima el <emphasis>dos</emphasis>.
      </voice>
    </s>
  </p>
 
</speak>


and


"<prosody pitch=\"x-high\"> This is extra high pitch. </prosody >"

as two examples. I'll look into this more deeply later.

Will Stewart

unread,
Mar 11, 2014, 8:37:08 PM3/11/14
to ope...@googlegroups.com
Also, there appears to be a bit of halting in speech, though my little Dell Inspiron Mini was running  75+% CPU utilization, so that may have been a contributing factor.

Tobias Bräutigam

unread,
Mar 12, 2014, 4:24:18 AM3/12/14
to ope...@googlegroups.com
Currently the MaryTTS binding only accepts plain text. For a deeper look simply check the source file https://github.com/openhab/openhab/blob/master/bundles/io/org.openhab.io.multimedia.tts.marytts/src/main/java/org/openhab/io/multimedia/internal/tts/TTSServiceMaryTTS.java

For SSML you would have to add some code which checks if the text is plain text or an ssml string. And than add something like
marytts.setInputType("SSML");
as described here: https://github.com/marytts/marytts/wiki/MaryInterface

But I don´t think that this would be a good solution, because all TTS engines in openHAB (currently FreeTTS, MaryTTS and the build-in MacOS TTS) use the same "say" action, which accepts plain text. Sending some special code like SSML "through" this action, which only one of the TTS engine understands would be possible, but at least "bad style". The way to go in this way, would be to write an additional action e.g. saySSML, which can be added to the addons folder if a user wants to use it. As the actions are now as modular as the bindings, this should not be a problem.

Will Stewart

unread,
Mar 14, 2014, 1:58:44 PM3/14/14
to ope...@googlegroups.com
Thanks, Tobias, I now see an additional operation is required to realize the SSML feature for MaryTTS

There are alternative ways to viewing the developing interfaces, which will undoubtedly change and morph over time. For example the current interface is at the generalization level, i.e., implementing only those actions that are common between all member packages. Perhaps a more ideal solution would be to create interfaces to each specialization that would inherit the common actions and add those specific to each specialization. In other words, there would be an interface to each of MaryTTS, FreeTTS, and IoSTTS that all inherited "say(string)", with MaryTTS having an additional action of "saySSML(SSMLString)"
Reply all
Reply to author
Forward
0 new messages