I was so far using MaryTTS and wanted to switch to GoogleTTS. I did follow the installation instruction (including the billing part).
I installed the google voice addon and configured it accordingly. After selecting Google voice as default text to speach in configuration I was not able to select the google voices (just the Mary TTS voices were listed). I tried to uninstall google voice addon and MaryTTS and restart openhab and just installed the google voice addon. Now I can’t even select google TTS as default text to speach under configuration anymore even after a openhab restart. I installed MaryTTS again and I can select it as always. Any ideas what I could try?
I am on OpenHab 2.4.0 stable release.
NoTechi
Update: Found the problem. I enabled the google cloud api assuming this would include the tts api. Thats not the case so the tts api has to be enabled explicitly.
I gave it a test and with openHAB 2.5 the Google TTS add-on works fine for me on an Intel NUC and Raspberry Pi 3B.
Since the exception is spitting bytecode and talking about operands on stacks the issue seems low level. Maybe its due to file/memory corruption or some JVM issue? What Java version do you use?
Does anyone know if the addon caches the voice? Just like VoiceTSS does (with the bad quality)
So for example, i send “The alarm has been swiched on” to Google. Google sends a wavefile back and openhab saves the file and uses it again the next day when the alarm has been switched on. So this will cost only one time the characters.
This is because of the billing, i’m not jumpy about giving my credit card data to google with the risk, something went wrong with the speech engine and i will be billed… It’s just hobby
This is for example already 79 chars (in stead of 18 you will expect):
<speak> <say-as interpret-as="cardinal">12345</say-as> and one more</speak>
I have been using Google TTS alot for long. I have never had a bill. And because it do cache the voice, I doubt any “ordinary” people/family would ever reach the limit.
But nobody can say for sure if Google some day change the limit…
2020-01-24 15:05:15.385 [INFO ] [oauth2client.internal.OAuthConnector] - grant type authorization_code to URL https://accounts.google.com/o/oauth2/token success
2020-01-24 15:05:15.544 [WARN ] [.googletts.internal.GoogleTTSService] - Audio format OGG_OPUS is not yet supported.
2020-01-24 15:05:15.591 [WARN ] [.googletts.internal.GoogleTTSService] - Audio format OGG_OPUS is not yet supported.
But I can’t choose voice :
voice voices
An unexpected error occurred during execution.
and log :
15:09:26.903 [ERROR] [arthome.io.console.ConsoleInterpreter] - An error occurred while executing the console command.
java.util.NoSuchElementException: null
at java.util.ArrayList$Itr.next(ArrayList.java:862) ~[?:1.8.0_242]
at org.eclipse.smarthome.core.voice.internal.VoiceManagerImpl.getPreferredVoice(VoiceManagerImpl.java:438) ~[?:?]
at org.eclipse.smarthome.core.voice.internal.VoiceConsoleCommandExtension.getDefaultVoice(VoiceConsoleCommandExtension.java:108) ~[?:?]
at org.eclipse.smarthome.core.voice.internal.VoiceConsoleCommandExtension.execute(VoiceConsoleCommandExtension.java:85) ~[?:?]
at org.eclipse.smarthome.io.console.ConsoleInterpreter.execute(ConsoleInterpreter.java:55) [bundleFile:?]
at org.eclipse.smarthome.io.console.karaf.internal.CommandWrapper.execute(CommandWrapper.java:78) [bundleFile:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) [bundleFile:4.2.7]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) [bundleFile:4.2.7]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) [bundleFile:4.2.7]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) [bundleFile:4.2.7]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) [bundleFile:4.2.7]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) [bundleFile:4.2.7]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) [bundleFile:4.2.7]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) [bundleFile:4.2.7]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_242]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_242]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_242]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
re:
[org.openhab.voice.googletts ] - bundle org.openhab.voice.googletts:2.5.1 (288)[org.openhab.voice.googletts.internal.GoogleTTSService(315)] : The activate method has thrown an exception
java.lang.VerifyError: Bad type on operand stack
Did you find a solution to this problem? I am experiencing the same issue on Ubuntu 19.10 and haven’t had any luck working out what is going on.