All I want to do is output TTS to my Pi via the 3.5 headphone jack, but I just can’t get it work with vlc.
Are there any other options? I am very desperate at this point, because I’ve been trying to make vlc work for the last 6+ hours.
All I want to do is output TTS to my Pi via the 3.5 headphone jack, but I just can’t get it work with vlc.
Are there any other options? I am very desperate at this point, because I’ve been trying to make vlc work for the last 6+ hours.
I feel your pain, i had VLC on a pi2 with TTS and it was spotty and ended up playing the voice somewhat slow. I had a pi3 so I loaded raspian and put HA in a virtual env with only VLC in it. I had to add VLC and pulse audio from command prompt but that was it. It worked great and was clear. I then decided I wanted to add airplay to the pi3 and when I did that VLC and airplay stopped working. I tried everything to get it back to how it was but decided to just reload the boot image i had made. Its now back to working great with VLC.
I found try using aplay to play from a file sometime got VLC to work again. Also running VLC from command prompt provide some errors if there are any.
I found omxplayer work great to play audio on a pi but its not a HA component yet.
after a couple of more painful hours, i finally figured it out:
The issue was this (its the official recommendation here):
media_player:
platform: vlc
name: speaker_1
arguments: ‘–alsa-audio-device=hw:1,0’
I changed ‘–alsa-audio-device=hw:1,0’ to ‘–alsa-audio-device=hw:0,0’ (default) and now it works.
hw:1,0 is used to access the first device on the second soundcard/device. Why this is in official HA documentation I don’t know.
It worked for me, hopefully it does work for you too.
It would be great if you could update the documentation
I am actually experience the same issue that I did on my Rpi2 with my Rpi3. I find VLC / Alsa doesn’t work after a period of time like overnight and won’t work regardless of what it done until the 3.5mm audio jack that I use is unplugged and plugged back in. Does anyone see this?
I am thinking of putting a relay on the audio wires to my amplifier so I can simulate unplugging but I am not sure this would work.
can’t confirm yet, it has been working nicely ever since I found the fix - but I’ll update if I encounter issues