VLC in Raspbian fails to say the final of the phrase (TTS) (In Pi3 3.5mm output)

I have VLC setup that fails to say all the phrase. It always truncate the last word, or let’s say, the final part of the phrase. It was working fine and I believe that the issue came together with an “sudo apt-get update” and “sudo-apt-get upgrade”, but not sure. Maybe a HA update.

My configuration:

      - platform: vlc
        name: speaker_1
        arguments: '--alsa-audio-device=hw:0,0'

All other Chromecasts TTS fine.
Anyone have an idea how to fix it?

Now a weird fact. I tested to play (services) the same audio file that was generated:

media_player.play_media
media_player.speaker_1

Service data:
{ "entity_id": "media_player.speaker_1",
"media_content_id":
"/home/homeassistant/.homeassistant/tts/813e12d1326f94671ab1efd29f9361a1ecedeafb_pt-br_-_google_translate.mp3",
"media_content_type": "music"
}

Then the same audio is played correctly! How can this happen?
Can it be something broken in the HA side?

HA was updated a few times and the issue is still present. I could not find a fix for this. It is weird that it seems that only my is having a trouble like this…

I’m having the same issues ever since HA update and python 3.7 upgrade :frowning:

From what I can remember, I was having this issue before updating to python 3.7.
I still could not find a fix for this…

Upgraded my Raspbian from Stretch to Buster, reinstalled VLC and the problem still persists. Are we the only ones having this issue? Its definitely something on the HA side since the “mp3” file is created correctly but playback from HA doesn’t complete the phrases. Seems like its timing out sooner

That’s bad news. I still have the problem. Yes, it seems that we are de only ones that is having this problem, since this thread was opened for a while.
As I stated before, the file for TTS is created correctly, and media_player.play_media can play it perfectly.
That’s is pretty annoying. But since I had no luck in fix it and also the thread didn’t catch much of interest, I created an input_list in order to choose where my TTS will be played. I am using a chromecast for the task at the moment, but it should be working in another place instead. Maybe in the future I would use VLC for TTS again. Or not…

Poking around the Home Assistant source, I see that they are using “VLC bindings for python” aka “python_vlc” version 1.1.2 which is VERY old (released in 2015). The latest version is python-vlc 3.0.7110. Not sure if there are reasons why HA is using such an old version. This binding is used to call VLC outside HA of which I suspect is the culprit. Maybe the old binding are no longer 100% compatible the VLC on the PI3. Will try and downgrade my PI3’s VLC and test as I don’t know how to upgrade the HA old bindings

Thanks for investigating this. It would be nice to call some attention from developers on this. The Pi3 is probably the most used device to host HA.

I have had this same problem, also. I have been going into the tts folder, finding the phrase and playing it as an mp3. However, it would be great to be able to use the tts again.
I noticed “media_duration”: 2.52 in the attributes for the speaker, but I don’t know if that is cutting the message off.

After upgrading to v0.101.2 all of a sudden the speech utterance from HA is now complete :wink:
not sure what the HA team changed, but whatever it is it now works… Even after the upgrade to v0.101.3 its still intact

That’s great! I am still using 1.101.0. I will update it to test.
Thanks for pointing this out.

I updated to v0.101.3 and the issue persists. So bad.
Can anyone confirm?