-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clear_cache not deleting all files #90
Comments
Hi @dbullendsl. I just released a new beta, v0.13.1-beta5, which hopefully addresses the issue. Please upgrade and let me know if the issue is resolved. To install the new beta version:
|
Upgraded to latest beta, and used this to test:
test failed, the echo responded to the output with the usual error message that the output needs to be properly formatted. The clear_cache didn't seem to do anything. I'll upload the log as soon as I can |
Log output for clear_cache:
log for chime_tts: say
I do notice the parameter media_content_type: music, which could be the problem. When sending output to amazon echos it's required to specify data: |
Thanks for the feedback. |
The Alexa Media Player integration. |
Thank you. I just released a fix: v0.13.1-beta6. Can you please upgrade and let me know if it works for you? |
Ok, I'll try it. I was just thinking, since the echos need the audio adjusted with the conversion parameter, why not just have a check box asking for the device type and use that for formatting and selecting the code to output to the echos? |
The new beta automatically detects that the media_player is an Alexa speaker and makes the conversion without requiring anything else from the user. |
There's something wrong here - not sure it's your code - but I'm getting a failure to call error for chime_tts. I've looked at the log and it looks like it is getting installed properly but I've had to reboot the hardware with the vsn 13.0 installed to get things working again. Here's the log generated by the call to chime_tts:
|
There may be a bug downstream in the code, but the initial issue is that your Home Assistant didn't find Piper. |
No, I had to reboot again (4th time) and am back to vsn 13.0 - all is working , I'll try one more time |
I see. I will investigate on my end. |
I've reloaded the beta and tried again - same results with both Piper and Google Translate. |
I've released a new beta, v0.13.1-beta7 with a fix for the crash. |
Nope, still crashes - here's all the log from the start of the crash
|
Can you please provide the full debug logs? |
Based on the logs it looks like you don't have a media source path defined. Could you please check your configuration for Chime TTS? If there is an issue with the path, you could try re-adding the integration (not reinstalling via HACS, but removing Chime TTS from the integrations page and adding it again). |
Alright, I see there's a beta8 available, so I tried that. You're making progress - no more crash, but no output from the echo.
|
I believe I have found the issue. Can you please upgrade to v0.13.1-beta9 and let me know if it works for you? |
Installed beta9. Still no output using chime_tts: say, chime_tts: say_url is working ok.
|
Thanks again for testing, and your patience! |
ok, loaded beta10 - I'm now getting output from the alexa BUT it is the usual error message I get if the output file is not properly formatted.
|
We're almost there. |
Yes!! I does work, I also tried the Volume level, join, unjoin with multiple Alexas and all worked. |
That’s great! Thanks for testing. |
Yep, the original problem - clear_cache isn't deleting the old files |
Yes, unfortunately I cannot fix the issue for old cache files. You can manually delete them and from that point onward the new cached files should be removed whenever you call the |
Ok, I can live with that, just created a shell command to delete all files from the directory and added it to the script I use to run clear_cache. "rm /config/www/chime_tts/*.mp3" A couple other things I've now noticed in trying to adapt chime_tts: say call to my scripts is that when specifying the volume the alexas will change the volume to the level specified but do not return to the original volume after the call is done. Right now I'll just add a service call to set volume back down to "normal" background level. The other thing I've noticed is that if I use the announce parameter, what ever is playing on the alexas does pause but doesn't resume after the call has finished. I normally have Spotify playing in the background most of the day. |
I will look into the volume issue, but in terms of the pause/resume: were you able to use the announce feature on your Alexa speaker without Chime TTS? I think it might be a feature that isn’t supported l, but I am not sure. |
I'd hadn't tried using it before, so I did now and it doesn't work right at least with Spotify. The pause works when I specify the Alexa device but the resume does not. If I issue the pause to the Spotify player, it will pause, and a resume starts it up again. |
This is a bug, the volume should return to the initial level.
I'll look into whether I can implement pause/resume for Spotify through the Spotify integration. |
I released a new beta, v0.13.1-beta12, which includes a fix for resetting the volume after playback completes. |
Weird, I issued the call to 2 Alexas specifying volume to be .5 The Alexas currently playing Spotify at volume level .2, the call lifted the volume to .5 and left it there. I re-issued the call without change and volume went back down to .2 . Tried it again same sequence and same result. |
Is there anything different in the debug log? |
I haven't been able to duplicate the problem, the volume does go back but there is some delay. |
Unfortunately I can’t do anything about the delay. The code waits for confirmation that the Chime TTS audio finished playing before returning the audio, I’m limited by the time it takes for the state to update in Home Assistant. I might see if there’s anything else I can do there but I doubt it. |
I am going to close this issue but please open a new one if you are still having issues with the volume (or anything else) 👍 |
System Health details
Checklist
Describe the issue
When running the Clear_Cache cleanup only one old mp3 is being deleted from the caching location.
Would like the service call to completely clear the cache.
Reproduction steps
Before running clear_cache
After running clear_cache
Only the most recent file has been removed.
Debug logs
2024-02-13 14:39:08.953 INFO (MainThread) [homeassistant.components.mqtt.discovery] Component has already been discovered: sensor HOMESERVER HOMESERVER_storage_total_disk_count, sending update
2024-02-13 14:39:16.895 INFO (MainThread) [homeassistant.components.automation.clear_chime_tts_path] Clear Chime_TTS Path: Running automation actions
2024-02-13 14:39:16.895 INFO (MainThread) [homeassistant.components.automation.clear_chime_tts_path] Clear Chime_TTS Path: Executing step call service
2024-02-13 14:39:16.896 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Clear Cache Called -----
2024-02-13 14:39:16.896 DEBUG (MainThread) [custom_components.chime_tts] Clearing cached downloaded chimes, cached temporary Chime TTS audio files and cached publicly accessible Chime TTS audio files...
2024-02-13 14:39:16.901 DEBUG (MainThread) [custom_components.chime_tts] - Cached file '/config/www/chime_tts/u4b_m863.mp3' deleted successfully.
2024-02-13 14:39:16.904 DEBUG (MainThread) [custom_components.chime_tts] Clearing cached Home Assistant TTS audio files...
Diagnostics dump
No response
The text was updated successfully, but these errors were encountered: