Incorrect Announcement is playing

2.2.7.128, C-7, RM-4.1

I just added new announcement to the RM:
(sorry the text to speak is in russian)

For the test I am using a "Run Action" button.

Rule works and log shows a correct announcement to be played.

But wrong announcement is playing.
Instead last correct announcement is playing on both Symfonisk speakers.
So, this is definitely comes from the HE hub buffer.
I already had this issue in a past and fixed it by rebooting hub.
This time I did reboot hub twice but problem was not corrected.
Surprisingly I can play all old announcements but not this new one.
As soon as I am trying to test it I am getting previous announcement.

What device are you trying to send the TTS to? Google? Sonos? Other?

I believe that when announcements are made, an .mp3 is generated and cashed on the hub. I suspect that it might use previously created ones if the same message is sent again. If so, it might be that for whatever reason it thinks that the same message is being sent again…

What happens if you try to change the message?

TTS devices are two Symfonisk speakers.
I have no idea how TTS works in details but definitely
message is buffered on the hub.
I was able to play any of my previously created announcements.
This last one looks good by every means but is playing previous
message instead of this new one. I am trying to retype messages.
It could be whatever unrecognized character in the message
preventing it to be buffered and as a result old content of the
buffer is sending to the speakers.
Let me see.

1 Like

Okay. Did a quick search and I see that those are the Ikea speakers (they are actually produced by Sonos as far as I know…).

I assume you are using the Hubitat Sonos driver (versus a community driver)? (I don’t have those speakers -yet- so doing some assuming here…)

Yes, I am using native Hubitat Sonos driver.
The whole point for the Symfonisk Speakers was:

  • I need native non cloud based support fo rthe TTS
  • I need Russian language for the announcements

Fo rthe test I split my long message into 2 shorter:

Now only second message is playing back.
First one is simply ignored.
I already have a rule with exactly the same implementation.
The older one works without any problems.

I suspect the issue is with the Sonos driver… Do you see anything in your logs? Try turning on logging for the device in question as well, just in case.

All logs are 100% correct.
And surprisingly all my older very similar rules are forking just fine.
I am very surprised this new very simple one is not working
and has very funny behaviour.
I guess, I will delete it, reboot hub and create (or maybe clone)
this rule from scratch.

Okay. Let us know if that makes a difference!

Tagging @gopher.ny in case there is something that he can see as a potential cause of this…

Whatever happens makes no sense.
Here is rule N1:

And here is rule N2

These two rules are identical by function but of course, Trigger and
Announcements are different.

When I am using "Run Action" for the rule N1 the correct announcement is playing.
However if I am using "Run Action" for the rule N2 log shows everything correct


but played announcement is from the rule N1 (not from rule N2).
I have few more TTS related rules and all they are fine.
However rule N2 (this one was latest added) always plays announcement from the
last correctly played rule.
Both speakers are playing the same announcement.
This tells me speakers are fine but hub is sending wrong TTS.
Rebooting hub did not fixes the problem.
Is it any limitation on number of rules with predefined announcements?
At this time I am very confused what else I should try in order to fix this problem?

can you please do the following:

  1. run action for rule n1, then take a screen shot of the sonos speaker current states, i need to see the trackData attribute value.
  2. run action for rule n2, and again post a screen shot of the trackData attribute value.
    Thanks!

OK,

Bd Symfonisk Speaker status after playing rule N1:
image

and after playing rule N2:

image

Addition.

Now few previously working fine rules with announcements started the same problem.
I.e. playing incorrect (last played) announcement.
Other actions if resent executed correctly.
Only announcements became broken.

yeah, the TTS engine is not dealing correctly with the character set, we'll get this fixed.

1 Like

Sounds good, Thank you.

So, is TTS engine does not like Russian at all or just few specific characters?
Is it any characters to avoid?
Or is it any work around before fix will come?

its not going to like any 16bit character set.

Wait a minute.
Which characters are 16bits?
I guess, Russian characters are 8bit vs normal 7bit ASCII.

@mike.maxwell

I understand, I have to wait for the fix but this definitely is not high priority
and potentially will take a while.
But I need the fix or any reasonable work as we speak.
Meanwhile could you please suggest any possible workaround except for writing an app?

  • Can I clear TTS cash?
  • Can I create MP3 from TTS and then play predefined MP3 files?
  • Create a String_Variable with the Text-to-Speak and send it to the speakers?
  • Will it help if I delete all speech related rules and recreate them from scratch?
  • Which device should I use for TTS Music Player or Speech Device?
    (BTW, what the difference between these two?)

If the only way to get it working right is to write my custom application
(this is least desirable option) is it any good example to start with?

for now if you use a latin character set it should work fine.
I can't tell at the moment if the issue is in our internal method that accepts the text string and returns a tts url for the device to play, or in the code in the device driver.

The internal tts method creates an mp3 with a file name from a hash of the text passed in and the default voice being used.

So as long as the text and or the voice is different the existing generated file won't be used.

Well, I tried yours suggestion.
Unfortunately this did not fix a problem.
Again, some rules (but not all) are simply playing previous message.
In addition it is impossible to substitute adequately all russian characters with latin.
For some messages this works almost right but for many it does not.

Where is a location for all these created MP3 files?
How I can delete all of them (it must be a way to do this)?
If I do a BACKUP-SOFT_RESET_RESTORE will this clear all created MP3 files?

I created like a dozen of announcements and up to last one all worked as expected.
I am trying to understand why the problem did not happen right away but
suddenly popped up?
If this is related to 8bit Russian character set it should manifest itself almost immediately
but instead it showed up after many successful rules were created and were running OK.
Something is not right with this picture.

Also, what is the difference between Music Device and Speech Device if any?
And if they are somewhat different which one to use?

Currently you can't.

You can see the commands associated with capabilities here.
https://docs.hubitat.com/index.php?title=Driver_Capability_List