squeezeboxSpeak does not speak

Got no 503 Error, but i am back to start. Current stream is on hold some seconds silence and than the stream rsumes.

Thomas

Exactly my problem (using a Squeezebox receiver)!
And when I looked closer (via the SqueezePlay player on my Mac) I saw a 503 Service unavailable.

I also noticed a problem with the squeezeboxspeak action and it appears the Google TTS services is failing once in a while. When it happens the following output is written to the LMS log file:

[15-11-01 11:02:51.6133] Slim::Utils::Scanner::Remote::__ANON__ (240) Error: Can't connect to remote server to retrieve playlist for, http://translate.google.com/translate_tts?tl=nl&ie=UTF-8&client=openhab&q=tussendeur%20hal%20staat%20nog%20open: 503 Service Unavailable.

This happens with the 1.8 snapshot of the binding.

It would be nice not having to rely on Google’s external text-to-speech service and a alternative, perhaps local text-to-speech can be configured.

I am also getting the 503 error. I agree that it would be better not to rely on google TTS.

I would much prefer if there was a way to supply my own mp3/wav file that contains the announcement I would like to make. Is there any way that could be implemented easily as an alternative to TTS?

Would squeezeboxPlayUrl work for that?

not without the ability to restore the previous playlist, volume, and player state. that is what I really love about the squeezeboxspeak action…

Perhaps you could propose a new action method signature that would restore the previous state, and if it’s possible, someone could make a pull request? Sorry I didn’t search if this is covering old ground or what the limitations are…

Hello,

any news about this? I have the same problem. Or has anyone another Solution?

Found it here: GoogleTTS responding with 503 error (even after the URL fix)

Hi,

I have read through the various forum posts and still can not solve this issue. The TTS URL is working ok when checked manually. The binding is v.1.8.1. The action is the same version and referenced in the rules file.

However every time the rule is called I get this error message in the openhab log…

“Error during the execution of rule ‘Test Squeezebox Speak’: The name ‘String’ cannot be resolved to an item or type.”

I am using the command - squeezeboxSpeak(“Kitchen”, “Smart house test”).
I have comms with both server and squeeze boxes with openhab.

Any ideas would be appreciated.

Tim

That sounds like a syntax error in your rule. Could you provide your rule file contents here?

Hi,

My rule is here…

// Squeezebox Speak Test
rule "Squeezebox Speak"
when
Item TiminLounge changed
then
squeezeboxSpeak(“Kitchen”, “Smart house test”)
end

What do you think?

Is there more content in this .rules file than just the rule you provided?

This is the contents of the entire rules file. Admittedly there was more unnecessary rules present and another squeezebox speak command buried at the bottom which may have been causing the issue.

Now there are no errors but I can’t see the rule executing either.

import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
import org.openhab.action.squeezebox.*
import org.openhab.io.squeezeserver.*
import org.openhab.io.multimedia.tts.googletts.*

// Squeezebox Speak Test
rule "Squeezebox Speak"
when
Item TiminLounge changed
then
squeezeboxSpeak(“Kitchen”, “Smart house test”)
end

If the above is the entirety of your .rules file, then none of your import statements are needed. Imports aren’t needed for invoking Actions. You would only need to import org.openhab.core.library.types.* if you were directly using types like DecimalType, StringType, etc. In openHAB 2, even that import is no longer needed.

If, after stripping your rules file down the bare minimum the action is still not working, then there may be a problem with the squeeze: configuration lines in your .cfg file. You could add logInfo("speak", "before call") and logInfo("speak", "after call") around your squeezeboxSpeak action call to see if the rule is even being invoked.

Still no luck. It seems the rule is not now executing which it was before. Not quite sure why?

This is not my rules file:

// Squeezebox Speak Test
rule "Squeezebox Speak"
when
Item TiminLounge changed
then
logInfo(“speak”, “before call”)
squeezeboxSpeak(“Kitchen”, “Smart house test”)
logInfo(“speak”, “after call”)
end

This is the squeezebox section in my cfg file:

################################## Squeezebox Binding #################################

Host address of your Logitech Media Server

squeeze:server.host=192.168.1.5
squeeze:server.cliport=9090
squeeze:server.webport=9000

squeeze:ttsurl=http://translate.google.com/translate_tts?tl=en&ie=UTF-8&client=openhab&q=%s
squeeze:ttsmaxsentencelength=100

Id (MAC address) of your first Squeezebox

squeeze:.id=00:04:20:16:16:8d

Id (MAC address) of your nth Squeezebox

squeeze:.id=00:04:20:18:1c:7f

Appreciate your support so far. Any ideas on what I am doing wrong?

I don’t use the binding so I’m not sure, but the wiki page confuses me. I am doubtful that “Kitchen” is correct because I don’t see it defined anywhere. Have you tried “server” instead of “Kitchen”?

In any case, the wiki page and/or the examples in openhab_default.cfg should be reconciled with the actual implementation.

…reading the code, it looks like you would need lines like:

squeeze:Kitchen.id=00:04:20:16:16:8d
squeeze:Bedroom.id=00:04:20:18:1c:7f

It looks like you are not providing the playerId in those config lines?

Here is my proposed fix for openhab_default.cfg:


############################ Squeezebox Action and Binding ############################
#
# Host (IP address) of your Logitech Media Server
#squeeze:server.host=

# Port of CLI interface of your Logitech Media Server (optional, defaults to 9090)
#squeeze:server.cliport=

# Webport interface of the your Logitech Media Server (optional, defaults to 9000)
#squeeze:server.webport=

# TTS URL to use for generating text-to-speech voice announcements
# the URL should contain one '%s' parameter which will be substituted
# with the text to be translated (new as of openHAB 1.8)
# (defaults to Google TTS service using the URL below)
#    http://translate.google.com/translate_tts?tl=en&ie=UTF-8&client=openhab&q=%s)
# (another TTS service is http://www.voicerss.org/api/ which requires an API key)
#    https://api.voicerss.org/?key=YOURAPIKEYHERE&hl=en-gb&src=%s
#squeeze:ttsurl=

# Maximum TTS sentence length - for example the Google TTS service only
# permits up to 100 chars - the Squeezebox speak action will break long
# strings into sentence chunks call the TTS service repeatedly
# (defaults to 100)
#squeeze:ttsmaxsentencelength=

# Id (MAC address) of your first Squeezebox.  MAC addresses of players are case-sensitive. 
# Use small letters (a-f) if the address contains them. Example:
# squeeze:Kitchen.id=de:ad:be:ef:12:34
#squeeze:<boxId1>.id=

# Id (MAC address) of your nth Squeezebox
#squeeze:<boxIdN>.id=

Can you suggest any further improvements?

Maybe I had the wrong syntax in the .id string for the squeeze players. I was using <> around the name. I have now removed these.

Now I have in the cfg:
squeeze:Kitchen.id=00:04:20:16:16:8d
squeeze:Shower.id=00:04:20:18:1c:7f

I have always been receiving messages in the log from both players and server and they continue to be received.

Still can’t see the rule executing though. Which it was before although with error. Now all I can see is the switch status change which is supposed to trigger the rule.

If that is your rule file contents, and you know that an item exactly named TiminLounge (case sensitive) is changing state (as opposed to receiving a command), then it all looks right to me.