Picotts + vlc no output

Hello,

I’m trying to setup a local audio output on my pi3. After reading a bunch of threads, I went with vlc-nox and picotts but I’m stuck with no sound from HA.
Running 0.37.1 AIO installer, I have this in my config:

tts:
  - platform: picotts
    language: 'fr-FR'

media_player:
  - platform: kodi
    host: yoda
    name: Kodi
    username: xbmc
    password: !secret xbmc_password
  - platform: vlc
    name: vlc

in my script yaml:

test_vlc:
  sequence:
    - service: tts.picotts_say
      entity_id: media_player.vlc
      data:
        message: 'Que la force soit avec toi.'
test_kodi:
  sequence:
    - service: tts.picotts_say
      entity_id: media_player.kodi
      data:
        message: 'Que la force soit avec toi.'

Test_kodi is working well. Test_vlc is not playing.
After different things, I can say:

  • wav file is created in /.homeassistant/tts

  • wav file can be played in command line with pi user

  • wav file can’t be played in command line with homeassistant user:

    pi@pi:/home/homeassistant/.homeassistant/tts $ sudo su -s /bin/bash homeassistant
    homeassistant@pi:~/.homeassistant/tts$ ls
    c6832f313b8a4fd38a2f0ee1eb91a13a59d4249e_fr-fr_-picotts.wav
    homeassistant@pi:~/.homeassistant/tts$ vlc c6832f313b8a4fd38a2f0ee1eb91a13a59d4249e_fr-fr
    -_picotts.wav
    VLC media player 2.2.4 Weatherwax (revision 2.2.3-37-g888b7e89)
    [009f0550] core interface error: no suitable interface module
    [009d08f8] core libvlc error: interface “globalhotkeys,none” initialization failed
    [00a689b8] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
    [00a689b8] core interface error: no suitable interface module
    [009d08f8] core libvlc error: interface “dbus,none” initialization failed
    [009d08f8] core libvlc: Running vlc with the default interface. Use ‘cvlc’ to use vlc without interface.
    [009f0608] [cli] lua interface: Listening on host “*console”.
    VLC media player 2.2.4 Weatherwax
    Command Line Interface initialized. Type `help’ for help.

    ALSA lib confmisc.c:768:(parse_card) cannot find card ‘0’
    ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
    ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
    ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
    ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
    ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default
    [00a6eee0] alsa audio output error: cannot open ALSA device “default”: No such file or directory
    [00a6eee0] core audio output error: Audio output failed
    [00a6eee0] core audio output error: The audio device “default” could not be used:
    No such file or directory.
    [00a6eee0] core audio output error: module not functional
    [75a01a38] core decoder error: failed to create audio output

I’m not sure what or where to look at.

Thx for any advice.

What audio device are you trying to get output from also what does

aplay -list_devices

output. And last but not least did you add homeassistant to the audio group?

~Cheers

The audio group did the trick. Thank you very much.

1 Like

can you explain the trick ? how to add homeassistant to the audio group ?

Read the docs :slight_smile: https://home-assistant.io/components/media_player.vlc/#additional-configuration-for-rasperry-pi

1 Like

Thanks so much.
Is there other tricks to have a correct volume ?

I think you can set the volume from the frontend?

1 Like