nimroddolev / chime_tts

A custom Home Assistant integration to play combined audio files before and/or after text-to-speech (TTS) messages
https://nimroddolev.github.io/chime_tts/
MIT License
179 stars 13 forks source link

Issues playing on Sonos speakers with 1.1.0b4 #121

Closed dimatx closed 3 months ago

dimatx commented 5 months ago

System Health details

System Information

version core-2024.4.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.6.25-haos
arch x86_64
timezone America/New_York
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4686 Installed Version | 1.34.0 Stage | running Available Repositories | 1475 Downloaded Repositories | 53
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | July 31, 2024 at 8:00 PM relayer_connected | true relayer_region | us-east-1 remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | true remote_server | us-east-1-2.ui.nabu.casa certificate_status | ready instance_id | 4d1962f7fd7c473ca4ec4547c83362bf can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.2 -- | -- update_channel | stable supervisor_version | supervisor-2024.04.0 agent_version | 1.6.0 docker_version | 25.0.5 disk_total | 30.8 GB disk_used | 11.7 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok installed_addons | Studio Code Server (5.15.0), Terminal & SSH (9.13.0), Duck DNS (1.16.0), AppDaemon (0.16.4), Advanced SSH & Web Terminal (17.2.0), Home Assistant Google Drive Backup (0.112.1), InfluxDB (5.0.0), Victoria Metrics Agent add-on (1.8.19.9), Syncthing (1.19.0)
Dashboards dashboards | 9 -- | -- resources | 19 views | 50 mode | storage
Recorder oldest_recorder_run | April 11, 2024 at 3:24 PM -- | -- current_recorder_run | April 19, 2024 at 12:47 PM database_engine | mysql database_version | 10.8.8

Checklist

Describe the issue

Trying to 1.1.0b4 to see if https://github.com/nimroddolev/chime_tts/issues/113 addressed by echo/out of sync issues, but seeing some issues with playing on my Sonos speakers. Whether I group or not, or use announce or not, the audio plays on just one speaker, but three times instead of once. It doesn't play at all on the other speaker.

Reproduction steps

  1. Create and run Chime TTS Say using the following config:
service: chime_tts.say
metadata: {}
data:
  chime_path: custom_chime_path_1
  message: This is a test message.
  tts_platform: microsoft
  cache: true
  announce: true
  join_players: true
  unjoin_players: true
target:
  entity_id:
    - media_player.kitchen_sonos
    - media_player.his_office_sonos
  1. The output plays three times on one speaker, and doesn't play at all on the second speaker.

Debug logs

2024-04-19 13:12:42.528 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.0-beta4 -----
2024-04-19 13:12:42.529 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-04-19 13:12:42.532 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-04-19 13:12:42.532 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * entity_ids:
2024-04-19 13:12:42.532 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 0: media_player.kitchen_sonos
2024-04-19 13:12:42.532 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 1: media_player.his_office_sonos
2024-04-19 13:12:42.532 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * chime_path = custom_chime_path_1
2024-04-19 13:12:42.532 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * cache = True
2024-04-19 13:12:42.532 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * offset = 450.0
2024-04-19 13:12:42.532 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * final_delay = 0.0
2024-04-19 13:12:42.532 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * media_players_array:
2024-04-19 13:12:42.532 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 0: {'entity_id': 'media_player.kitchen_sonos', 'platform': 'sonos', 'should_change_volume': False, 'initial_volume_level': 0.01, 'playback_volume_level': -1, 'group_members_supported': True, 'announce_supported': True, 'is_playing': False}
2024-04-19 13:12:42.533 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 1: {'entity_id': 'media_player.his_office_sonos', 'platform': 'sonos', 'should_change_volume': False, 'initial_volume_level': 0.01, 'playback_volume_level': -1, 'group_members_supported': True, 'announce_supported': True, 'is_playing': False}
2024-04-19 13:12:42.533 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * message = This is a test message.
2024-04-19 13:12:42.533 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_platform = microsoft
2024-04-19 13:12:42.533 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_speed = 100.0
2024-04-19 13:12:42.533 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_pitch = 0
2024-04-19 13:12:42.533 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * announce = True
2024-04-19 13:12:42.533 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * fade_audio = False
2024-04-19 13:12:42.533 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * volume_level = -1
2024-04-19 13:12:42.533 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * join_players = False
2024-04-19 13:12:42.533 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * unjoin_players = False
2024-04-19 13:12:42.536 DEBUG (MainThread) [custom_components.chime_tts]  *** Checking Chime TTS audio cache ***
2024-04-19 13:12:42.542 DEBUG (MainThread) [custom_components.chime_tts]    ...no cached audio found
2024-04-19 13:12:42.542 DEBUG (MainThread) [custom_components.chime_tts]  - Retrieving audio from path: "/config/www/sound/zapsplat_household_doorbell_chime_bell_001_73122.mp3"...
2024-04-19 13:12:42.719 DEBUG (MainThread) [custom_components.chime_tts]    ...audio retrieved. Duration: 2.513s
2024-04-19 13:12:42.720 DEBUG (MainThread) [custom_components.chime_tts]  - Attempting to retrieve TTS audio from cache...
2024-04-19 13:12:42.729 DEBUG (MainThread) [custom_components.chime_tts]    ...no cached TTS audio found
2024-04-19 13:12:42.729 DEBUG (MainThread) [custom_components.chime_tts]  - Generating new TTS audio with parameters:
2024-04-19 13:12:42.730 DEBUG (MainThread) [custom_components.chime_tts]     * tts_platform = 'microsoft'
2024-04-19 13:12:42.730 DEBUG (MainThread) [custom_components.chime_tts]     * message = 'This is a test message.'
2024-04-19 13:12:42.730 DEBUG (MainThread) [custom_components.chime_tts]     * cache = True
2024-04-19 13:12:42.730 DEBUG (MainThread) [custom_components.chime_tts]     * language = None
2024-04-19 13:12:42.730 DEBUG (MainThread) [custom_components.chime_tts]     * options = {}
2024-04-19 13:12:43.301 DEBUG (MainThread) [custom_components.chime_tts]    ...TTS audio generated in 570.0ms
2024-04-19 13:12:43.301 DEBUG (MainThread) [custom_components.chime_tts]  - Saving generated TTS audio to cache...
2024-04-19 13:12:43.476 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem]  - File saved to path: /media/sounds/temp/chime_tts/b0ooi54a.mp3
2024-04-19 13:12:43.476 DEBUG (MainThread) [custom_components.chime_tts]  - Saving data to chime_tts storage:
2024-04-19 13:12:43.476 DEBUG (MainThread) [custom_components.chime_tts]    - key:   "c30da12e265e4c0405246fd77c298aee34f168672af0f2ac58cd869aaf025577"
2024-04-19 13:12:43.476 DEBUG (MainThread) [custom_components.chime_tts]    - value: "{'local_path': '/media/sounds/temp/chime_tts/b0ooi54a.mp3', 'audio_duration': 2.424}"
2024-04-19 13:12:43.505 DEBUG (MainThread) [custom_components.chime_tts]   ...TTS audio saved to cache
2024-04-19 13:12:43.522 DEBUG (MainThread) [custom_components.chime_tts]  - Saving mp3 file to folder: /media/sounds/temp/chime_tts/...
2024-04-19 13:12:43.800 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem]  - File saved to path: /media/sounds/temp/chime_tts/5quqv0at.mp3
2024-04-19 13:12:43.993 DEBUG (MainThread) [custom_components.chime_tts]  - Saving data to chime_tts storage:
2024-04-19 13:12:43.993 DEBUG (MainThread) [custom_components.chime_tts]    - key:   "1ebbd34f8db06341bdcffeb392ab9b592aabe9ef615ea5c90e17630ca1b7fc95"
2024-04-19 13:12:43.993 DEBUG (MainThread) [custom_components.chime_tts]    - value: "{'local_path': '/media/sounds/temp/chime_tts/5quqv0at.mp3', 'audio_duration': 5.387}"
2024-04-19 13:12:43.996 DEBUG (MainThread) [custom_components.chime_tts]  - Chime TTS audio generated:
2024-04-19 13:12:43.996 DEBUG (MainThread) [custom_components.chime_tts]    - audio_duration = 5.387
2024-04-19 13:12:43.996 DEBUG (MainThread) [custom_components.chime_tts]    - local_path = "/media/sounds/temp/chime_tts/5quqv0at.mp3"
2024-04-19 13:12:43.996 DEBUG (MainThread) [custom_components.chime_tts]    - public_path = None
2024-04-19 13:12:43.996 DEBUG (MainThread) [custom_components.chime_tts]    - media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/5quqv0at.mp3"
2024-04-19 13:12:43.996 DEBUG (MainThread) [custom_components.chime_tts]  *** Pre-Playback Actions *** 
2024-04-19 13:12:43.996 DEBUG (MainThread) [custom_components.chime_tts]  *** Chime TTS playback ***
2024-04-19 13:12:44.007 DEBUG (MainThread) [custom_components.chime_tts]    2 Sonos media players detected:
2024-04-19 13:12:44.008 DEBUG (MainThread) [custom_components.chime_tts]      - media_player.kitchen_sonos
2024-04-19 13:12:44.008 DEBUG (MainThread) [custom_components.chime_tts] sonos_media_player_dict = {'entity_id': 'media_player.kitchen_sonos', 'platform': 'sonos', 'should_change_volume': False, 'initial_volume_level': 0.01, 'playback_volume_level': -1, 'group_members_supported': True, 'announce_supported': True, 'is_playing': False}
2024-04-19 13:12:44.008 DEBUG (MainThread) [custom_components.chime_tts]      - media_player.his_office_sonos
2024-04-19 13:12:44.008 DEBUG (MainThread) [custom_components.chime_tts] sonos_media_player_dict = {'entity_id': 'media_player.his_office_sonos', 'platform': 'sonos', 'should_change_volume': False, 'initial_volume_level': 0.01, 'playback_volume_level': -1, 'group_members_supported': True, 'announce_supported': True, 'is_playing': False}
2024-04-19 13:12:44.008 DEBUG (MainThread) [custom_components.chime_tts]    Calling media_player.play_media with data:
2024-04-19 13:12:44.008 DEBUG (MainThread) [custom_components.chime_tts]      - media_content_type: music
2024-04-19 13:12:44.008 DEBUG (MainThread) [custom_components.chime_tts]      - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/5quqv0at.mp3
2024-04-19 13:12:44.009 DEBUG (MainThread) [custom_components.chime_tts]      - announce: True
2024-04-19 13:12:44.009 DEBUG (MainThread) [custom_components.chime_tts]      - entity_id: ['media_player.his_office_sonos']
2024-04-19 13:12:44.016 DEBUG (MainThread) [custom_components.chime_tts]    Calling media_player.play_media with data:
2024-04-19 13:12:44.016 DEBUG (MainThread) [custom_components.chime_tts]      - media_content_type: music
2024-04-19 13:12:44.016 DEBUG (MainThread) [custom_components.chime_tts]      - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/5quqv0at.mp3
2024-04-19 13:12:44.016 DEBUG (MainThread) [custom_components.chime_tts]      - announce: True
2024-04-19 13:12:44.016 DEBUG (MainThread) [custom_components.chime_tts]      - entity_id: ['media_player.his_office_sonos']
2024-04-19 13:12:44.021 DEBUG (MainThread) [custom_components.chime_tts]    Calling media_player.play_media with data:
2024-04-19 13:12:44.021 DEBUG (MainThread) [custom_components.chime_tts]      - media_content_type: music
2024-04-19 13:12:44.021 DEBUG (MainThread) [custom_components.chime_tts]      - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/5quqv0at.mp3
2024-04-19 13:12:44.021 DEBUG (MainThread) [custom_components.chime_tts]      - announce: True
2024-04-19 13:12:44.021 DEBUG (MainThread) [custom_components.chime_tts]      - entity_id: ['media_player.his_office_sonos']
2024-04-19 13:12:44.024 DEBUG (MainThread) [custom_components.chime_tts]  - Waiting 5.387s for audio playback to complete...
2024-04-19 13:12:49.415 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player]  - Waiting until 2 media_players aren't playing...
2024-04-19 13:12:49.415 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player]    ✔ media_player.kitchen_sonos
2024-04-19 13:12:49.617 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player]    ✔ media_player.his_office_sonos
2024-04-19 13:12:49.617 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 7.09 s -----

