-
-
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
Problem with chime_tts:play_url #57
Comments
Hi @dbullendsl. I'm sorry to hear you're having issues. Thank you for the detailed log and the list of your troubleshooting steps! I think that your issue might be due to an incorrect public mp3 folder path in the integration's configuration. You can access the integration's configuration by navigating to |
As I’m not familiar with your setup I can’t know what are the correct paths are but I still think that the lack of mp3 files is due to an issue with the paths, probably for both the service calls. |
ok, I'll check that |
I think I found the problem, by executing the chime_tts:say_url function in the developer's console I get a return result of
but I think the result should be https://[server.url]/www/chime_tts/zfijllg7.mp3 Elsewhere in comments in other issues there were instructions to make sure that /local pointed to /media, but that's not a public path for web connections. From running the chime_tts:say fuction with the cache parameter set to true results from the TTS service end up in /media/sounds/temp/chime_tts which is the same as /local/sounds/temp/chime_tts and is not accessible externally. Your code should then move the result to /homeassistant/www/chime_tts which would be accessible as https://[server.url]/www/chime_tts/tts_file.mp3 |
You described exactly what the code does ( It is for these reasons that I feel the problem lies in the public mp3 folder path defined in your configuration. |
Could you please try setting the public mp3 folder path to: |
Excellent! That was it. the intigration is working and I'm getting the mp3 in the www/chime_tts folder, and can paste the URL into a browser and it'll play. Amazon is still throwing an error but I've seen that before when the audio file didn't match Amazon's specifications, so it's not a problem with the integration. If you've got any suggestions on fixing that I'd appreciate it. Can the options field be used to do anything like calling ffmpeg to format the output? |
I’m glad it is now working for you! I would be happy to add support for encoding with ffmpeg. I can add a checkbox specifically for Amazon’s requirements and also a text field to pass ffmpeg parameters for other use cases. |
That would be great, meanwhile I do have it working using a shell command to ffmpeg with the parameters specified on Amazon's AWS SML page. I'll post everything here soon. |
here's my solution, not completely refined, but it works. The set up looks like this: Edit configuration.yaml to add the following
the first script calls chime_tts.say_url, then sends the output to the shell command with another script
second script:
I probably could have gotten by with one script, but I decided to split out the ffmpeg part in case I needed it for some other use case when sending audio to amazon echoes. the only variables are the input message and the resultant url supplied by chime_tts.say_url, the output.mp3 from the shell command is overwritten each time it's run so is a fixed name. I'll be changing the inputs so that I can supply the sounds to play before / after the announcements. Haven't tried changing the voice yet, but for now this is it. Thanks for the assistance, great idea. |
Hey @dbullendsl, I added a new I created a discussion here, and it would be great if you could please test it out and let me know if it works for your use case. I created a new beta version with the changes. Please follow these steps to install it:
|
Checklist
Is your feature request related to a problem? Please describe.
using the say_url function doesn't appear to work. I only have access to Amazon echos and only get an output that says "sorry can't access your simon says..."
First I'm running HassOS on an Intel mini PC
Here's what I'm doing. Execute a script that takes an input for the message and calls the chime_tts:say_url service then sends the output to the echos:
Here's the script and trace.
and here's the log:
so far what I've done
I ssh into the server and found there is no folder /www/chime_tts, I've tried directly accessing the URL on the server and get a 404 error
I manually created the /www/chime_tts folder and nothing is written there
I looked for any new mp3s that were created and found none.
Describe the solution you'd like
locate the issues
Describe alternatives you've considered
stick with my existing solutions
Additional context
none
The text was updated successfully, but these errors were encountered: