home-assistant / addons

:heavy_plus_sign: Docker add-ons for Home Assistant
https://home-assistant.io/hassio/
Apache License 2.0
1.56k stars 1.51k forks source link

[PIPER] add url to use as media_content_id in service media_player.play_media #3026

Closed jorisrymenants closed 1 year ago

jorisrymenants commented 1 year ago

Describe the issue you are experiencing

Currently I am using google translate to play media on my sonos. I am not using tts.speak but media_player.play_media because this way a volume can be send in the same service call:

service: media_player.play_media
data:
  media_content_id: media-source://tts/google_translate?message=De wasmachine is klaar
  media_content_type: music
  extra:
    volume: 40
target:
  entity_id:
    - media_player.badkamer_sonos_announce

I tried using piper in the same way: service: media_player.play_media

data:
  media_content_id: media-source://tts/piper?message=De wasmachine is klaar
  media_content_type: music
  extra:
    volume: 40
target:
  entity_id:
    - media_player.badkamer_sonos_announce

But this results in an error: "Provider piper not found"

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

Almond

What is the version of the add-on?

0.1.2

Steps to reproduce the issue

1. 2. 3. ...

System Health information

System Information

version core-2023.5.0
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.11
os_name Linux
os_version 6.1.25
arch aarch64
timezone Europe/Brussels
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.31.0 Stage | running Available Repositories | 1279 Downloaded Repositories | 14
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | pending can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 10.1 -- | -- update_channel | stable supervisor_version | supervisor-2023.04.1 agent_version | 1.5.1 docker_version | 23.0.3 disk_total | 125.3 GB disk_used | 26.5 GB healthy | true supported | true board | generic-aarch64 supervisor_api | ok version_api | ok installed_addons | File editor (5.6.0), MariaDB (2.6.0), Z-Wave JS (0.1.80), Duck DNS (1.15.0), NGINX Home Assistant SSL proxy (3.4.2), Mosquitto broker (6.2.1), InfluxDB (4.6.0), Grafana (8.2.2), Samba share (10.0.1), AirSonos (3.5.3), Glances (0.18.1), Studio Code Server (5.5.7), Advanced SSH & Web Terminal (14.1.0), Home Assistant Google Drive Backup (0.110.4), Double Take (1.13.1), DeepStack (2021.09.1), MQTT Explorer (browser-1.0.1), Matter Server (4.3.1), Vaultwarden (Bitwarden) (0.19.3), Frigate Proxy (1.3), Piper (0.1.2), Whisper (0.1.1)
Dashboards dashboards | 2 -- | -- resources | 5 views | 12 mode | storage
Recorder oldest_recorder_run | 27 april 2023 om 14:28 -- | -- current_recorder_run | 4 mei 2023 om 10:19 estimated_db_size | 1107.88 MiB database_engine | sqlite database_version | 3.40.1
Spotify api_endpoint_reachable | pending -- | --

Anything in the Supervisor logs that might be useful for us?

No response

Anything in the add-on logs that might be useful for us?

No response

Additional information

No response

synesthesiam commented 1 year ago

It might need to be media-source://tts/tts.piper?message=...

balloob commented 1 year ago

This is already supported. In an automation/script, select Play Media. You can pick media player + a text-to-speech provider / text / voice etc. If you want YAML, you can click on "show YAML" option once you have configured it in the UI.