Diagnostics dump

No response

Legrand5382 commented 3 months ago

Hi,

for me it almost work now, but if I add join/unjoin only 1 speaker will work, the other just mute. Also the announce (with no join/unjoin) almost work as expected, the music volume lower, TTS speak over the music like expected but then music go super high, then it mute, and then go back to normal.

Legrand5382 commented 3 months ago

My log 2024-06-02 11:47:15.355 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.speaker_chambre's volume from 0.27 to 0.8 2024-06-02 11:47:15.355 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Calling media_player.volume_set with data: 2024-06-02 11:47:15.355 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - volume_level: 0.8 2024-06-02 11:47:15.355 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - entity_id: media_player.speaker_chambre 2024-06-02 11:47:15.397 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.cuisine's volume from 0.31 to 0.8 2024-06-02 11:47:15.397 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Calling media_player.volume_set with data: 2024-06-02 11:47:15.397 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - volume_level: 0.8 2024-06-02 11:47:15.397 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - entity_id: media_player.cuisine 2024-06-02 11:47:15.409 DEBUG (MainThread) [custom_components.chime_tts] Chime TTS playback 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] 2 media players detected: 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] - media_player.speaker_chambre 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] - media_player.cuisine 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data: 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.speaker_chambre', 'media_player.cuisine'] 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] - announce: True 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music 2024-06-02 11:47:15.411 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/y5wf4h_1.mp3 2024-06-02 11:47:15.411 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.823s for audio playback to complete... 2024-06-02 11:47:19.236 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 2 media_players aren't playing... 2024-06-02 11:47:19.237 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.speaker_chambre 2024-06-02 11:47:22.879 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] 𝘅 media_player.cuisine - Timed out 2024-06-02 11:47:22.879 DEBUG (MainThread) [custom_components.chime_tts] - Timed out waiting for playback to complete 2024-06-02 11:47:22.879 DEBUG (MainThread) [custom_components.chime_tts] Post-Playback Actions 2024-06-02 11:47:22.879 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Restoring 2 Sonos media players 2024-06-02 11:47:24.910 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 9.85 s -----

Legrand5382 commented 3 months ago

Forgot to tell that my speakers are Sonos five and Era 100 both from latest generation witch support annonce.

nimroddolev commented 3 months ago

Thank you @Legrand5382

The debug log messages you included were cut, and did not begin from the start of the service call (so they don't include neither the parameter values nor the initial log messages).

Can you please provide me with the full debug logs?

HA-TB303 commented 3 months ago

Hi,

Whilst watching TV on the sonos arc (media_player.woonkamer / input: TV) I called:

service: chime_tts.say
metadata: {}
data:
  volume_level: 0.35
  chime_path: bells_2
  message: Mail has been delivered.
  tts_platform: cloud
  announce: true
  join_players: true
  unjoin_players: true
  cache: true
target:
  entity_id:
    - media_player.kantoor
    - media_player.keuken
    - media_player.woonkamer
  1. I hear the bells_2 sound on 'media_player.woonkamer' only (I would expect it to play on all speakers)
  2. I hear the sound of the TV on: 'media_player.kantoor' and 'media_player.keuken' (I would not expect it to hear that there)
  3. I hear TTS on 'media_player.woonkamer' only (I would expect TTS on all speakers)
  4. 'media_player.kantoor' and 'media_player.keuken' turn off again.
  5. TV sound on the sonos arc is like it was before the service call.

I can no longer reproduce the TV sound comming from all speakers permanently after the service call.

2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids:
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.woonkamer
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.keuken
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 2: media_player.kantoor
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = bells_2
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = True
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = Mail has been delivered.
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_platform = cloud
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = True
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = 0.35
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = True
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = True
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - entity_id: media_player.woonkamer
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.14
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.35
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: True
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - entity_id: media_player.keuken
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.13
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.35
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - entity_id: media_player.kantoor
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.49
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.35
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-02 20:06:57.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-02 20:06:57.859 DEBUG (MainThread) [custom_components.chime_tts] *** Checking Chime TTS audio cache ***
2024-06-02 20:06:57.864 DEBUG (MainThread) [custom_components.chime_tts] Cached audio found:
2024-06-02 20:06:57.864 DEBUG (MainThread) [custom_components.chime_tts] - local_path = "/media/sounds/temp/chime_tts/on2p7gk0.mp3"
2024-06-02 20:06:57.864 DEBUG (MainThread) [custom_components.chime_tts] - audio_duration = 4.417
2024-06-02 20:06:57.864 DEBUG (MainThread) [custom_components.chime_tts] - public_path = None
2024-06-02 20:06:57.864 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/on2p7gk0.mp3"
2024-06-02 20:06:57.864 DEBUG (MainThread) [custom_components.chime_tts] *** Pre-Playback Actions ***
2024-06-02 20:06:57.864 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Taking a Sonos snapshot of 3 media players
2024-06-02 20:06:58.009 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.woonkamer's volume from 0.14 to 0.35
2024-06-02 20:06:58.010 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Calling media_player.volume_set with data:
2024-06-02 20:06:58.010 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - volume_level: 0.35
2024-06-02 20:06:58.010 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - entity_id: media_player.woonkamer
2024-06-02 20:06:58.017 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.keuken's volume from 0.13 to 0.35
2024-06-02 20:06:58.017 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Calling media_player.volume_set with data:
2024-06-02 20:06:58.017 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - volume_level: 0.35
2024-06-02 20:06:58.017 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - entity_id: media_player.keuken
2024-06-02 20:06:58.023 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Decresing media_player.kantoor's volume from 0.49 to 0.35
2024-06-02 20:06:58.023 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Calling media_player.volume_set with data:
2024-06-02 20:06:58.023 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - volume_level: 0.35
2024-06-02 20:06:58.023 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - entity_id: media_player.kantoor
2024-06-02 20:06:58.049 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Joined speaker leader: media_player.woonkamer, with 2 group members:
2024-06-02 20:06:58.049 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.keuken
2024-06-02 20:06:58.049 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.kantoor
2024-06-02 20:06:59.743 DEBUG (MainThread) [custom_components.chime_tts] *** Chime TTS playback ***
2024-06-02 20:06:59.747 DEBUG (MainThread) [custom_components.chime_tts] 2 media players detected:
2024-06-02 20:06:59.747 DEBUG (MainThread) [custom_components.chime_tts] - media_player.woonkamer
2024-06-02 20:06:59.747 DEBUG (MainThread) [custom_components.chime_tts] - media_player.woonkamer
2024-06-02 20:06:59.747 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data:
2024-06-02 20:06:59.747 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.woonkamer', 'media_player.woonkamer']
2024-06-02 20:06:59.747 DEBUG (MainThread) [custom_components.chime_tts] - announce: True
2024-06-02 20:06:59.747 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2024-06-02 20:06:59.747 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/on2p7gk0.mp3
2024-06-02 20:06:59.748 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 4.417s for audio playback to complete...
2024-06-02 20:07:04.165 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 3 media_players aren't playing...
2024-06-02 20:07:07.773 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] 𝘅 media_player.woonkamer - Timed out
2024-06-02 20:07:07.773 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] 𝘅 media_player.keuken - Timed out
2024-06-02 20:07:07.773 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] 𝘅 media_player.kantoor - Timed out
2024-06-02 20:07:07.773 DEBUG (MainThread) [custom_components.chime_tts] - Timed out waiting for playback to complete
2024-06-02 20:07:07.773 DEBUG (MainThread) [custom_components.chime_tts] *** Post-Playback Actions ***
2024-06-02 20:07:07.773 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Calling media_player.unjoin service...
2024-06-02 20:07:07.773 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.unjoin: media_player.woonkamer
2024-06-02 20:07:09.634 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ...done
2024-06-02 20:07:09.634 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.unjoin: media_player.keuken
2024-06-02 20:07:10.378 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ...done
2024-06-02 20:07:10.378 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.unjoin: media_player.kantoor
2024-06-02 20:07:12.085 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ...done
2024-06-02 20:07:12.085 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Restoring 3 Sonos media players
2024-06-02 20:07:12.277 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 14.42 s -----
Legrand5382 commented 3 months ago

Here are my log with join/unjoin, hope it’s all there as I clean it up from all the other stuff.

2024-06-02 11:47:15.355 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.speaker_chambre's volume from 0.27 to 0.8 2024-06-02 11:47:15.355 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Calling media_player.volume_set with data: 2024-06-02 11:47:15.355 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - volume_level: 0.8 2024-06-02 11:47:15.355 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - entity_id: media_player.speaker_chambre 2024-06-02 11:47:15.397 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.cuisine's volume from 0.31 to 0.8 2024-06-02 11:47:15.397 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Calling media_player.volume_set with data: 2024-06-02 11:47:15.397 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - volume_level: 0.8 2024-06-02 11:47:15.397 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - entity_id: media_player.cuisine 2024-06-02 11:47:15.409 DEBUG (MainThread) [custom_components.chime_tts] Chime TTS playback 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] 2 media players detected: 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] - media_player.speaker_chambre 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] - media_player.cuisine 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data: 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.speaker_chambre', 'media_player.cuisine'] 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] - announce: True 2024-06-02 11:47:15.410 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music 2024-06-02 11:47:15.411 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/y5wf4h_1.mp3 2024-06-02 11:47:15.411 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.823s for audio playback to complete... 2024-06-02 11:47:19.236 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 2 media_players aren't playing... 2024-06-02 11:47:19.237 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.speaker_chambre 2024-06-02 11:47:22.879 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] 𝘅 media_player.cuisine - Timed out 2024-06-02 11:47:22.879 DEBUG (MainThread) [custom_components.chime_tts] - Timed out waiting for playback to complete 2024-06-02 11:47:22.879 DEBUG (MainThread) [custom_components.chime_tts] Post-Playback Actions 2024-06-02 11:47:22.879 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Restoring 2 Sonos media players 2024-06-02 11:47:24.910 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 9.85 s ----- 2024-06-02 13:07:37.766 WARNING (MainThread) [custom_components.linkplay.media_player] Failed communicating with LinkPlayDevice (httpapi) 'music-dehors-wiim': <class 'TimeoutError'> 2024-06-02 13:07:39.701 WARNING (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Error joining media_player entities: LinkPlayDevice.async_join_players() got an unexpected keyword argument 'group_members' 2024-06-02 13:07:52.396 WARNING (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Timed out waiting for 1 media_player to pause 2024-06-02 13:08:01.462 WARNING (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Failed to resume playback on media_player.musique_dehors 2024-06-02 13:19:21.315 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'update' is undefined when rendering '{{ iif(update, 'none', sound) }}' 2024-06-02 13:19:21.316 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'update' is undefined when rendering '{{ iif((update or sound == 'none'), 0, volume) }}' 2024-06-02 13:21:22.747 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'update' is undefined when rendering '{{ iif(update, 'none', sound) }}' 2024-06-02 13:21:22.748 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'update' is undefined when rendering '{{ iif((update or sound == 'none'), 0, volume) }}' 2024-06-02 13:30:10.651 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140469207313472] Eric from 192.168.6.28 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36): Client unable to keep up with pending messages. Stayed over 1024 for 5 seconds. The system's load is too high or an integration is misbehaving; Last message was: b'{"type":"event","event":{"c":{"media_player.musique_dehors":{"+":{"lu":1717349408.845373,"c":"01HZD00R2DM22ZP763ZPG1MN4X","a":{"media_position":1184,"media_position_updated_at":"2024-06-02T17:30:08.770923+00:00"}}}}},"id":21}' 2024-06-02 14:12:16.034 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue 2024-06-02 14:12:16.035 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.0-beta9 ----- 2024-06-02 14:12:16.036 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters ----- 2024-06-02 14:12:16.037 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] entity_ids: 2024-06-02 14:12:16.037 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.speaker_chambre 2024-06-02 14:12:16.037 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.cuisine 2024-06-02 14:12:16.037 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] chime_path = error 2024-06-02 14:12:16.037 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] cache = True 2024-06-02 14:12:16.037 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] offset = 100.0 2024-06-02 14:12:16.037 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] final_delay = 0.0 2024-06-02 14:12:16.037 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] message = Le système d'alarme est activé et les portes sont verrouillées, la maison est sécurisée. 2024-06-02 14:12:16.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_speed = 100.0 2024-06-02 14:12:16.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_pitch = 0 2024-06-02 14:12:16.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce = True 2024-06-02 14:12:16.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] fade_audio = False 2024-06-02 14:12:16.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] volume_level = 0.73 2024-06-02 14:12:16.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join_players = True 2024-06-02 14:12:16.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] unjoin_players = True 2024-06-02 14:12:16.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] media_players_array: 2024-06-02 14:12:16.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - entity_id: media_player.speaker_chambre 2024-06-02 14:12:16.039 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-06-02 14:12:16.039 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.6 2024-06-02 14:12:16.039 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.73 2024-06-02 14:12:16.039 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False 2024-06-02 14:12:16.039 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-06-02 14:12:16.039 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-06-02 14:12:16.039 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - entity_id: media_player.cuisine 2024-06-02 14:12:16.039 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-06-02 14:12:16.041 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.3 2024-06-02 14:12:16.041 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.73 2024-06-02 14:12:16.041 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: True 2024-06-02 14:12:16.041 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-06-02 14:12:16.041 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-06-02 14:12:16.043 DEBUG (MainThread) [custom_components.chime_tts] Checking Chime TTS audio cache 2024-06-02 14:12:16.058 DEBUG (MainThread) [custom_components.chime_tts] Cached audio found: 2024-06-02 14:12:16.058 DEBUG (MainThread) [custom_components.chime_tts] - local_path = "/media/sounds/temp/chime_tts/n1oxmtgv.mp3" 2024-06-02 14:12:16.058 DEBUG (MainThread) [custom_components.chime_tts] - audio_duration = 6.892 2024-06-02 14:12:16.058 DEBUG (MainThread) [custom_components.chime_tts] - public_path = None 2024-06-02 14:12:16.058 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/n1oxmtgv.mp3" 2024-06-02 14:12:16.058 DEBUG (MainThread) [custom_components.chime_tts] Pre-Playback Actions 2024-06-02 14:12:16.058 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Taking a Sonos snapshot of 2 media players 2024-06-02 14:12:16.321 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.speaker_chambre's volume from 0.6 to 0.73 2024-06-02 14:12:16.321 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Calling media_player.volume_set with data: 2024-06-02 14:12:16.322 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - volume_level: 0.73 2024-06-02 14:12:16.322 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - entity_id: media_player.speaker_chambre 2024-06-02 14:12:16.352 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.cuisine's volume from 0.3 to 0.73 2024-06-02 14:12:16.352 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Calling media_player.volume_set with data: 2024-06-02 14:12:16.352 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - volume_level: 0.73 2024-06-02 14:12:16.352 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - entity_id: media_player.cuisine 2024-06-02 14:12:16.368 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Joined speaker leader: media_player.speaker_chambre, with 1 group member: 2024-06-02 14:12:16.369 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.cuisine 2024-06-02 14:12:17.163 DEBUG (MainThread) [custom_components.chime_tts] Chime TTS playback 2024-06-02 14:12:17.165 DEBUG (MainThread) [custom_components.chime_tts] 2 media players detected: 2024-06-02 14:12:17.165 DEBUG (MainThread) [custom_components.chime_tts] - media_player.speaker_chambre 2024-06-02 14:12:17.166 DEBUG (MainThread) [custom_components.chime_tts] - media_player.speaker_chambre 2024-06-02 14:12:17.166 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data: 2024-06-02 14:12:17.166 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.speaker_chambre', 'media_player.speaker_chambre'] 2024-06-02 14:12:17.166 DEBUG (MainThread) [custom_components.chime_tts] - announce: True 2024-06-02 14:12:17.166 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music 2024-06-02 14:12:17.166 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/n1oxmtgv.mp3 2024-06-02 14:12:17.174 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 6.892s for audio playback to complete... 2024-06-02 14:12:24.067 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 2 media_players aren't playing... 2024-06-02 14:12:24.068 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.speaker_chambre 2024-06-02 14:12:24.270 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.cuisine 2024-06-02 14:12:24.270 DEBUG (MainThread) [custom_components.chime_tts] Post-Playback Actions 2024-06-02 14:12:24.270 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Calling media_player.unjoin service... 2024-06-02 14:12:24.270 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.unjoin: media_player.speaker_chambre 2024-06-02 14:12:25.266 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ...done 2024-06-02 14:12:25.266 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.unjoin: media_player.cuisine 2024-06-02 14:12:25.491 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ...done 2024-06-02 14:12:25.491 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Restoring 2 Sonos media players 2024-06-02 14:12:29.906 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 13.87 s -----

nimroddolev commented 3 months ago

Hi @HA-TB303,

Thank you for the debug logs and recalling the result of your testing.

From your logs I see the same issue @dimatx reported, which I covered in my reply.

_1. I hear the bells_2 sound on 'mediaplayer.woonkamer' only (I would expect it to play on all speakers)

I understand that the media_player.woonkamer speaker was the only one to play anything, but I'm not clear on what you mean here exactly: From the logs I saw that the cached Chime TTS audio being played is longer than the bells_2 mp3 duration, but you wrote that you only heard "the bells_2 sound on the 'mediaplayer.woonkamer'", Did you only hear the bells sound effect, but not the TTS message "Mail has been delivered."_?

I am interested to know if the bug of only hearing playback on the "speaker group leader" (media_player.woonkamer) is related to the 'announce' feature or not. To test this, could you please set the same speaker conditions for the 3 speakers, and call chime_tts.say without announce but with fade_audio = true instead?

_2. I hear the sound of the TV on: 'media_player.kantoor' and 'mediaplayer.keuken' (I would not expect it to hear that there)

I assume you heard the TV sound on the other 2 speakers after the end of the call to chime_tts.say, correct? This is very confusing. I can see in the logs that the speaker group is "unjoined" at the end...perhaps it is related to the Sonos snapshot but I can't say. Could you please try to repeat this a few times and let me know if it happens consistently?

_3. I hear TTS on 'mediaplayer.woonkamer' only (I would expect TTS on all speakers)

The logs show that a speaker group was formed with media_player.woonkamer as the "leader" and the other 2 speakers as group members...unfortunately I don't see a reason why the other 2 speakers failed to play. Again: can you please try to reproduce the issue and let me know if the issue occurs consistantly?

_4. 'media_player.kantoor' and 'mediaplayer.keuken' turn off again.

If neither of these speakers had any playback, what do you mean that they "turned off"?

nimroddolev commented 3 months ago

Hi @Legrand5382

