Please help! say command does not work ?!

I used VoiceRSS service to create a TTS system with OH version 1.8.3 on my raspberry pi 3. Here are my configuration under openhab.cfg:

###################### GoogleTTS configuration ############################
#
# The language to be used by the GoogleTTS engine (optional, default: 'en').
# Language must be supported for audio output by https://translate.google.com.
googletts:language=en-gb
# Sentence delimiters used to split text into sentences (optional, default: !.?:;)
# googletts:sentenceDelimiters=
# Google Translate URL to be used for converting text to speech (optional,
# defaults to http://translate.google.com/translate_tts?tl=%s&q=%s&client=t).
googletts:translateUrl=https://api.voicerss.org/?key=xxxx&hl=%s&src=%s

Where xxxx is my API key. In the rules file of mine:

rule "Dog Enable"
    when   
            Item itm_dog_gps_alm_enb changed from OFF to ON
    then   
		say("Hello")
    end

I did have an switch item call “itm_dog_gps_alm_enb” before, but whenever I toggled the switch I didn’t hear any sound played by my raspberry pi. I did change the audio output of my rasp to 3.5mm jack and played a sample wav file, everything was OK, so I suppose there are several mistakes during my configuration. Anybody can help me, please? Thanks in advance :sunny:

Anybody help me?

Start simpler, use playSound()


in your rule to start with, then you can see if the problem is with rule or with TTS.

I tried playSound command and I heared clearly the content of mp3 files under sounds folder. So the problem is definitely my say command or my TTS engine.

I installed both voicerss and espeak service and I successfully tested those services to work on my Raspberry’s terminal. How about using script file or exec binding to say whatever I want? For example the date time or the items’ state and values everytime they change. But i dont know how to write those script files, neither using exec binding. Is there any example? thanks in advance