VoiceRSS Customizing

Hello,

I want to use TTS Service (in habdroid or pc). I assume I have have to install one of the voice bindings therefore…

I installed the VoiceRSS binding. On voicerss.org I created an account to get my API Key. In the documentation I read that I have to add the API_KEY to the configuration… In the service folder I have the runtime.cfg with this parameter:

##################### VOICE ####################

# This parameter defines the default text-to-speech service to use (if not set, the first available one will be used.
#
#org.eclipse.smarthome.voice:defaultTTS=

# This parameter defines the default speech-to-text service to use (if not set, the first available one will be used.
#
#org.eclipse.smarthome.voice:defaultSTT=

# The default voice to use if no specific TTS service or voice is specified.
#
#org.eclipse.smarthome.voice:defaultVoice=

# The default human language interpreter to use if no other is specified.
#
#org.eclipse.smarthome.voice:defaultHLI=

Can I add the API_KEY here? Or should I create a additional cfg-file?
Do I have to customize the runtime.cfg as well?

What Is the next step? Can I use the command say in the rules? e.g.:

say("Hello")

http://docs.openhab.org/addons/voices/voicerss/readme.html

You have to add your API_KEY to your configuration, e.g. by adding a file “voicerss.cfg” to the services folder, with this entry:

apiKey=1234567890

Ok. done. And then this command should work:?

say("Hello")

I’ve no idea. I don’t use any audio commands.

In order to use the say command you need a voice service setup correctly AND a a audio sink setup in order to have speaker where the speach should be played.
Read here

thanks for the hint… but unfortunately I do not really understand what I have to setup in conf/services/runtime.cfg or in the Paper UI in Configuration->System->Voice :frowning:

Also I do not know what the audio sink setup is…
Is this really command which I can use in the command line on my raspberry??:

openhab> smarthome:voice voices

I get here an error…

I intend to use the say command in a rule. The speaker should be the smartphone speaker if I use the android app or the PC speaker if I use the PC (e.g. via basicUI)…

Maybe you can help me with the configuration? thx

To start of, you need to understand that all is done from the OH instance, it doesn’t matter from where you give the command.
OH uses audio sinks to send the audio to,.
Look into the docs posted, setup the VoiceRSS service as posted there and select a default audio sink (a speaker that is known to OH). If all theat is done the say command will work.

Here Screenshots of my Setup:


if I enter the command in the raspberry pi console I get this error:

[20:56:27] openhabian@openHABianPi:~$ openhab> smarthome:voice voices
-bash: openhab: command not found

Maybe you can help me with the config… what I have to enter in the file if I will use the voicerss… I really haven’t got a clue:

##################### VOICE ####################

# This parameter defines the default text-to-speech service to use (if not set, the first available one will be used.
#
#org.eclipse.smarthome.voice:defaultTTS=

# This parameter defines the default speech-to-text service to use (if not set, the first available one will be used.
#
#org.eclipse.smarthome.voice:defaultSTT=

# The default voice to use if no specific TTS service or voice is specified.
#
#org.eclipse.smarthome.voice:defaultVoice=

# The default human language interpreter to use if no other is specified.
#
#org.eclipse.smarthome.voice:defaultHLI=

Use PaperUI to set those, in there you can only select values ( in other words the syntax is checked for you!)

Additionally the smarthome:voice command news to be used on the karaf console!
Are you familiar with that?

great! thx

Configuration is done:

regarding karaf: I just tried with “ssh karaf@localhost -p8101” but I can’t access with password karaf…

please try ssh openhab@localhost -p 8101 with password habopen

openhab> smarthome:voice voices
voicerss:daDK VoiceRSS - Danish (Denmark)
voicerss:fiFI VoiceRSS - Finnish (Finland)
voicerss:ptBR VoiceRSS - Portuguese (Brazil)
voicerss:esMX VoiceRSS - Spanish (Mexico)
voicerss:nlNL VoiceRSS - Dutch (Netherlands)
voicerss:nbNO VoiceRSS - Norwegian Bokmål (Norway)
voicerss:koKR VoiceRSS - Korean (South Korea)
voicerss:plPL VoiceRSS - Polish (Poland)
voicerss:ptPT VoiceRSS - Portuguese (Portugal)
voicerss:enAU VoiceRSS - English (Australia)
voicerss:svSE VoiceRSS - Swedish (Sweden)
voicerss:caES VoiceRSS - Catalan (Spain)
voicerss:frFR VoiceRSS - French (France)
voicerss:jaJP VoiceRSS - Japanese (Japan)
voicerss:ruRU VoiceRSS - Russian (Russia)
voicerss:zhTW VoiceRSS - Chinese (Taiwan)
voicerss:zhCN VoiceRSS - Chinese (China)
voicerss:enUS VoiceRSS - English (United States)
voicerss:enIN VoiceRSS - English (India)
voicerss:zhHK VoiceRSS - Chinese (Hong Kong)
voicerss:deDE VoiceRSS - German (Germany)
voicerss:enCA VoiceRSS - English (Canada)
voicerss:esES VoiceRSS - Spanish (Spain)
voicerss:frCA VoiceRSS - French (Canada)
voicerss:enGB VoiceRSS - English (United Kingdom)
voicerss:itIT VoiceRSS - Italian (Italy)

which sink I have to use?

sorry, it was my mistake… see above

That depends on where you want to hear something. The system speaker makes sense only if you have one at your (OH) system.What is that Onkyo? What is that TXNr 45. .?

Onkyo and TX-NR545 is my AV Receiver…
I want hear it on my smartphone if I use the habdroid app… is it possible?

For something like that you need to use Web Audio, however that is only incooperated into HABPanel and PaperUI so far (I’ve just read that, I don’t have further knowledge).
IMHO by having either HABPANEL or PaperUI open on the device, a sound sent to Web Audio should be played.(keeping fingers crossed).

hmmm that is really not what I want… Nevertheless thank you for your support…
Maybe someone else has a idee how I can use TTS on the android app or basic ui…

The “idea” would be be to write the actually missing code for the Android app. At least that is what I understand from reading the docs.

Since I’m away from home, I needed to establish a VPN to do some changes on my PaperUI. The test with Web Audio ad a default Ausiosink gave me the audio feedback of a say command on the device having the VPN(that was as awaited) and another tablet which only had the browser avtive.

Did some more testing, the reason the sound was played on the tablet was a forgotten myopenhab tab which was open showing PaperUI.