HA Component for playing audio from machine, where HA is installed

I’m playing with Music Player Daemon (MPD) (and I’ll try cmus) but now without results. Simple component for playing audio via local (default) soundcard would be really nice. Especially when used with TTS subsystem.

Hey @maximkrusina

How did you get on with MPD? Does it work for you? Mine keeps on disappearing i.e. become unavailable.

I have really good luck wiht mpd (actually mopidy but using the mpd component) but I admit I don’t use it for tts I don;t think the nature of mpd doesn’t lend itself very well to that sort of ad hoc playing.

This Request deserves a lot of votes, especially for Hass.io users.
At the moment the only RPI media_player that is available is Mopidy and it is terrible:

  • It is laggy,
  • Poor audio quality ( there’s a lot of background noise )
  • Has a lot of bugs and errors ( media_player unavailable, task-never-retrieved-errors, etc… )
  • Has limited functionality.

Hass.io users don’t have a good platform for TTS on their Raspberries yet.

I’d encourage every Hass.io user to vote for this topic.

2 Likes

Vote for that! I cant configurate mpd player, seems to be unavaiable

I have a rpi3 that its only purpose is TTS through its analog jack to my amp to speakers in the house. I have never been charged using amazon but a lot of my responses get cached so I don’t use it that much.

##################################################################
###########################################################################
tts:
  - platform: amazon_polly
    aws_access_key_id: !secret AWS_ACCESS_KEY_ID
    aws_secret_access_key: !secret AWS_SECRET_ACCESS_KEY
    region_name: 'us-east-1'
    voice: Salli
    cache: true
    time_memory: 60
media_player:
  - platform: vlc
    name: speaker
    arguments: '--alsa-audio-device=hw:0,0'
automation rpi3_talk:
  alias: rpi3_Talk
  trigger:
    - platform: state
      entity_id: 
        - sensor.saythismac
        - sensor.saythispi
  action:
    - service: logbook.log
      data_template:
        name: Saythis
        message: >
                 ***********{{ trigger.from_state.state }}***to***{{ trigger.to_state.state }}*****
    - service: tts.amazon_polly_say
      entity_id: media_player.speaker
      data_template:
        message: >
                 {{ trigger.to_state.state }}
        cache: true

Im sorry but . what ?
" you have a rpi for tts" most of us here do have one.
“you have never been charged, but your responses get cached, but you dont use it that much”
i mean, What ?

so confused now …

Then again… doing a quick search and using logic.
1 people in this thread are using HASS io, they are requesting help to get better audio out of a RPI.
Step 2
Goto components (on the home assistant site ) type in VLC (that is what ronDIY ia using inatead of mopidy)
scroll all the way down, and read the words that will burst your bubble of having bearable sound out of your RPI with HASS io.,

But anyway, MPD
For hass io it is a terrible workaround to get TTS out of your RPI.
That the RPI isnt a HIFI power system for audio I knew that. But this is insane.
The amount of white noize make it unusable.
I can confirm that the rpi can do the tts on the AUDO out jack plug, using just domoticx that has native support for audio.

BUT
I love HA, ill never go back to that other program, but it would be nice if there could be audio support in one of the upcoming updates,

A fan

Sorry for the confusion, I wanted to say

I use a raspberry pi with HA and VLC installled (not Hass.io) for mainly TTS at my house. It works perfectly and I use it many times a day. I use amazon polly for TTS which does charge for its services but I have never been charged as I don’t use it enough.

1 Like

ah i understand ,.,. cheers m8

Not sure I understand exactly the issue, is it that your audio has too much noise or you get no audio? FWIW, you can get a $4 usb sound card and use that. Also cool if you want to plug in a mic and use Snips :slight_smile:

it’s not possible on hassio to use usb speakers, or if you know the solution please write it in order to help others. vlc cannot be installed and mpd does not have an option for usb. hassio is stuck using audio jack , neither usb or bluetooth.

There’s no reason it shouldn’t work, I have used usb speakers and microphones on hassio.

how you configured the player to output audio via usb ? i have searched everywhere and all saying the same thing that cannot use usb for audio via mopidy the only local player on hassio.

Hmm, you know I hate to say it but that is a good question. I have been working with the hassio snips addon and I can specify the asound settings to point to the right card, but I am not sure how you would do it in the base hassio setup. Try asking on the discord channel.

1 Like