We have moved at community.getvera.com

Author Topic: New TTS engine: MaryTTS  (Read 10504 times)

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
New TTS engine: MaryTTS
« on: August 01, 2015, 05:33:13 am »
MaryTTS is now available as a TTS engine for the Sonos plugin: http://code.mios.com/trac/mios_sonos-wireless-music-systems/browser/trunk
You will have to upload 4 files: I_Sonos1.xml + J_Sonos1.js + L_SonosTTS.lua + S_Sonos1.xml. Take them from the ZIP file.

To setup the engine, you have to set your MaryTTS server URL through the TTS tab of the plugin. This URL should look like http://192.168.0.20:59125

Please note that you have to set language to "en_GB" or "en_US" for English. If you use only "en", it does not work. I will update later the UI to make the choice easier.
For other languages like French, you just use "fr" like for the other engines.

Note that this engine produces a WAV file, that means a bigger file.

I tested with MaryTTS installed on a RPI. The time to deliver the WAV file is very long (several seconds) and the quality of the speech is low.

In your scenes, you have to use "MARY" to identify this engine.
« Last Edit: August 02, 2015, 04:29:00 pm by lolodomo »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New TTS engine: MaryTTS
« Reply #1 on: August 01, 2015, 11:24:43 am »
I just imrpoved error checking. Please update, my previous version lead to TTS not working after a first failure.
A warning is now logged when the audio file cannot be retrieved and Sonos audio is not cut at all in this case.

I will imrprove again error checking for MaryTTS later by checking that the URL is ok and the language is an available language.
« Last Edit: August 01, 2015, 12:01:37 pm by lolodomo »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New TTS engine: MaryTTS
« Reply #2 on: August 02, 2015, 06:03:59 am »
I committed few changes. If the TTS request failed, a control is done to check if the MaryTTS server is reachable (URL is ok) and if used language is available. So the logged error is now a little more detailed.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New TTS engine: MaryTTS
« Reply #3 on: August 02, 2015, 07:29:47 am »
If you installed several voices for a language, one will be the default voice for this language and only this one is currently available through the plugin. To give the choice of the voice, I should add a new argument to the Say action. Not sure I will do it as it is something only available with this TTS engine.
The workaround is to keep on the server side only the voice you prefer for each language.

Offline BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2409
  • Karma: +112/-140
Re: New TTS engine: MaryTTS
« Reply #4 on: December 28, 2015, 04:08:21 pm »
I decided to Install MaryTTS on my WHS2011 server that also runs Blue Iris and Serviio and it was pretty painless. I do like the response time as the server is on my local network.

The installation procedure I followed (as I could not find it in the Wiki) is at http://fastertutorials.com/?p=35

MaryTTS requires Java runtime 1.7 or higher which I already had installed as Serviio runs on that server.

MaryTTS can be found at : http://mary.dfki.de/download/

Voices for MaryTTS are downloadable at https://github.com/marytts/marytts/tree/master/download

One caveat for WHS2011: You will manually have to create an inbound allow rule for TCP port 59125 to provide access to the MaryTTS http server. By default this port is closed.

MaryTTS server URL format:  http://IP.OF.YOUR.SERVER:59125 (replace IP.OF.YOUR.SERVER with the IP address or name of your server) You can use the URL in a browser to test the MaryTTS server. It should bring up the web interface.
Vera3 UI5 UI7 Edge Plus
Trane TZEMT400AB32 | Schlage BE369 FE599 | GE 45601 45602 45603 45604 45606 45609 45631 | Intermatic HA01C HA03C HA05C HA07C CA600 CA3000 | Aeon DSC06106 | Telguard GDC1 | Foscam FI8910W FI8905W FI9821W | D-Link 930L | Wanscam JW0011 | ZModo ZPIBH13W

Offline MNB

  • Hero Member
  • *****
  • Posts: 689
  • Karma: +4/-9
