Getting MaryTTS to say anything


I’ve been trying to get MaryTTS to say anything in OpenHAB 2 but it doesn’t seem to cooperate.
I’m running openhab-online 2.0.0 b2 with all the openhab-offline 2.0.0 b2 addons copied into their respective folders. MaryTTS is enabled through the Paper UI addon configuration page. This computer is running Windows 10 Pro x64.

I tried a sample script to say something when turning on a random light switch:
rule "test say" when Item Light_FF_Bath_Ceiling changed then say("light changed") end

And I get this in openhab.log

[ERROR] [timedia.internal.tts.TTSServiceMacOS] - Error while executing the 'say' command: Cannot run program "say": CreateProcess error=2, The system cannot find the file specified

The MaryTTS server seems to initialize properly, but doesn’t respond. The final lines of server.log are:
2016-04-22 11:50:14,316 [Start Level: Equinox Container: 60e0ce9a-6f08-0016-1e78-e8e54ead979a] INFO marytts.OpenNLPPosTagger Module started (WORDS->PARTSOFSPEECH, locale en). 2016-04-22 11:50:14,907 [Start Level: Equinox Container: 60e0ce9a-6f08-0016-1e78-e8e54ead979a] INFO marytts.OpenNLPPosTagger Starting power-on self test. 2016-04-22 11:50:14,907 [Start Level: Equinox Container: 60e0ce9a-6f08-0016-1e78-e8e54ead979a] INFO marytts.OpenNLPPosTagger Power-on self test complete. 2016-04-22 11:50:14,910 [Start Level: Equinox Container: 60e0ce9a-6f08-0016-1e78-e8e54ead979a] INFO marytts.main Startup complete. 2016-04-22 11:50:14,910 [Start Level: Equinox Container: 60e0ce9a-6f08-0016-1e78-e8e54ead979a] WARN marytts.Voice Could not find default voice for locale en_GB

Any help would be appreciated !


The same for me on openhab 2.0.0 b2 on raspberry

10:33:00.131 [ERROR] [o.voice.internal.tts.TTSServiceMacOS] - Error while executing the ‘say’ command: Cannot run program “say”: error=2, No such file or Directory

but marytts is up and running

175 | Active | 80 | |

I’d recommend using the latest snapshot and see if it is working there.

I took the latest online snapshot and installed the demo configuration and marytts using addons.cfg. Then using the Karaf shell instead of a rule:
openhab> smarthome:say test Said: test openhab>

But still no sound with exactly the same messages. MaryTTS is started up as shown by the log and bundle:list, and openhab.log still contains the same error.
2016-04-25 08:43:23.537 [ERROR] [o.voice.internal.tts.TTSServiceMacOS] - Error while executing the 'say' command: Cannot run program "say": CreateProcess error=2, The system cannot find the file specified

I investigated this issue a bit further and found that the ESH Voice I/O bundle comes with a MacOSX TTS interface but no other interfaces.
`openhab> bundle:find-class TTSService

Eclipse SmartHome Voice I/O Bundle (113)

openHAB 1.x Compatibility Layer (165)

openHAB Multimedia MaryTTS (173)

I don’t have a big enough understanding of the inner workings (cannot compile the latest github version as it fails because of some SHK dependencies) but I believe it is linked to the new ESH packages and an interface mismatch in MaryTTS. I’ll try to prod around a bit but without being able to completely recompile and debug I don’t think I’ll go far enough.

Which voice are you using?

I am running MaryTTS on my iMac with this setup (on the latest OH2 Build #256)

# the default voice used by the MaryTTS engine. Available voices are: bits1-hsmm 
# (german, female), bits3-hsmm (german, male), cmu-slt-hsmm (english, male) (optional,
# defaults to the systems' default voice or the first available voice)

@RichP It might actually be the case that you only think that Mary is used, but what is active is the Mac “say” command line implementation, because this is shipped within the io.voice bundle and is automatically active on Macs.

I suspect that @Rallymen007 is right and that there is some issue with the compatibility layer to make the TTS services correctly available to the runtime. There had been some refactoring going on in the past weeks that might have broken something. I’ll try to dig into it…

I have entered an issue:

Okay thank you.

My fix is merged and now available in the latest distro (#266).
I installed MaryTTS through the PaperUI and it worked as expected.
Note that if you install it through addons.cfg, the config parameter name has changed from “tts” to “voice”.

1 Like

Got the latest snapshot and everything works, thank you very much :smiley:

1 Like

I’m interested in using MaryTTS and playing the sound via Sonos.are there anyplas to incooperate that?

Plans yes (see, but nothing started yet…

It works fine with the latest snapshot

Kai is this till the case?
Looking at the paperUI it says “voice-marytts - 1.9.0.SNAPSHOT”.
Should it be “maryvoice” in addons.cfg instead of “marytts”?
Is installing Marytts by paperUI a different version as installing it via addons.cfg?


The parameter changed, not the name of the package. Your addons.cfg should have such a line:
voice = marytts

Ok thanks Rallymen :slight_smile:

Hello, I’ve been making little progress with speech so I found the thread with the title most relevant and hope you guys and gals out there can help me with that last bit of the issue.

I’ve installed the 2.1.0 Binding of MaryTTS
In PaperUI I’ve set up Configuration->Services (Voice tab)->Rule Voice Interpreter with a String called 'TTSSpeechVar’
This was created as an item as that is what the configuration seems to need

I have managed to get voice working (via other threads) so that openhab is now a member of group Audio and by using the console I have managed to use smarthome:voice say “some text” to get working audio.

In a rule I have a command to :-
‘say (“The light is on”)’

So far so good, problem is when the condition is met the error message in the logs is -
[INFO ] [] - Received HTTP PUT request at ‘items/Speechtest/state’ for the unknown item ‘Speechtest’.

And no audio is generated, whether I do this on my PC, my tablet, phone etc

I had previously used a variable called speechtest but when I was having issues I uninstalled the binding rebooted cleaned up and reinstalled the binding after reading various threads

So I get that SpeechTest is an unknown item but shouldn’t it be using TTSSpeechVar? - In fact I’m just not understanding why there is any reason for the ‘Rule Voice Interpreter’ when I just want to generate sound at this point, not have it respond to voice input.

Any help gratefully received