Unfortunately I did not learn anything from the debug log messages that has given me further insight. Both you and @HA-TB303 have reported that only a single speaker has any playback, despite having multiple speakers included in the joined group.

In order to understand if this specific issue is related to Chime TTS or not, I would like to ask you both to please run a script that performs the following 2 service calls:

  1. Call the media_player.join service to create a joined speaker group
  2. Call the media_player.play_media service with the joined speaker group "leader"'s entity ID with one of the content IDs from your respective debug log messages.

If the playback is successful on all grouped speakers, then we can understand that the issue is with Chime TTS, otherwise it is either with the Sonos integration or (less likely) with Home Assistant.

Regarding the second issue of the volume jumping, I will continue my investigation.

Legrand5382 commented 3 months ago

Ok just did this and both my speakers playback correctly.

nimroddolev commented 3 months ago

Thanks @Legrand5382.

Can you please run another test, where you add the sonos.snapshot & sonos.restore service calls before/after? I.e:

  1. sonos.snapshot
  2. media_player.join
  3. media_player.play_media
  4. sonos.restore
Legrand5382 commented 3 months ago

Hi,

Just test it and this also work as expected, the snapshot and restore work well but is it needed if I use the announce feature in chime TTS ? With announce the sonos music volume lower while the TTS speak (instead of cutting and restoring).

Envoyé de mon iPhone

Le 3 juin 2024 à 10:51 a.m., Nimrod Dolev @.***> a écrit :



Thanks @Legrand5382https://github.com/Legrand5382.

Can you please run another test, where you add the sonos.snapshot & sonos.restore service calls before/after? I.e:

  1. sonos.snapshot
  2. media_player.join
  3. media_player.play_media
  4. sonos.restore

— Reply to this email directly, view it on GitHubhttps://github.com/nimroddolev/chime_tts/issues/121#issuecomment-2145405686, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AR3LDLAVRVJMMD3ZUCRU773ZFR7ITAVCNFSM6AAAAABGPRT67GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBVGQYDKNRYGY. You are receiving this because you were mentioned.Message ID: @.***>

nimroddolev commented 3 months ago

Hi @Legrand5382, I added the snapshot/restore because I thought it would address the post playback issues reported by other Sonos users. Technically it should not be necessary, as you suggested.

Are you able to set the volume when using announce? If so, can you please send me the YAML of the service call?

eric1090 commented 3 months ago

Hi, @nimroddolev yes, I can set the volume using announce by adding the 'volume' parameter in 'extra':

service: media_player.play_media
target:
  entity_id: media_player.cuisine
data:
  media_content_type: music
  announce: true
  media_content_id: media-source://media_source/local/sounds/temp/chime_tts/y5wf4h_1.mp3
  extra:   
    volume: 80

(With this code, tts works perfectly)

eric1090 commented 3 months ago

1.

service: media_player.join
data:
  group_members:
    - media_player.speaker_chambre
target:
  entity_id: media_player.cuisine

2.

service: media_player.play_media
target:
  entity_id: media_player.cuisine
data:
  media_content_type: music
  announce: true
  media_content_id: media-source://media_source/local/sounds/temp/chime_tts/y5wf4h_1.mp3
  extra:
    volume: 80

3.

service: media_player.unjoin
target:
  entity_id: media_player.speaker_chambre

edit: the best way to do it is by not using 'join' at all:

service: media_player.play_media
data:
  media_content_type: music
  announce: true
  media_content_id: media-source://media_source/local/sounds/temp/chime_tts/y5wf4h_1.mp3
  extra:
    volume: 90
target:
  entity_id:
    - media_player.cuisine
    - media_player.speaker_chambre
nimroddolev commented 3 months ago

Hi @eric1090, thank you for your input.

I believe users have reported that they require the "join" function in order to ensure the playback is in sync across all their speakers (either way, when using Chime TTS you can decide whether or not to join the speakers).

I think based on your and others' feedback I will try to simplify further and remove the snapshot/restore steps.

eric1090 commented 3 months ago

Hi @nimroddolev It is impossible to join and announce at the same time, because according to my tests, even if the speakers are joined, announce will only affect the target speakers.

service: media_player.join
data:
  group_members:
    - media_player.speaker_chambre
target:
  entity_id: media_player.cuisine
service: media_player.play_media
target:
  entity_id: media_player.cuisine
data:
  media_content_type: music
  announce: true
  media_content_id: media-source://media_source/local/sounds/temp/chime_tts/y5wf4h_1.mp3
  extra:
    volume: 80

only media_player.cuisine will announce. Maybe you can disable join and unjoin when annouce is checked to avoid confusion

nimroddolev commented 3 months ago

Do I understand you correctly in that when both join and announce are enabled, you only heard Chime TTS through the main joined speaker, "media_player.cuisine", and nothing on the "media_player.speaker_chambre" speaker?

eric1090 commented 3 months ago

Exactly

nimroddolev commented 3 months ago

Thanks again @eric1090. Before making changes, could some other user/s please confirm?

dimatx commented 3 months ago

I can confirm that in my limited tests of announce, when I use announce with join, I can't get all of the speakers to play. Though my biggest focus has been on getting speakers to be in sync (which they are with latest beta 👍)

I may not have time this week to do further testing, but I did find another thread where it seems to corroborate what @eric1090 suggests, that announce=true only targets individual speakers: https://github.com/home-assistant/core/issues/93136#issuecomment-1550451592

nimroddolev commented 3 months ago

I have released a new version, v1.1.0-beta10, which has a fix for setting the media_player volume for the announcement and removes the snapshot feature. The snapshot feature can be enabled manually by modifying the ./config.py file, setting SONOS_SNAPSHOT_ENABLED to True.

Legrand5382 commented 3 months ago

I test it and for me the volume change but no tts speaking, I have this error : Custom_components.chim_tts.helper.media_player.chimTTS media player object at 0x7f1be996d400 is not in list.

nimroddolev commented 3 months ago

Can you please send me the debug logs?

Legrand5382 commented 3 months ago

Can you please send me the debug logs?

Sorry for the delay, here are my log

2024-06-06 20:29:32.510 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'chime_tts' at custom_components/chime_tts/helpers/filesystem.py, line 144: audio.export(audio_full_path, format="mp3") (offender: /usr/local/lib/python3.12/site-packages/pydub/audio_segment.py, line 962: with open(os.devnull, 'rb') as devnull:), please create a bug report at https://github.com/nimroddolev/chime_tts/issues Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/chime_tts/queue_manager.py", line 38, in async_process_queue result = await asyncio.wait_for( File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for return await fut File "/config/custom_components/chime_tts/init.py", line 161, in async_say_execute return await async_prepare_media(hass, params, options, media_players_array, is_say_url, start_time) File "/config/custom_components/chime_tts/init.py", line 255, in async_prepare_media audio_dict = await async_get_playback_audio_path(params, options) File "/config/custom_components/chime_tts/init.py", line 717, in async_get_playback_audio_path new_audio_file = filesystem_helper.save_audio_to_folder(output_audio, _data.get(initial_save_folder_key, None)) File "/config/custom_components/chime_tts/helpers/filesystem.py", line 144, in save_audio_to_folder audio.export(audio_full_path, format="mp3")

2024-06-06 20:29:32.609 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'chime_tts' at custom_components/chime_tts/init.py, line 733: duration = len(AudioSegment.from_file(new_audio_file)) / 1000.0 (offender: /usr/local/lib/python3.12/site-packages/pydub/utils.py, line 60: fd = open(fd, mode=mode)), please create a bug report at https://github.com/nimroddolev/chime_tts/issues Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/chime_tts/queue_manager.py", line 38, in async_process_queue result = await asyncio.wait_for( File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for return await fut File "/config/custom_components/chime_tts/init.py", line 161, in async_say_execute return await async_prepare_media(hass, params, options, media_players_array, is_say_url, start_time) File "/config/custom_components/chime_tts/init.py", line 255, in async_prepare_media audio_dict = await async_get_playback_audio_path(params, options) File "/config/custom_components/chime_tts/init.py", line 733, in async_get_playback_audio_path duration = len(AudioSegment.from_file(new_audio_file)) / 1000.0

2024-06-06 20:30:00.430 WARNING (MainThread) [homeassistant.components.light.reproduce_state] Invalid state specified for light.hue_ambiance_salon: unavailable 2024-06-06 20:31:00.402 WARNING (MainThread) [homeassistant.components.homeassistant] The service homeassistant.turn_off does not support entities scene.scene_normal_jours 2024-06-06 20:31:04.343 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue 2024-06-06 20:31:04.344 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.0-beta10 ----- 2024-06-06 20:31:04.346 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters ----- 2024-06-06 20:31:04.346 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] entity_ids: 2024-06-06 20:31:04.346 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.speaker_chambre 2024-06-06 20:31:04.347 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.cuisine 2024-06-06 20:31:04.347 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] chime_path = bells 2024-06-06 20:31:04.347 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] cache = True 2024-06-06 20:31:04.347 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] offset = -150.0 2024-06-06 20:31:04.347 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] final_delay = 0.0 2024-06-06 20:31:04.347 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] message = Il y a une voiture qui arrive dans l'entrée. 2024-06-06 20:31:04.347 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_speed = 100.0 2024-06-06 20:31:04.347 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_pitch = 0 2024-06-06 20:31:04.348 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce = True 2024-06-06 20:31:04.348 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] fade_audio = False 2024-06-06 20:31:04.348 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] volume_level = 0.6 2024-06-06 20:31:04.348 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join_players = False 2024-06-06 20:31:04.348 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] unjoin_players = False 2024-06-06 20:31:04.348 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] media_players_array: 2024-06-06 20:31:04.348 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - entity_id: media_player.speaker_chambre 2024-06-06 20:31:04.348 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-06-06 20:31:04.350 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.6 2024-06-06 20:31:04.351 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.6 2024-06-06 20:31:04.351 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False 2024-06-06 20:31:04.351 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-06-06 20:31:04.351 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-06-06 20:31:04.351 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - entity_id: media_player.cuisine 2024-06-06 20:31:04.351 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-06-06 20:31:04.351 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.6 2024-06-06 20:31:04.351 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.6 2024-06-06 20:31:04.352 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False 2024-06-06 20:31:04.352 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-06-06 20:31:04.352 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-06-06 20:31:04.353 DEBUG (MainThread) [custom_components.chime_tts] Checking Chime TTS audio cache 2024-06-06 20:31:04.364 DEBUG (MainThread) [custom_components.chime_tts] Cached audio found: 2024-06-06 20:31:04.364 DEBUG (MainThread) [custom_components.chime_tts] - local_path = "/media/sounds/temp/chime_tts/jcah2ofw.mp3" 2024-06-06 20:31:04.365 DEBUG (MainThread) [custom_components.chime_tts] - audio_duration = 3.914 2024-06-06 20:31:04.365 DEBUG (MainThread) [custom_components.chime_tts] - public_path = None 2024-06-06 20:31:04.365 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/jcah2ofw.mp3" 2024-06-06 20:31:04.365 DEBUG (MainThread) [custom_components.chime_tts] **** 2024-06-06 20:31:04.365 DEBUG (MainThread) [custom_components.chime_tts] Pre-Playback Actions 2024-06-06 20:31:04.365 DEBUG (MainThread) [custom_components.chime_tts] **** 2024-06-06 20:31:04.365 DEBUG (MainThread) [custom_components.chime_tts] ** 2024-06-06 20:31:04.365 DEBUG (MainThread) [custom_components.chime_tts] Chime TTS playback 2024-06-06 20:31:04.365 DEBUG (MainThread) [custom_components.chime_tts] ** 2024-06-06 20:31:04.367 DEBUG (MainThread) [custom_components.chime_tts] 2 Sonos media players detected: 2024-06-06 20:31:04.367 DEBUG (MainThread) [custom_components.chime_tts] - media_player.speaker_chambre 2024-06-06 20:31:04.367 DEBUG (MainThread) [custom_components.chime_tts] - media_player.cuisine 2024-06-06 20:31:04.367 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data: 2024-06-06 20:31:04.367 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.speaker_chambre', 'media_player.cuisine'] 2024-06-06 20:31:04.367 DEBUG (MainThread) [custom_components.chime_tts] - announce: True 2024-06-06 20:31:04.367 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music 2024-06-06 20:31:04.368 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/jcah2ofw.mp3 2024-06-06 20:31:04.368 DEBUG (MainThread) [custom_components.chime_tts] - extra: {'volume': 0.6} 2024-06-06 20:31:04.368 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.914s for audio playback to complete... 2024-06-06 20:31:08.286 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 2 media_players aren't playing... 2024-06-06 20:31:08.287 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.speaker_chambre 2024-06-06 20:31:08.287 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.cuisine 2024-06-06 20:31:08.287 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 3.94 s ----- 2024-06-06 20:31:11.416 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue 2024-06-06 20:31:11.416 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.0-beta10 ----- 2024-06-06 20:31:11.418 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters ----- 2024-06-06 20:31:11.418 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] entity_ids: 2024-06-06 20:31:11.419 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.speaker_chambre 2024-06-06 20:31:11.419 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.cuisine 2024-06-06 20:31:11.419 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] chime_path = bells 2024-06-06 20:31:11.419 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] cache = True 2024-06-06 20:31:11.419 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] offset = -150.0 2024-06-06 20:31:11.419 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] final_delay = 0.0 2024-06-06 20:31:11.419 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] message = Il y a une voiture qui arrive dans l'entrée. 2024-06-06 20:31:11.419 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_speed = 100.0 2024-06-06 20:31:11.419 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_pitch = 0 2024-06-06 20:31:11.420 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce = True 2024-06-06 20:31:11.420 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] fade_audio = False 2024-06-06 20:31:11.420 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] volume_level = 0.6 2024-06-06 20:31:11.420 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join_players = False 2024-06-06 20:31:11.420 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] unjoin_players = False 2024-06-06 20:31:11.420 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] media_players_array: 2024-06-06 20:31:11.420 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - entity_id: media_player.speaker_chambre 2024-06-06 20:31:11.420 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-06-06 20:31:11.420 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.6 2024-06-06 20:31:11.420 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.6 2024-06-06 20:31:11.420 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False 2024-06-06 20:31:11.420 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-06-06 20:31:11.421 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-06-06 20:31:11.421 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - entity_id: media_player.cuisine 2024-06-06 20:31:11.421 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-06-06 20:31:11.421 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.6 2024-06-06 20:31:11.421 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.6 2024-06-06 20:31:11.421 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False 2024-06-06 20:31:11.421 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-06-06 20:31:11.421 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-06-06 20:31:11.423 DEBUG (MainThread) [custom_components.chime_tts] Checking Chime TTS audio cache 2024-06-06 20:31:11.432 DEBUG (MainThread) [custom_components.chime_tts] Cached audio found: 2024-06-06 20:31:11.432 DEBUG (MainThread) [custom_components.chime_tts] - local_path = "/media/sounds/temp/chime_tts/jcah2ofw.mp3" 2024-06-06 20:31:11.432 DEBUG (MainThread) [custom_components.chime_tts] - audio_duration = 3.914 2024-06-06 20:31:11.432 DEBUG (MainThread) [custom_components.chime_tts] - public_path = None 2024-06-06 20:31:11.433 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/jcah2ofw.mp3" 2024-06-06 20:31:11.433 DEBUG (MainThread) [custom_components.chime_tts] **** 2024-06-06 20:31:11.433 DEBUG (MainThread) [custom_components.chime_tts] Pre-Playback Actions 2024-06-06 20:31:11.433 DEBUG (MainThread) [custom_components.chime_tts] **** 2024-06-06 20:31:11.433 DEBUG (MainThread) [custom_components.chime_tts] ** 2024-06-06 20:31:11.433 DEBUG (MainThread) [custom_components.chime_tts] Chime TTS playback 2024-06-06 20:31:11.433 DEBUG (MainThread) [custom_components.chime_tts] ** 2024-06-06 20:31:11.436 DEBUG (MainThread) [custom_components.chime_tts] 2 Sonos media players detected: 2024-06-06 20:31:11.436 DEBUG (MainThread) [custom_components.chime_tts] - media_player.speaker_chambre 2024-06-06 20:31:11.436 DEBUG (MainThread) [custom_components.chime_tts] - media_player.cuisine 2024-06-06 20:31:11.436 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data: 2024-06-06 20:31:11.436 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.speaker_chambre', 'media_player.cuisine'] 2024-06-06 20:31:11.436 DEBUG (MainThread) [custom_components.chime_tts] - announce: True 2024-06-06 20:31:11.436 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music 2024-06-06 20:31:11.436 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/jcah2ofw.mp3 2024-06-06 20:31:11.436 DEBUG (MainThread) [custom_components.chime_tts] - extra: {'volume': 0.6} 2024-06-06 20:31:11.437 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.914s for audio playback to complete... 2024-06-06 20:31:15.352 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 2 media_players aren't playing... 2024-06-06 20:31:15.353 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.speaker_chambre 2024-06-06 20:31:15.353 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.cuisine 2024-06-06 20:31:15.353 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 3.94 s ----- 2024-06-06 20:31:35.486 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue 2024-06-06 20:31:35.486 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.0-beta10 ----- 2024-06-06 20:31:35.488 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters ----- 2024-06-06 20:31:35.488 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] entity_ids: 2024-06-06 20:31:35.488 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.speaker_chambre 2024-06-06 20:31:35.488 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.cuisine 2024-06-06 20:31:35.488 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] chime_path = bells 2024-06-06 20:31:35.488 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] cache = True 2024-06-06 20:31:35.488 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] offset = -150.0 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] final_delay = 0.0 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] message = Il y a une voiture qui arrive dans l'entrée. 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_speed = 100.0 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_pitch = 0 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce = True 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] fade_audio = False 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] volume_level = 0.6 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join_players = False 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] unjoin_players = False 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] media_players_array: 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - entity_id: media_player.speaker_chambre 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.6 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.6 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False 2024-06-06 20:31:35.489 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-06-06 20:31:35.490 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-06-06 20:31:35.490 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - entity_id: media_player.cuisine 2024-06-06 20:31:35.490 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-06-06 20:31:35.490 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.6 2024-06-06 20:31:35.490 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.6 2024-06-06 20:31:35.490 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False 2024-06-06 20:31:35.490 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-06-06 20:31:35.490 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-06-06 20:31:35.491 DEBUG (MainThread) [custom_components.chime_tts] Checking Chime TTS audio cache 2024-06-06 20:31:35.495 DEBUG (MainThread) [custom_components.chime_tts] Cached audio found: 2024-06-06 20:31:35.496 DEBUG (MainThread) [custom_components.chime_tts] - local_path = "/media/sounds/temp/chime_tts/jcah2ofw.mp3" 2024-06-06 20:31:35.496 DEBUG (MainThread) [custom_components.chime_tts] - audio_duration = 3.914 2024-06-06 20:31:35.496 DEBUG (MainThread) [custom_components.chime_tts] - public_path = None 2024-06-06 20:31:35.496 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/jcah2ofw.mp3" 2024-06-06 20:31:35.496 DEBUG (MainThread) [custom_components.chime_tts] **** 2024-06-06 20:31:35.496 DEBUG (MainThread) [custom_components.chime_tts] Pre-Playback Actions 2024-06-06 20:31:35.496 DEBUG (MainThread) [custom_components.chime_tts] **** 2024-06-06 20:31:35.496 DEBUG (MainThread) [custom_components.chime_tts] ** 2024-06-06 20:31:35.496 DEBUG (MainThread) [custom_components.chime_tts] Chime TTS playback 2024-06-06 20:31:35.496 DEBUG (MainThread) [custom_components.chime_tts] ** 2024-06-06 20:31:35.497 DEBUG (MainThread) [custom_components.chime_tts] 2 Sonos media players detected: 2024-06-06 20:31:35.497 DEBUG (MainThread) [custom_components.chime_tts] - media_player.speaker_chambre 2024-06-06 20:31:35.497 DEBUG (MainThread) [custom_components.chime_tts] - media_player.cuisine 2024-06-06 20:31:35.497 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data: 2024-06-06 20:31:35.497 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.speaker_chambre', 'media_player.cuisine'] 2024-06-06 20:31:35.497 DEBUG (MainThread) [custom_components.chime_tts] - announce: True 2024-06-06 20:31:35.497 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music 2024-06-06 20:31:35.497 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/jcah2ofw.mp3 2024-06-06 20:31:35.497 DEBUG (MainThread) [custom_components.chime_tts] - extra: {'volume': 0.6} 2024-06-06 20:31:35.498 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.914s for audio playback to complete... 2024-06-06 20:31:39.415 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 2 media_players aren't playing... 2024-06-06 20:31:39.416 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.speaker_chambre 2024-06-06 20:31:39.416 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.cuisine 2024-06-06 20:31:39.416 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 3.93 s -----

