It looks like they simply wish to get paid.
TTS through Microsoft Translator could be a free alternative ?
<init-param>
<param-name>useFileMappedBuffer</param-name>
<param-value>false</param-value>
</init-param>
var String testString = "Das ist ein Test der Sprachausgabe über die Eingabeaufforderung - : \"Guten Morgen\""
testString = testString.replace("\"", "")
testString = testString.replace("-", "")
// testString = testString.replace(":", "")
logInfo("test.rules", testString)
executeCommandLine("C:\\Users\\Patrik\\OneDrive\\openHAB\\tools\\balabolka_console\\balabolka_console.exe -n \"Microsoft Hedda Desktop\" -t \"" + testString + "\" -w C:\\Users\\Patrik\\OneDrive\\openHAB\\webapps\\static\\GutenMorgen.wav")
executeCommandLine("C:\\Users\\Patrik\\OneDrive\\openHAB\\tools\\lame\\lame.exe --alt-preset voice --tt \"Guten Morgen\" \"C:\\Users\\Patrik\\OneDrive\\openHAB\\webapps\\static\\GutenMorgen.wav\" \"C:\\Users\\Patrik\\OneDrive\\openHAB\\webapps\\static\\GutenMorgen.mp3\"")
logInfo("test.rules", "Squeezebox TTS")
squeezeboxPlayUrl("Kueche", "http://192.168.10.100:8080/static/GutenMorgen.mp3", 50)
Hi all,also see the same problem here - no TTS with squeezebox/google translate anymore :-(. As I see the captcha if I use the URL in the java source code used by sqeezebox action. If I enter the string manually the .mp3 is still generated using the same API. Thus I think it's not the API; but Google that wants to prevent the use from scripts/programs.
To be independant from future surprizes like this I experiment with the balabolka console options to use system TTS to generate an mp3 in webapps/static that I can play via URL on the squeeze.In principle this would work fine - but unfortunatley the .mp3 file is locked by openHAB if it was accessed once via http:/... (see test code below).Any idea how I can replace the file once it has been accessed.
Testcode used:var String testString = "Das ist ein Test der Sprachausgabe über die Eingabeaufforderung - : \"Guten Morgen\""testString = testString.replace("\"", "")testString = testString.replace("-", "")// testString = testString.replace(":", "")logInfo("test.rules", testString)executeCommandLine("C:\\Users\\Patrik\\OneDrive\\openHAB\\tools\\balabolka_console\\balabolka_console.exe -n \"Microsoft Hedda Desktop\" -t \"" + testString + "\" -w C:\\Users\\Patrik\\OneDrive\\openHAB\\webapps\\static\\GutenMorgen.wav && C:\\Users\\Patrik\\OneDrive\\openHAB\\tools\\lame\\lame.exe --alt-preset voice --tt \"Guten Morgen\" \"C:\\Users\\Patrik\\OneDrive\\openHAB\\webapps\\static\\GutenMorgen.wav\" \"C:\\Users\\Patrik\\OneDrive\\openHAB\\webapps\\static\\GutenMorgen.mp3\"")logInfo("test.rules", "Squeezebox TTS")squeezeboxPlayUrl("Kueche", "http://192.168.10.100:8080/static/GutenMorgen.mp3", 50)
Hi Patrik, I'd be interested in some nice detailed instructions in the wiki to get something working on Windows with a decent sounding voice. I like the idea of not having to rely on an internet connection for TTS especially if openhab is talked about as an intranet of things.
Who knows maybe Cortana in windows 10 could be made to speak out...
Hi all,found how to solve the locked file problem; the following link explains how to disable "useFileMappedBuffer" for windows ... with this value set to false I can update files in webapps/static even after they have been accessed :-).
<init-param>
<param-name>useFileMappedBuffer</param-name>
<param-value>false</param-value>
</init-param>
Note - the test code in my earlier code did not work - I had to use to executeCommandLine:
--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/Sb8CuHDDCBk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
To view this discussion on the web visit https://groups.google.com/d/msgid/openhab/882baea2-2702-4d02-9c35-dbf14f630d33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
After few tests, I discovered that the Google API is working again if you just a "client" parameter. So if you add "client=openHAB" in the request, it should work. So probably an easy fix to do in openHAB.
googletts:translateUrl=http://translate.google.com/translate_tts?tl=%s&q=%s&client=openHAB
public class Squeezebox {
// ...
private final static String GOOGLE_TRANSLATE_URL = "http://translate.google.com/translate_tts?tl=%s&ie=UTF-8&q=";