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
196 stars 14 forks source link

Unable to perform FFmpeg conversion: source file not found on file system #114

Closed attila-szucs closed 7 months ago

attila-szucs commented 7 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 Europe/Budapest
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4996 Installed Version | 1.34.0 Stage | running Available Repositories | 1405 Downloaded Repositories | 31
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | 2025. február 25. 01:00 relayer_connected | true relayer_region | eu-central-1 remote_enabled | true remote_connected | true alexa_enabled | true google_enabled | false remote_server | eu-central-1-3.ui.nabu.casa certificate_status | ready 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 | 234.7 GB disk_used | 25.8 GB healthy | true supported | true board | generic-x86-64 supervisor_api | ok version_api | ok installed_addons | Advanced SSH & Web Terminal (17.2.0), Paradox Alarm Interface (3.4.0), SQLite Web (4.1.2), TasmoAdmin (0.30.0), Duck DNS (1.16.0), NGINX Home Assistant SSL proxy (3.9.0), ZigStar TI CC2652P/P7 FW Flasher (0.4.0), EMQX (0.5.0), LMS (Formerly Logitech Media Server) (8.4.0.0)
Dashboards dashboards | 6 -- | -- resources | 21 views | 13 mode | storage
Recorder oldest_recorder_run | 2023. március 10. 12:30 -- | -- current_recorder_run | 2024. április 12. 17:50 estimated_db_size | 2939.66 MiB database_engine | sqlite database_version | 3.44.2
Spotify api_endpoint_reachable | ok -- | --

Checklist

Describe the issue

I'm using Chime_TTS with an Alexa media player speaker and using cached mode. I'm getting these warning messages after each message: "Unable to perform FFmpeg conversion: source file not found on file system: https://REDACTED.ui.nabu.casa/local/chime_tts/83kmvf3i.mp3". Everything works fine, the chime and the message plays Ok. The referred file in the warning message is actually there and accessible at the referred url.

Reproduction steps

  1. Call chime_tts.say
  2. ...

Debug logs

2024-04-13 11:39:57.206 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.0-beta2 -----
2024-04-13 11:39:57.207 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-04-13 11:39:57.210 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-04-13 11:39:57.211 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids = ['media_player.echodot']
2024-04-13 11:39:57.211 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = media/sounds/alexa_notification.mp3
2024-04-13 11:39:57.211 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = True
2024-04-13 11:39:57.211 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 200.0
2024-04-13 11:39:57.211 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-04-13 11:39:57.212 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = REDACTED
2024-04-13 11:39:57.212 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_platform = cloud
2024-04-13 11:39:57.212 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-04-13 11:39:57.212 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-04-13 11:39:57.212 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = False
2024-04-13 11:39:57.212 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-04-13 11:39:57.213 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-04-13 11:39:57.213 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-04-13 11:39:57.213 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * audio_conversion = -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0
2024-04-13 11:39:57.213 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] --- Audio will be converted to Alexa-friendly format as Alexa speaker/s detected ---
2024-04-13 11:39:57.216 DEBUG (MainThread) [custom_components.chime_tts] *** Checking Chime TTS audio cache ***
2024-04-13 11:39:57.226 DEBUG (MainThread) [custom_components.chime_tts] Cached audio found:
2024-04-13 11:39:57.226 DEBUG (MainThread) [custom_components.chime_tts] - public_path = "https://REDACTED.ui.nabu.casa/local/chime_tts/83kmvf3i.mp3"
2024-04-13 11:39:57.226 DEBUG (MainThread) [custom_components.chime_tts] - audio_duration = 5.04
2024-04-13 11:39:57.227 DEBUG (MainThread) [custom_components.chime_tts] - local_path = None
2024-04-13 11:39:57.227 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id = None
2024-04-13 11:39:57.227 DEBUG (MainThread) [custom_components.chime_tts] Apply audio conversion
2024-04-13 11:39:57.228 WARNING (MainThread) [custom_components.chime_tts.helpers.helpers] Unable to perform FFmpeg conversion: source file not found on file system: https://REDACTED.ui.nabu.casa/local/chime_tts/83kmvf3i.mp3
2024-04-13 11:39:57.228 DEBUG (MainThread) [custom_components.chime_tts] *** Pre-Playback Actions ***
2024-04-13 11:39:57.228 DEBUG (MainThread) [custom_components.chime_tts] *** Chime TTS playback ***
2024-04-13 11:39:57.229 DEBUG (MainThread) [custom_components.chime_tts] 1 Alexa media player detected:
2024-04-13 11:39:57.230 DEBUG (MainThread) [custom_components.chime_tts] - media_player.echodot
2024-04-13 11:39:57.230 DEBUG (MainThread) [custom_components.chime_tts] Calling notify.alexa_media with data:
2024-04-13 11:39:57.230 DEBUG (MainThread) [custom_components.chime_tts] - message: <audio src="https://REDACTED.ui.nabu.casa/local/chime_tts/83kmvf3i.mp3"/>
2024-04-13 11:39:57.231 DEBUG (MainThread) [custom_components.chime_tts] - data: {'type': 'tts'}
2024-04-13 11:39:57.231 DEBUG (MainThread) [custom_components.chime_tts] - target: ['media_player.echodot']
2024-04-13 11:39:57.232 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 5.04s for audio playback to complete...
2024-04-13 11:40:02.277 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player] - Waiting until 1 media_player isn't playing...
2024-04-13 11:40:02.277 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player] ✔ media_player.echodot
2024-04-13 11:40:02.277 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 5.07 s -----

Diagnostics dump

No response

attila-szucs commented 7 months ago

Forgot to say: I'm using v1.1.0-beta2

dbullendsl commented 7 months ago

have you enabled ffmpeg in your configuration.yaml file?

# Add ffmpeg to the configuration to format audio
# output to play on Amazon Echos
ffmpeg:
attila-szucs commented 7 months ago

ffmpeg: was not enabled in configuration.yaml. I have added it and restarted, but the same warning messages are still coming.

nimroddolev commented 7 months ago

H @attila-szucs, I believe I understand the cause for the warning. I will add a fix in an upcoming release.

attila-szucs commented 7 months ago

Thank you then!

nimroddolev commented 7 months ago

Hi @attila-szucs. I just released a new beta version, v1.1.0-beta3, which hopefully fixes the issue.

I'd appreciate it if you could please upgrade and test it 🙏

To install the new beta version:

  1. Open the Chime TTS repository in HACS
  2. Click on the button in the top right
  3. Select the ↻ Redownload option
  4. Enable the Show beta versions option (it may take a moment to update the list)
  5. Select version v1.1.0-beta3 from the updated version drop-down list
  6. Restart Home Assistant
attila-szucs commented 7 months ago

Hi Nimroddolev, I have quickly tested the new beta version and the warning messages are all gone! Good job! It works flawlessly for me now. Thank you so much for your work on this component!

nimroddolev commented 7 months ago

That's great i'm happy to hear it's resolved! Thank you, i'm glad you find it useful 👍