nimroddolev commented 3 months ago

Thanks for your feedback @Legrand5382.

I released a new version, v1.1.0-beta12, which addresses the blocking call warnings, as well as Sonos-specific bugs related to setting & restoring volume levels.

Regarding your missing TTS audio issue - I saw in the debug logs that you are using a cached file. Please try disabling cache to force new TTS audio. Could you please upgrade to the new version and let me know if you are still experiencing issues?

Legrand5382 commented 3 months ago

Hi,

i have the same issue with this beta, I have desactivated cache with no change, the volume go lower, tts don’t speak, then volume return but louder then it was. The error is still chime tts media player object….is not in list .

nimroddolev commented 3 months ago

Can you please provide your debug log messages?

Legrand5382 commented 3 months ago

I tried beta 12, the volume now work perfectly (it lower and return to original level now but unfortunatly the TTS still doesn’t speak, I will get the log when I get back home. Also I noticed that this time it didn’t show any error message.

nimroddolev commented 3 months ago

Thank you. Please provide the debug log messages when you can 👍

I read on the HA forum today about an issue with Google’s tts service - is it only the TTS audio which is missing, or are there no chime either?

eric1090 commented 3 months ago

There is no chime, it’s completely silent. I used Nabu casa cloud but also tried others with no change.

Here are my log

2024-06-07 23:04:00.250 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue 2024-06-07 23:04:00.250 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.0-beta12 ----- 2024-06-07 23:04:00.252 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters ----- 2024-06-07 23:04:00.252 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] entity_ids: 2024-06-07 23:04:00.252 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.cuisine 2024-06-07 23:04:00.252 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.speaker_chambre 2024-06-07 23:04:00.252 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] chime_path = bells 2024-06-07 23:04:00.252 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] cache = True 2024-06-07 23:04:00.252 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] offset = 450.0 2024-06-07 23:04:00.252 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] final_delay = 0.0 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] message = testing 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_platform = cloud 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_speed = 100.0 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_pitch = 0 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce = True 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] fade_audio = False 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] volume_level = 0.46 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join_players = False 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] unjoin_players = False 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array: 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - entity_id: media_player.cuisine 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.31 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.46 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: True 2024-06-07 23:04:00.253 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-06-07 23:04:00.254 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-06-07 23:04:00.254 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - entity_id: media_player.speaker_chambre 2024-06-07 23:04:00.254 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-06-07 23:04:00.254 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.73 2024-06-07 23:04:00.254 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.46 2024-06-07 23:04:00.254 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False 2024-06-07 23:04:00.254 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-06-07 23:04:00.254 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-06-07 23:04:00.255 DEBUG (MainThread) [custom_components.chime_tts] Checking Chime TTS audio cache 2024-06-07 23:04:00.258 DEBUG (MainThread) [custom_components.chime_tts] Cached audio found: 2024-06-07 23:04:00.258 DEBUG (MainThread) [custom_components.chime_tts] - local_path = "/media/sounds/temp/chime_tts/qx7g_e84.mp3" 2024-06-07 23:04:00.258 DEBUG (MainThread) [custom_components.chime_tts] - audio_duration = 3.122 2024-06-07 23:04:00.258 DEBUG (MainThread) [custom_components.chime_tts] - public_path = None 2024-06-07 23:04:00.258 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/qx7g_e84.mp3" 2024-06-07 23:04:00.258 DEBUG (MainThread) [custom_components.chime_tts] **** 2024-06-07 23:04:00.258 DEBUG (MainThread) [custom_components.chime_tts] Pre-Playback Actions 2024-06-07 23:04:00.258 DEBUG (MainThread) [custom_components.chime_tts] **** 2024-06-07 23:04:00.258 DEBUG (MainThread) [custom_components.chime_tts] ** 2024-06-07 23:04:00.259 DEBUG (MainThread) [custom_components.chime_tts] Chime TTS playback 2024-06-07 23:04:00.259 DEBUG (MainThread) [custom_components.chime_tts] ** 2024-06-07 23:04:00.260 DEBUG (MainThread) [custom_components.chime_tts] 2 Sonos media players detected: 2024-06-07 23:04:00.260 DEBUG (MainThread) [custom_components.chime_tts] - media_player.cuisine 2024-06-07 23:04:00.260 DEBUG (MainThread) [custom_components.chime_tts] - media_player.speaker_chambre 2024-06-07 23:04:00.260 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data: 2024-06-07 23:04:00.260 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.cuisine', 'media_player.speaker_chambre'] 2024-06-07 23:04:00.260 DEBUG (MainThread) [custom_components.chime_tts] - announce: True 2024-06-07 23:04:00.260 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music 2024-06-07 23:04:00.260 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/qx7g_e84.mp3 2024-06-07 23:04:00.260 DEBUG (MainThread) [custom_components.chime_tts] - extra: {'volume': 0.46} 2024-06-07 23:04:00.260 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.122s for audio playback to complete... 2024-06-07 23:04:03.384 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 2 media_players aren't playing... 2024-06-07 23:04:03.385 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.speaker_chambre

Le 8 juin 2024 à 1:51 p.m., Nimrod Dolev @.***> a écrit :



Thank you. Please provide the debug log messages when you can 👍

I read on the HA forum today about an issue with Google’s tts service - is it only the TTS audio which is missing, or are there no chime either?

— Reply to this email directly, view it on GitHubhttps://github.com/nimroddolev/chime_tts/issues/121#issuecomment-2156119943, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6G3W7M2SBVFCMQU3Z6GKQTZGNADDAVCNFSM6AAAAABGPRT67GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJWGEYTSOJUGM. You are receiving this because you were mentioned.Message ID: @.***>

nimroddolev commented 3 months ago

None of the changes in the latest beta releases should have caused playback issues...perhaps try reverting to v1.1.0 to check if the missing playback is caused by the beta.

I haven't been able to reproduce this issue in neither my docker nor my RPi Home instances.

Legrand5382 commented 3 months ago

With version 1.1 the tts speak, I have done a few test and it’s when announce is activated in beta that TTS won’t speak, volume lower and return perfectly to good volume level but no speaking, in my testing fade option will also prevent the speaking, volume go to mute, no speaking and won’t return.

If I don’t use announce or fade, music go off, TTS will speak but music won’t return.

Le 9 juin 2024 à 1:27 a.m., Nimrod Dolev @.***> a écrit :



None of the changes in the latest beta releases should have caused playback issues...perhaps try reverting to v1.1.0 to check if the missing playback is caused by the beta.

I haven't been able to reproduce this issue in neither my docker nor my RPi Home instances.

— Reply to this email directly, view it on GitHubhttps://github.com/nimroddolev/chime_tts/issues/121#issuecomment-2156327265, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AR3LDLEJ7LSAAFM5KJGYHP3ZGPRT3AVCNFSM6AAAAABGPRT67GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJWGMZDOMRWGU. You are receiving this because you were mentioned.Message ID: @.***>

nimroddolev commented 3 months ago

I released beta 13 which I should address the problem with announce=true. The audio should play normally, and the music should return after the notification ends.

I would appreciate it if you could please check the new version 👍

eric1090 commented 3 months ago

Just finished testing it, unfortunately I have the same behaviour with annonce, music volume lower and return to normal but no speaking, if annonce is not activated then TTS will speak but doesn’t restore the music, I also tried uncheck cache, completely deleted and re-install chime TTS to beta 13.

Thank you again for your time working on this.

Le 9 juin 2024 à 2:43 p.m., Nimrod Dolev @.***> a écrit :



I release beta 13 which I should address the problem with announce=true. The audio should play normally, aand the music should return after the notification ends.

I would appreciate it if you could please check the new version 👍

— Reply to this email directly, view it on GitHubhttps://github.com/nimroddolev/chime_tts/issues/121#issuecomment-2156734064, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6G3W7IQVRKX23BNZ4A4NUTZGSO4JAVCNFSM6AAAAABGPRT67GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJWG4ZTIMBWGQ. You are receiving this because you were mentioned.Message ID: @.***>

nimroddolev commented 3 months ago

Thank you for testing and providing the results. Could you please provide me with the debug log messages?

Legrand5382 commented 3 months ago

Here are my logs,

024-06-10 20:00:32.941 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue 2024-06-10 20:00:32.941 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.0-beta13 ----- 2024-06-10 20:00:32.948 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters ----- 2024-06-10 20:00:32.948 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] entity_ids: 2024-06-10 20:00:32.948 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.cuisine 2024-06-10 20:00:32.948 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.speaker_chambre 2024-06-10 20:00:32.948 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] chime_path = bright 2024-06-10 20:00:32.948 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] cache = True 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] offset = 450.0 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] final_delay = 0.0 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] message = testing

2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_speed = 100.0 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_pitch = 0 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce = True 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] fade_audio = False 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] volume_level = 0.65 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join_players = False 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] unjoin_players = False 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] media_players_array: 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.cuisine 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.36 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.65 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-06-10 20:00:32.949 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: entity_id: media_player.speaker_chambre 2024-06-10 20:00:32.950 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-06-10 20:00:32.950 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.74 2024-06-10 20:00:32.950 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.65 2024-06-10 20:00:32.950 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False 2024-06-10 20:00:32.950 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-06-10 20:00:32.950 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-06-10 20:00:32.951 DEBUG (MainThread) [custom_components.chime_tts] Checking Chime TTS audio cache 2024-06-10 20:00:32.957 DEBUG (MainThread) [custom_components.chime_tts] ...no cached audio found 2024-06-10 20:00:32.957 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/bright.mp3 2024-06-10 20:00:32.957 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/bright.mp3"... 2024-06-10 20:00:33.059 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 0.637s 2024-06-10 20:00:33.059 DEBUG (MainThread) [custom_components.chime_tts] - Attempting to retrieve TTS audio from cache... 2024-06-10 20:00:33.061 DEBUG (MainThread) [custom_components.chime_tts] ...no cached TTS audio found 2024-06-10 20:00:33.062 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - No tts_platform parameter provided. Using 'cloud' 2024-06-10 20:00:33.062 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters: 2024-06-10 20:00:33.062 DEBUG (MainThread) [custom_components.chime_tts] tts_platform = 'cloud' 2024-06-10 20:00:33.063 DEBUG (MainThread) [custom_components.chime_tts] message = 'testing