Re: New TTS engine: MaryTTS
« Reply #5 on: December 28, 2015, 04:29:52 pm »
@lolodomo, question I finally moved over to Microsoft TTS, is there an advantage using Mary TTS e.g better speech options, quicker? based on @BOFH I could have my own copy on a local network. Mike
Edge-1.7.2607, VRI06-1LX Dimr (6), VS05-1LX Sw (4), GE ZW3002 Dimr (1), HA01C Outlet (12), HA02C Sw (6), HA04C Sw (4), GE Sw (2), HA05 Sw (3), MiniMote Contr (5), HSM200/100 Sensor (2), ZW100A Sensor (8), Nest thermostat (1) & Protect Fire/CO (6) Kwikset Locks (3), F18918W (1) & IP3M-9 (6) Cam's

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5630
  • Karma: +157/-382
Re: New TTS engine: MaryTTS
« Reply #6 on: December 28, 2015, 05:03:06 pm »
@lolodomo, question I finally moved over to Microsoft TTS, is there an advantage using Mary TTS e.g better speech options, quicker? based on @BOFH I could have my own copy on a local network. Mike

I would also assume no limit now. Curious to see what else.

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5630
  • Karma: +157/-382
Re: New TTS engine: MaryTTS
« Reply #7 on: December 28, 2015, 05:49:40 pm »
I'm running this on windows 8 with BI and PLEX and a few other things. Can I close the Command prompt window or any easy way to run it without the CMD window open? 

Offline BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2409
  • Karma: +112/-140
Re: New TTS engine: MaryTTS
« Reply #8 on: December 28, 2015, 05:53:28 pm »
MaryTTS has no limits on the amount of characters as it's public license software and you run it on your own system.
It has a number of voices available and it's great fun having eg a Italian female voice speak something in English. Adorable accent. ;) MaryTTS has a lot of options on inflection, tone, timbre etc but unfortunately at this time these don't seem to be supported by the plugin. Nor is being able to choose the voice. I can only switch between a US female (en-US) and a UK female (en-GB) voice. I wish I could specify inflections such as eg 'questioning' etc. Using en-CA results in silence, not even an 'eh' as MaryTTS only supports de, en-GB, en-US, fr, it, ru, sv, te and tr

Installation was pretty simple and took less than 15 minutes. With another 30 figuring out the firewall issue and how to set up the scheduler to run the MaryTTS bat file at startup.

I'm hoping Lolodomo will consider adding some of the options MaryTTS supports to the plugin so we can actually pick the voice and inflection.

I'm still defaulted at this time to the MS voice until I can do more testing but I'm pretty sure I'll  migrate to MaryTTS as the default as it is not dependent on a 3rd party server on the Internet.

@integlikewhoa: Use the task scheduler to make the server batch file run at boot, on my WHS2011 it neatly hides the CMD window. If you run it manually, as soon as you log out of the server (eg RDP session) it exits. I don't know if there is a way to run it as a service. I've ran it with the CMD window minimized with no issues.
« Last Edit: December 28, 2015, 06:05:33 pm by BOFH »
Vera3 UI5 UI7 Edge Plus
Trane TZEMT400AB32 | Schlage BE369 FE599 | GE 45601 45602 45603 45604 45606 45609 45631 | Intermatic HA01C HA03C HA05C HA07C CA600 CA3000 | Aeon DSC06106 | Telguard GDC1 | Foscam FI8910W FI8905W FI9821W | D-Link 930L | Wanscam JW0011 | ZModo ZPIBH13W

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5630
  • Karma: +157/-382
Re: New TTS engine: MaryTTS
« Reply #9 on: December 28, 2015, 07:01:59 pm »
OK made a .VBS file that I run at windows startup which runs this .bat file hidden in the background on my windows machine.

Use notepad and saved it with a changed extension to ".VBS"
Used the info below for my information in notepad with my file location and name in the "".

CreateObject("Wscript.Shell").Run "C:\MaryTTS\marytts-5.1.2\bin\marytts-server.bat",0,True


Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New TTS engine: MaryTTS
« Reply #10 on: December 29, 2015, 05:14:04 am »
@lolodomo, question I finally moved over to Microsoft TTS, is there an advantage using Mary TTS e.g better speech options, quicker? based on @BOFH I could have my own copy on a local network. Mike

