Snapcast + TTS

Did you install python-gst-1.0 or python3-gst-1.0?

I used python3-gst-1.0 (as I referenced at the top of my post)

I followed the config guide at https://home-assistant.io/components/media_player.gstreamer/ which seems to have been updated to include the correct reference. (You know it’s updated, you updated it lol)

But it’s still throwing the syntax based error… [scratches head]

From the start of my attempts, I had used python3-gst-1.0. After I found this thread, I also ran sudo apt-get remove python-gst-1.0 and it was not installed. So I can be sure I only have the python3 version

It is still python2 version you’re running since you don’t get the print with parenthesis. Try sudo apt install python3-gi

I should be on python3.

But I will give that a shot.

Output of the shot given:

$ sudo apt install python3-gi
Reading package lists… Done
Building dependency tree
Reading state information… Done
python3-gi is already the newest version.
python3-gi set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I’m using a pi3 and I used the all-in-one installer from 2-16-17.

Sorry missed this:

ln -s /usr/lib/python3/dist-packages/gi /srv/homeassistant/lib/python3.4/site-packages

You might need to alter the paths

This is on a hassbian so might differ for others

I symlinked like referenced above:

sudo ln -s /usr/local/lib/python3.4/dist-packages/gi /srv/hass/hass_venv/lib/python3.4/site-packages

but modified for my environment

sudo ln -s /usr/local/lib/python3.4/dist-packages/gi /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages

And still no luck? Crap…

Ya still no luck. lol.

Hi, I have the same issue. Do you had the chance to solve the issue?

Had the same issue, and @yblegal I think the issue is this - don’t install the gi in the virtual environment…

So, from where you are, I think this should solve it…

 sudo su -s /bin/bash homeassistant
 source /srv/homeassistant/bin/activate
 pip3 uninstall gi
 ln -s /usr/lib/python3/dist-packages/gi /srv/homeassistant/lib/python3.4/site-packages

Hi all,

I tried to use snapcast client with TTS without success:

Here’s the automation I made to test it:

- alias: Test
  trigger:
    - platform: time
      minutes: '/1'  
  action:
    - service: notify.pushbullet
      data_template:
        message: 'Test'
    - service: tts.google_say
      entity_id: media_player.snapcast_client_000000000000
      data_template:
    message: 'Test'   

It works in pushbullet, but no results in snapclient.

Here’s the error i see in log:

Error executing service <ServiceCall media_player.play_media: media_content_id=http://192.168.2.100:8123/api/tts_proxy/640ab2bae07bedc4c163f679a746f7ab7fb5d1fa_it_-_google.mp3, media_content_type=music, entity_id=[‘media_player.snapcast_client_000000000000’]>
Traceback (most recent call last):
File “/usr/src/app/homeassistant/core.py”, line 1010, in _event_to_service_call
yield from service_handler.func(service_call)
File “/usr/src/app/homeassistant/components/media_player/init.py”, line 402, in async_service_handler
yield from getattr(player, method[‘method’])(**params)
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 327, in iter
yield self # This tells Task to wait for completion.
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 243, in result
raise self._exception
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/media_player/init.py”, line 693, in play_media
raise NotImplementedError()
NotImplementedError

Please notice that if I open the audio file I can listen to it!

Can someone please support me?
Thank you in advace!

Snapcast won’t work like that. You need to set up a different media player to send it to snapclient

Can you be more specific please? I don’t understand what actions I need to do.

Thank you

Snapcast plays from existing sound sources. So you need another media player to actually play the sound. That media player needs to be configured to play to the snapcast named pipe.

I suggest mpd.

1 Like