Closed DanDixon closed 5 months ago
I think the reason that
audio_conversion: volume 80%
doesn't overwrite the file is because I'm getting this error (just realized):
2024-05-06 17:42:11.128 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Converting audio: "ffmpeg -i /media/sounds/notify.mp3 volume 80% /media/sounds/notify_converted.mp3"
2024-05-06 17:42:11.266 ERROR (MainThread) [custom_components.chime_tts.helpers.helpers] FFmpeg conversion failed.
Yeah, just confirmed that the volume command isn't changing the volume of the chime.
Full logs for this run:
2024-05-06 17:42:11.083 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say URL Called. Version v1.1.0-beta4 -----
2024-05-06 17:42:11.083 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-05-06 17:42:11.093 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids = []
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = True
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array = []
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = [{'chime': 'media/sounds/notify.mp3', 'audio_conversion': 'volume 80%'}, {'tts': 'Start------', 'offset': -800}]
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_platform = tts.openai_tts
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = False
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-05-06 17:42:11.095 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-05-06 17:42:11.096 DEBUG (MainThread) [custom_components.chime_tts] *** Checking Chime TTS audio cache ***
2024-05-06 17:42:11.126 WARNING (MainThread) [custom_components.chime_tts.helpers.filesystem] Unable to create public URL - File: '/media/chime_tts/dsnq9emr.mp3' is outside the public folder.
2024-05-06 17:42:11.127 DEBUG (MainThread) [custom_components.chime_tts] ...no cached audio found
2024-05-06 17:42:11.128 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/media/sounds/notify.mp3"...
2024-05-06 17:42:11.128 DEBUG (MainThread) [custom_components.chime_tts] - Performing FFmpeg audio conversion of audio file...
2024-05-06 17:42:11.128 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Converting audio: "ffmpeg -i /media/sounds/notify.mp3 volume 80% /media/sounds/notify_converted.mp3"
2024-05-06 17:42:11.266 ERROR (MainThread) [custom_components.chime_tts.helpers.helpers] FFmpeg conversion failed.
2024-05-06 17:42:11.469 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 1.536s
2024-05-06 17:42:11.470 DEBUG (MainThread) [custom_components.chime_tts] - Attempting to retrieve TTS audio from cache...
2024-05-06 17:42:11.491 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/media/temp/chime_tts/kkjjpmcg.mp3"...
2024-05-06 17:42:11.717 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 0.672s
2024-05-06 17:42:11.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Performing overlay of -800.0ms
2024-05-06 17:42:11.718 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to folder: /media/chime_tts/...
2024-05-06 17:42:11.939 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] - File saved to path: /media/chime_tts/t66ozgz0.mp3
2024-05-06 17:42:12.187 DEBUG (MainThread) [custom_components.chime_tts] - Saving data to chime_tts storage:
2024-05-06 17:42:12.187 DEBUG (MainThread) [custom_components.chime_tts] - key: "374f880cb82a0ac6180a79e9e1f64ce0d015c1f4a78d1405aeeb438dd356d048"
2024-05-06 17:42:12.187 DEBUG (MainThread) [custom_components.chime_tts] - value: "{'public_path': '/media/chime_tts/t66ozgz0.mp3', 'audio_duration': 1.536, 'local_path': None}"
2024-05-06 17:42:12.219 WARNING (MainThread) [custom_components.chime_tts.helpers.filesystem] Unable to create public URL - File: '/media/chime_tts/t66ozgz0.mp3' is outside the public folder.
2024-05-06 17:42:12.219 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-05-06 17:42:12.219 DEBUG (MainThread) [custom_components.chime_tts] - audio_duration = 1.536
2024-05-06 17:42:12.219 DEBUG (MainThread) [custom_components.chime_tts] - local_path = None
2024-05-06 17:42:12.219 DEBUG (MainThread) [custom_components.chime_tts] - public_path = None
2024-05-06 17:42:12.219 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id = "media-source://media_source/local/chime_tts/t66ozgz0.mp3"
2024-05-06 17:42:12.219 DEBUG (MainThread) [custom_components.chime_tts] Final URL = None
2024-05-06 17:42:12.219 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say URL Completed in 1.13 s -----
Note: I'm also getting this warning:
Unable to create public URL - File: '/media/chime_tts/t66ozgz0.mp3' is outside the public folder.
But I don't need that file to be public, and the notifications work despite this warning.
Thanks Dan.
These issues should be addressed in v1.1.0-beta5. Can you pleease upgrade and let me know if the issue is resolved?
Yes! This seems to be fixed. Thank you! (and sorry for the delay)
Great! Thank you for testing the beta version.
The fix has been included in the latest stable release, v1.1.0.
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4997 Installed Version | 1.34.0 Stage | running Available Repositories | 1425 Downloaded Repositories | 69 HACS Data | okAccuWeather
can_reach_server | ok -- | -- remaining_requests | 8Home Assistant Cloud
logged_in | true -- | -- subscription_expiration | May 31, 2024 at 5: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-7.ui.nabu.casa certificate_status | ready instance_id | b8337d89d1654680a2050a4ab1c65281 can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Home Assistant OS 12.2 -- | -- update_channel | stable supervisor_version | supervisor-2024.04.4 agent_version | 1.6.0 docker_version | 25.0.5 disk_total | 97.7 GB disk_used | 39.8 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok installed_addons | File editor (5.8.0), Studio Code Server (5.15.0), Mosquitto broker (6.4.0), Home Assistant Google Drive Backup (0.112.1), Hass Calendar Addon (0.500), Terminal & SSH (9.13.0), PS5 MQTT (1.3.3), Samba share (12.3.1), Zigbee2MQTT (1.37.0-1)Dashboards
dashboards | 19 -- | -- resources | 46 views | 265 mode | storageMiele
component_version | 2024.3.0 -- | -- reach_miele_cloud | okRecorder
oldest_recorder_run | April 25, 2024 at 11:04 PM -- | -- current_recorder_run | May 3, 2024 at 8:28 PM estimated_db_size | 2210.27 MiB database_engine | sqlite database_version | 3.44.2Spotify
api_endpoint_reachable | ok -- | --Checklist
Describe the issue
When I use audio_conversion: "-filter:a volume=0.8," it overwrites my notify.mp3 file slowly, making it quieter and quieter until it's totally silent.
Using(see next reply, this generates an error instead)audio_conversion: volume 80%
doesn't seem to cause this.Here's the event data from folder_watcher that shows the file being overwritten:
Reproduction steps
I'm running v1.1.0-beta4
This didn't happen with older versions of Chime TTS.
As described above, using:
audio_conversion: "-filter:a volume=0.8"
Will cause the original chime mp3 file to be overwritten with notify_converted.mp3
Debug logs
Diagnostics dump
No response