In my humble opinion, the quality  of voices is very low compared to Google or Microsoft.
On a RPI, building the WAV file is very long and as a result Google or Microsoft are faster to deliver the text than MaryTTS.
The only advantage I see in MaryTTS is that it is usable without Internet. But using Internet is not a problem for me and I prefer Microsoft quality.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New TTS engine: MaryTTS
« Reply #11 on: December 29, 2015, 05:21:46 am »
I'm hoping Lolodomo will consider adding some of the options MaryTTS supports to the plugin so we can actually pick the voice and inflection.

Let me know how you would see the changes.
I don't really want to add one or several parameters to the Say action as they are already very numerous. And remember that Say action is common for all engines.

Offline BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2409
  • Karma: +112/-140
Re: New TTS engine: MaryTTS
« Reply #12 on: December 29, 2015, 09:45:50 am »
@Lolodomo: Thanks for the offer and I do realize you don't want to many parameters for the say command. But would it be possible to incorporate the VOICE parameter so  specific voices can be specified on the TTS tab for MaryTTS? I'm perfectly happy having to type the voicename if it's to much of a programming effort for the plugin to query the defined MaryTTS server for installed voices. The list of locally installed is at http://IP.ADDRESS:59125/Voices . Like others, I prefer to be able to use different voices for different situations. Cheerful Poppy works fine for the weather but a male voice would be more suited in case of a fire or similar scenario. 

I can see where an rPi could be slow responding. My WHS2011 server is a Lenovo TS140 with 4 core Xeon CPU. Even though it runs Blue Iris with about 13 cameras as well as the Serviio media server, it generates a wav file almost instantly. As you said, speech quality for MS is better, but it's response times seem to vary, especially with multiple requests.

I downloaded the Prudence and Poppy voices and they are of better quality than the default ones but not there yet as compared to Google and MicroSoft. MaryTTS allows you to create your own voices though. Lord help us if I ever get a hold of Barbara Eden as that would more than likely result in a 'Jeannie' voice. :) I'm trying to figure out what is needed in the form of wav files to build a voice. It would be a good excuse for buying the DVD set of the Jeannie series if I coudl get all that's needed from there.

I'll settle for lower quality though if that means faster response and I'm not dependent on a 3rd party internet server. Just look at what happened to Google TTS.
« Last Edit: December 29, 2015, 09:54:42 am by BOFH »
Vera3 UI5 UI7 Edge Plus
Trane TZEMT400AB32 | Schlage BE369 FE599 | GE 45601 45602 45603 45604 45606 45609 45631 | Intermatic HA01C HA03C HA05C HA07C CA600 CA3000 | Aeon DSC06106 | Telguard GDC1 | Foscam FI8910W FI8905W FI9821W | D-Link 930L | Wanscam JW0011 | ZModo ZPIBH13W

Offline symonsaz

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +1/-0
Re: New TTS engine: MaryTTS
« Reply #13 on: December 29, 2015, 07:08:22 pm »
just before i throw in the towel with microsoft TTS ... and go through setting up marytts... IS anyone else having issues with Microsoft as of today???  Like the Webserver is not working... similar to how Googletts went down a few months ago?

Offline BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2409
  • Karma: +112/-140
Re: New TTS engine: MaryTTS
« Reply #14 on: December 29, 2015, 07:33:43 pm »
as replied in the other thread ypu posted this. Just had Vera tell me the weather using Microsoft and the en-CA voice.
Vera3 UI5 UI7 Edge Plus
Trane TZEMT400AB32 | Schlage BE369 FE599 | GE 45601 45602 45603 45604 45606 45609 45631 | Intermatic HA01C HA03C HA05C HA07C CA600 CA3000 | Aeon DSC06106 | Telguard GDC1 | Foscam FI8910W FI8905W FI9821W | D-Link 930L | Wanscam JW0011 | ZModo ZPIBH13W