' 2024-06-10 20:00:33.063 DEBUG (MainThread) [custom_components.chime_tts] cache = False 2024-06-10 20:00:33.063 DEBUG (MainThread) [custom_components.chime_tts] language = None 2024-06-10 20:00:33.063 DEBUG (MainThread) [custom_components.chime_tts] options = {} 2024-06-10 20:00:33.654 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 590.0ms 2024-06-10 20:00:33.654 DEBUG (MainThread) [custom_components.chime_tts] - Saving generated TTS audio to cache... 2024-06-10 20:00:33.723 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/lh9i7x_x.mp3 2024-06-10 20:00:33.723 DEBUG (MainThread) [custom_components.chime_tts] - Saving data to chime_tts storage: 2024-06-10 20:00:33.723 DEBUG (MainThread) [custom_components.chime_tts] - key: "4f811d5c12efa943c878ef488528a2faf1991e3e6ab7effcbddf26304356dc0c" 2024-06-10 20:00:33.723 DEBUG (MainThread) [custom_components.chime_tts] - value: "{'local_path': '/media/sounds/temp/chime_tts/lh9i7x_x.mp3', 'audio_duration': 1.728}" 2024-06-10 20:00:33.725 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio saved to cache 2024-06-10 20:00:33.727 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to folder: /media/sounds/temp/chime_tts/... 2024-06-10 20:00:33.820 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/ozueoyzq.mp3 2024-06-10 20:00:33.932 DEBUG (MainThread) [custom_components.chime_tts] - Saving data to chime_tts storage: 2024-06-10 20:00:33.932 DEBUG (MainThread) [custom_components.chime_tts] - key: "369138799b49d913fa7d80474788a9ac54f696eb8f91048b1430374e3b7046ed" 2024-06-10 20:00:33.932 DEBUG (MainThread) [custom_components.chime_tts] - value: "{'local_path': '/media/sounds/temp/chime_tts/ozueoyzq.mp3', 'audio_duration': 2.815}" 2024-06-10 20:00:33.934 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated: 2024-06-10 20:00:33.934 DEBUG (MainThread) [custom_components.chime_tts] audio_duration = 2.815 2024-06-10 20:00:33.934 DEBUG (MainThread) [custom_components.chime_tts] local_path = "/media/sounds/temp/chime_tts/ozueoyzq.mp3" 2024-06-10 20:00:33.934 DEBUG (MainThread) [custom_components.chime_tts] public_path = None 2024-06-10 20:00:33.934 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/ozueoyzq.mp3" 2024-06-10 20:00:33.934 DEBUG (MainThread) [custom_components.chime_tts] **** 2024-06-10 20:00:33.934 DEBUG (MainThread) [custom_components.chime_tts] Pre-Playback Actions 2024-06-10 20:00:33.934 DEBUG (MainThread) [custom_components.chime_tts] **** 2024-06-10 20:00:33.934 DEBUG (MainThread) [custom_components.chime_tts] ** 2024-06-10 20:00:33.934 DEBUG (MainThread) [custom_components.chime_tts] Chime TTS playback 2024-06-10 20:00:33.934 DEBUG (MainThread) [custom_components.chime_tts] ** 2024-06-10 20:00:33.935 DEBUG (MainThread) [custom_components.chime_tts] 2 Sonos media players detected: 2024-06-10 20:00:33.935 DEBUG (MainThread) [custom_components.chime_tts] - media_player.cuisine 2024-06-10 20:00:33.935 DEBUG (MainThread) [custom_components.chime_tts] - media_player.speaker_chambre 2024-06-10 20:00:33.935 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data: 2024-06-10 20:00:33.935 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.cuisine', 'media_player.speaker_chambre'] 2024-06-10 20:00:33.935 DEBUG (MainThread) [custom_components.chime_tts] - announce: True 2024-06-10 20:00:33.935 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music 2024-06-10 20:00:33.935 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/ozueoyzq.mp3 2024-06-10 20:00:33.935 DEBUG (MainThread) [custom_components.chime_tts] - extra: {'volume': 0.65} 2024-06-10 20:00:33.936 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 2.815s for audio playback to complete... 2024-06-10 20:00:36.753 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 0 media_players aren't playing... 2024-06-10 20:00:36.754 DEBUG (MainThread) [custom_components.chime_tts] - Timed out waiting for playback to complete 2024-06-10 20:00:36.754 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 3.81 s -----

Le 10 juin 2024 à 4:36 p.m., Nimrod Dolev @.***> a écrit :



Thank you for testing and providing the results. Could you please provide me with the debug log messages?

— Reply to this email directly, view it on GitHubhttps://github.com/nimroddolev/chime_tts/issues/121#issuecomment-2159238691, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AR3LDLG6S5MFTNBIOZ7TFDLZGYE5FAVCNFSM6AAAAABGPRT67GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJZGIZTQNRZGE. You are receiving this because you were mentioned.Message ID: @.***>

nimroddolev commented 3 months ago

Thank you @Legrand5382.

Unfortunately I don't see any issues from the debug log messages. I read on the Sonos integration's documentation page that setting volume via the extra dictionary (which is what Chime TTS uses for Sonos playback) is may not be supported by "older Sonos hardware or legacy firmware versions (“S1”)". Could it be that this is the issue? Perhaps you could run some tests of media_player.play_media which use the extra parameter, to see if there's an issue outside of Chime TTS?

Legrand5382 commented 3 months ago

Your welcome,

They are both latest generation Sonos speakers with S2, when tried this code witch have the extra volume, it worked perfectly

service: media_player.play_media target: entity_id: media_player.cuisine data: media_content_type: music announce: true media_content_id: media-source://media_source/local/sounds/temp/chime_tts/y5wf4h_1.mp3 extra: volume: 80

Le 11 juin 2024 à 9:39 a.m., Nimrod Dolev @.***> a écrit :



Thank you @Legrand5382https://github.com/Legrand5382.

Unfortunately I don't see any issues from the debug log messages. I read on the Sonos integration's documentation pagehttps://www.home-assistant.io/integrations/sonos/#playing-media that setting volume via the extra dictionary (which is what Chime TTS uses for Sonos playback) is may not be supported by "older Sonos hardware or legacy firmware versions (“S1”)". Could it be that this is the issue? Perhaps you could run some tests of media_player.play_media which use the extra parameter, to see if there's an issue outside of Chime TTS?

— Reply to this email directly, view it on GitHubhttps://github.com/nimroddolev/chime_tts/issues/121#issuecomment-2160794222, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AR3LDLGLAJKT66PAM5WPB6LZG34XZAVCNFSM6AAAAABGPRT67GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRQG44TIMRSGI. You are receiving this because you were mentioned.Message ID: @.***>

nimroddolev commented 3 months ago

Thank you, I think I found the cause of the bug: When Chime TTS adds the volume to the service call, it adds it as a percentage float instead of a whole number between 0-100, eg: 0.65 instead of 65 🤦

I will add a fix and make a new beta release.

nimroddolev commented 3 months ago

Please upgrade to v1.1.0-beta14 and let me know if the volume issue is resolved

eric1090 commented 3 months ago

V-11 work almost perfectly 😊 I did a few test and the only issue I see is if volume is not activated (leaved untouched) in the tts setting, it won’t speak but if set to any volume then it work flawlessly.

Le 11 juin 2024 à 10:09 a.m., Nimrod Dolev @.***> a écrit :



Please upgrade to v1.1.0-beta14 and let me know if the volume issue is resolved

— Reply to this email directly, view it on GitHubhttps://github.com/nimroddolev/chime_tts/issues/121#issuecomment-2160864961, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6G3W7LMMXOLYYX5RIXHMWDZG4AI3AVCNFSM6AAAAABGPRT67GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRQHA3DIOJWGE. You are receiving this because you were mentioned.Message ID: @.***>

HA-TB303 commented 3 months ago

Hi, I feel like we are walking in circles and I can image you feel the same way :) This seems to be a hard 'bug' to squash and I am also not 100% convinced the bug is even (entirely) in your code. I might be some combination issue.

I only have modern S2 speakers which are running the latest firmware.

HA version: 2024.6.2 Chime_tts: beta 14

media_player.kantoor (this is a sonos era-100 using wifi) media_player.keuken (this is a sonos Move 2 docked on the charger, using wifi) media_player.woonkamer (this is asonos ARC using ethernet)

My test service call:

service: chime_tts.say
metadata: {}
data:
  volume_level: 0.5
  chime_path: bells_2
  message: Dit is een test.
  tts_platform: cloud
  announce: true
  join_players: true
  unjoin_players: true
target:
  entity_id:
    - media_player.kantoor
    - media_player.keuken
    - media_player.woonkamer

media_player.woonkamer is playing a (loud) radio stream . The other speakers are silent.

What actually happens:

  1. media_player.woonkamer stops playing the stream.
  2. I hear the chime on media_player_kantoor only. The rest stays silent.
  3. I hear the tts on media_player_kantoor only. The rest stays silent.
  4. Music on media_player.woonkamer does NOT continue

log:

2024-06-11 16:25:10.755 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration chime_tts which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-06-11 16:33:18.645 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-06-11 16:33:18.645 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.0-beta14 -----
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids:
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.kantoor
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.keuken
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 2: media_player.woonkamer
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = bells_2
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = Dit is een test.
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_platform = cloud
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = True
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = 0.5
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = True
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = True
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.kantoor
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.35
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.5
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: entity_id: media_player.keuken
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.4
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.5
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 2: entity_id: media_player.woonkamer
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.25
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.5
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-11 16:33:18.647 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/bells_2.mp3
2024-06-11 16:33:18.648 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/bells_2.mp3"...
2024-06-11 16:33:18.741 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 1.279s
2024-06-11 16:33:18.743 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-06-11 16:33:18.743 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'cloud'
2024-06-11 16:33:18.743 DEBUG (MainThread) [custom_components.chime_tts] * message = 'Dit is een test.'
2024-06-11 16:33:18.743 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-06-11 16:33:18.743 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-06-11 16:33:18.743 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-06-11 16:33:18.831 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 90.0ms
2024-06-11 16:33:18.840 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to folder: /media/sounds/temp/chime_tts/...
2024-06-11 16:33:18.933 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/6j5he4a3.mp3
2024-06-11 16:33:19.021 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-06-11 16:33:19.021 DEBUG (MainThread) [custom_components.chime_tts] * audio_duration = 4.009
2024-06-11 16:33:19.021 DEBUG (MainThread) [custom_components.chime_tts] * local_path = "/media/sounds/temp/chime_tts/6j5he4a3.mp3"
2024-06-11 16:33:19.021 DEBUG (MainThread) [custom_components.chime_tts] * public_path = None
2024-06-11 16:33:19.021 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/6j5he4a3.mp3"
2024-06-11 16:33:19.021 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-11 16:33:19.021 DEBUG (MainThread) [custom_components.chime_tts] *** Pre-Playback Actions ***
2024-06-11 16:33:19.021 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-11 16:33:19.021 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Joined speaker leader: media_player.kantoor, with 2 group members:
2024-06-11 16:33:19.021 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.keuken
2024-06-11 16:33:19.021 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.woonkamer
2024-06-11 16:33:20.725 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-11 16:33:20.725 DEBUG (MainThread) [custom_components.chime_tts] *** Chime TTS playback ***
2024-06-11 16:33:20.725 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-11 16:33:20.725 DEBUG (MainThread) [custom_components.chime_tts] 1 Sonos media player detected:
2024-06-11 16:33:20.725 DEBUG (MainThread) [custom_components.chime_tts] - media_player.kantoor
2024-06-11 16:33:20.725 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data:
2024-06-11 16:33:20.725 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.kantoor']
2024-06-11 16:33:20.725 DEBUG (MainThread) [custom_components.chime_tts] - announce: True
2024-06-11 16:33:20.725 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2024-06-11 16:33:20.725 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/6j5he4a3.mp3
2024-06-11 16:33:20.725 DEBUG (MainThread) [custom_components.chime_tts] - extra: {'volume': 50}
2024-06-11 16:33:20.728 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 4.009s for audio playback to complete...
2024-06-11 16:33:24.737 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 0 media_players aren't playing...
2024-06-11 16:33:24.738 DEBUG (MainThread) [custom_components.chime_tts] - Timed out waiting for playback to complete
2024-06-11 16:33:24.738 DEBUG (MainThread) [custom_components.chime_tts] *****************************
2024-06-11 16:33:24.738 DEBUG (MainThread) [custom_components.chime_tts] *** Post-Playback Actions ***
2024-06-11 16:33:24.738 DEBUG (MainThread) [custom_components.chime_tts] *****************************
2024-06-11 16:33:24.738 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Calling media_player.unjoin service...
2024-06-11 16:33:24.738 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.unjoin 1/3: media_player.keuken
2024-06-11 16:33:25.652 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.unjoin 2/3: media_player.woonkamer
2024-06-11 16:33:27.171 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.unjoin 3/3: media_player.kantoor
2024-06-11 16:33:27.273 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 8.63 s -----
2024-06-11 16:34:13.994 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-06-11 16:34:13.999 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.0-beta14 -----
2024-06-11 16:34:14.000 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-06-11 16:34:14.000 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids:
2024-06-11 16:34:14.000 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.kantoor
2024-06-11 16:34:14.000 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.keuken
2024-06-11 16:34:14.000 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 2: media_player.woonkamer
2024-06-11 16:34:14.000 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = bells_2
2024-06-11 16:34:14.000 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-06-11 16:34:14.000 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-06-11 16:34:14.000 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-06-11 16:34:14.000 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = Dit is een test.
2024-06-11 16:34:14.000 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_platform = cloud
2024-06-11 16:34:14.000 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-06-11 16:34:14.000 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = True
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = 0.5
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = True
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = True
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.kantoor
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.35
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.5
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: entity_id: media_player.keuken
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.4
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.5
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 2: entity_id: media_player.woonkamer
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.25
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.5
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/bells_2.mp3
2024-06-11 16:34:14.001 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/bells_2.mp3"...
2024-06-11 16:34:14.084 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 1.279s
2024-06-11 16:34:14.086 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-06-11 16:34:14.086 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'cloud'
2024-06-11 16:34:14.086 DEBUG (MainThread) [custom_components.chime_tts] * message = 'Dit is een test.'
2024-06-11 16:34:14.086 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-06-11 16:34:14.086 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-06-11 16:34:14.086 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-06-11 16:34:14.169 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 80.0ms
2024-06-11 16:34:14.176 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to folder: /media/sounds/temp/chime_tts/...
2024-06-11 16:34:14.270 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/dk1di7mk.mp3
2024-06-11 16:34:14.357 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-06-11 16:34:14.357 DEBUG (MainThread) [custom_components.chime_tts] * audio_duration = 4.009
2024-06-11 16:34:14.357 DEBUG (MainThread) [custom_components.chime_tts] * local_path = "/media/sounds/temp/chime_tts/dk1di7mk.mp3"
2024-06-11 16:34:14.357 DEBUG (MainThread) [custom_components.chime_tts] * public_path = None
2024-06-11 16:34:14.357 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/dk1di7mk.mp3"
2024-06-11 16:34:14.357 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-11 16:34:14.357 DEBUG (MainThread) [custom_components.chime_tts] *** Pre-Playback Actions ***
2024-06-11 16:34:14.357 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-11 16:34:14.357 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Joined speaker leader: media_player.kantoor, with 2 group members:
2024-06-11 16:34:14.357 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.keuken
2024-06-11 16:34:14.357 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.woonkamer
2024-06-11 16:34:16.034 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-11 16:34:16.034 DEBUG (MainThread) [custom_components.chime_tts] *** Chime TTS playback ***
2024-06-11 16:34:16.034 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-11 16:34:16.034 DEBUG (MainThread) [custom_components.chime_tts] 1 Sonos media player detected:
2024-06-11 16:34:16.034 DEBUG (MainThread) [custom_components.chime_tts] - media_player.kantoor
2024-06-11 16:34:16.034 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data:
2024-06-11 16:34:16.034 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.kantoor']
2024-06-11 16:34:16.034 DEBUG (MainThread) [custom_components.chime_tts] - announce: True
2024-06-11 16:34:16.034 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2024-06-11 16:34:16.034 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/dk1di7mk.mp3
2024-06-11 16:34:16.034 DEBUG (MainThread) [custom_components.chime_tts] - extra: {'volume': 50}
2024-06-11 16:34:16.035 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 4.009s for audio playback to complete...
2024-06-11 16:34:20.045 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 0 media_players aren't playing...
2024-06-11 16:34:20.045 DEBUG (MainThread) [custom_components.chime_tts] - Timed out waiting for playback to complete
2024-06-11 16:34:20.045 DEBUG (MainThread) [custom_components.chime_tts] *****************************
2024-06-11 16:34:20.045 DEBUG (MainThread) [custom_components.chime_tts] *** Post-Playback Actions ***
2024-06-11 16:34:20.045 DEBUG (MainThread) [custom_components.chime_tts] *****************************
2024-06-11 16:34:20.045 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Calling media_player.unjoin service...
2024-06-11 16:34:20.045 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.unjoin 1/3: media_player.keuken
2024-06-11 16:34:21.430 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.unjoin 2/3: media_player.woonkamer
2024-06-11 16:34:22.890 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - media_player.unjoin 3/3: media_player.kantoor
2024-06-11 16:34:23.599 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 9.6 s -----

Thanks for your effort!

HA-TB303 commented 3 months ago

If you want me to test anything else, please let me know exactly what to test!

nimroddolev commented 3 months ago

Hi @HA-TB303, I share in your frustration but at the same time I would be happy to find a resolution.

Regarding your experience:

media_player.woonkamer stops playing the stream. I hear the chime on media_player_kantoor only. The rest stays silent. I hear the tts on media_player_kantoor only. The rest stays silent. Music on media_player.woonkamer does NOT continue

I believe the issue may be related to the use of join_players/unjoin_players. Other Sonos users have reported that there are issues that occur when joining their speakers together.

Could you please let me know if you still have issues when not joining speakers?

nimroddolev commented 3 months ago

I just released another beta, v1.1.0-beta15, which fixes the bug when no volume_level value is included in the service call.

eric1090 commented 3 months ago

Bêta 15 work perfectly for me, thank you again for working on this 😊

For other Sonos user, if using annonce, don’t use join/unjoin, just select all your speakers you wish TTS to speak on, it might not be completely sync but it’s a limitation from Sonos announce option and not chime tts.

Le 11 juin 2024 à 10:46 a.m., Nimrod Dolev @.***> a écrit :



I just released another beta, v1.1.0-beta15, which fixes the bug when no volume_level value is included in the service call.

— Reply to this email directly, view it on GitHubhttps://github.com/nimroddolev/chime_tts/issues/121#issuecomment-2160952324, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6G3W7I2RIIVN7X6H23TVF3ZG4ETFAVCNFSM6AAAAABGPRT67GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRQHE2TEMZSGQ. You are receiving this because you were mentioned.Message ID: @.***>

HA-TB303 commented 3 months ago

Hi,

Beta 15:

Indeed it seems to work in near perfect sync on all speakers with:

service: chime_tts.say
metadata: {}
data:
  volume_level: 0.35
  chime_path: bells_2
  message: Dit is een test.
  tts_platform: cloud
  announce: true
  join_players: false
  unjoin_players: false
target:
  entity_id:
    - media_player.kantoor
    - media_player.keuken
    - media_player.woonkamer

👍

nimroddolev commented 3 months ago

A lot of fixes have been included in the latest stable release, v1.1.0. I would kindly ask if you could please upgrade to this new version and let me know if the issues have been resolved.

eric1090 commented 3 months ago

For me here with my Sonos everything work perfectly 😊

Le 19 juin 2024 à 1:47 a.m., Nimrod Dolev @.***> a écrit :



A lot of fixes have been included in the latest stable release, v1.1.0. I would kindly ask if you could please upgrade to this new version and let me know if the issues have been resolved.

— Reply to this email directly, view it on GitHubhttps://github.com/nimroddolev/chime_tts/issues/121#issuecomment-2177799918, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6G3W7L3LOLNV7RV53UNEQLZIELQZAVCNFSM6AAAAABGPRT67GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZXG44TSOJRHA. You are receiving this because you were mentioned.Message ID: @.***>

nimroddolev commented 3 months ago

I am closing this issue. Thanks to everyone for helping me work on it 🙏