Reduced latency version is complete. My testing shows a latency of ~ 0.1 seconds from entering into my device handler until sent to sendHubCommand for processing of the notification audio.
It is a test since I need to exercise it for a few days to become formalized. I reduced timing by about 1.2 seconds and it (slight probability) may have unintended consequences.
I am trying out the test version. I am wanting voice notifications when a contact opens, or motion is detected.
Sometimes there is a 1 second delay, sometimes a 3-4 second delay. Sometimes the notification is repeated. I can tell that it does not like it if there are 2 events or more happening right next to each other, but that it wants something like a 2 second pause between the door opening, motion being noticed, and then the door being closed again. If all three events happening in a few seconds, it takes a while for the speaker to catch up.
I do like the preference of "notification volume increase in percent", as I want the speaker in the living room to be louder than the speaker in the bedroom. That was a great idea.
My testing was using less than one second between events. Very few problems. Would adding a "recover audio after notification" option be acceptable?? It would bypass the channel player recovery parsing activities - but if you are playing audio it would not recover.
Also, the minimum time between audio notifications in the queue is 3 seconds. This seems reasonable (allow you to process one in your mind before the other begins).
Dave, I uninstalled everything, rebooted the HE and started all over, again. I decided to stick to driver 2.2.01, and it seems to have stabilized to notify on both speakers after about 2 seconds of something being opened. I think I will just leave it as is, you have done enough work and I sure do appreciate it.
I am getting an error in the app. I have a Samsung J6500 soundbar. I have setup the app and drivers. Once installed, I changed the device driver to Samsung Soundbar and Save Preferences.
When I try to change the input source using the command button, I get the following error:
[dev:1095](http://192.168.86.5/logs#dev1095)2019-04-20 08:06:44.393 am [error](http://192.168.86.5/device/edit/1095)java.lang.NullPointerException: Cannot invoke method size() on null object on line 777 (inputSource)
J6500 is not on the current supported list. I need some data and will add to the list (this is because (especially on sources), each of the soundbars is different.
Information request:
Confirm your soundbar is controllable via the Samsung Multiroom Application.
From your soundbar manual, what is the list of available inputs. Example (for J7500) : ["wifi", "bt", "soundshare", "aux", "optical", "usb", "hdmi"]
Status:
I am currently (right now) finalizing some updates to the driver. The improvements will provide a faster driver with better TTS Queue processing. Should be done this week-end (I have to test all the functions in many combinations).
If you want TTS Text Notification, go to site in preferences and obtain a TTS Key.
Set the TTS langauge.
Run Save Preferences.
I would like you to test the inputSources and make sure they all work. There may be some back-and-forth here.
Note, for TTS to work. You will have to get a FREE account at the site in the prefereces!! It is super easy and FREE. They do not ask for $$$ or any other personal info - just set up an account with a valid e-mail.
If you are talking about the default voice, this is set in status - hub details. There is a drop-down with the hubitat accepted voices.
To expedite, and in case you are asking something more detailed:
The command (from Common Methods documentation) is
textToSpeech(String stringToBeSynthesized, String voice = null)
I assume that any of the drop-down voices could be used in the actual command. Sadly, the default "Speak" command does not take the voice parameter - it uses the set default. (Note the speak command comes from the capability Voice Synthesis".)
You could write an app that links to a speaker with audio notification capability, do the text-to-speech in the app, and send the tts comand output to the speaker in one of the following commands: Play Track, Play Track And Restore, or Play Track And Resume. Example:
child.playTrackAndResume(textToSpeech("Hello Everyone", "Nicole")). (Nicole is the name for Nicole, Female, Australian English from the drop-down. One of my favorite voices.)
Dave, a couple of days ago my voice notifications coming out of my 3 Samsung R1's stopped. I tracked it down to the following. I previously had the notifications come out as a music device, but it now only works if I switch it to be a speech device. Do you know why it would have just stopped working? I need it to come out as a music device so I can do the volume also, which is not an option on the speech devices.