Hello~
I’ve got myself an ESP8266 with DAC and ESP8266Audio that can play MP3 from URL and here is the problem. Does anyone know how to make google TTS service to output the URL of the local file to MQTT payload? I’m kinda new and I’m still trying to learn the syntax.
So far I’ve tried to make media_player like this in configuration.yaml
I’ve tried to access the generated files by tts via http but it’s 404 no mater what. I’ve tried ip:8123/local/file.mp3 ip:8123/local/tts/file.mp3 and ip:8123/file.mp3
I’ve only managed to get the file when I set the catch_dir: www then I can access the file with ip:8123/local/file.mp3
anyway, I need to pass that url adress (ip:8123/local/file.mp3) via mqtt payload. I don’t mind if I’ll use the www directory.
Update:
i’ve found that the file is on url: ip/api/tts_proxy/file.mp3
Still dont know how to pass this into mqtt
I’m really close to an implementation of this. My code is really sloppy because I suck. I need some alpha testers to help me.
I have the ESP able to receive soma.fm streams via MQTT and today got it working with MQTT TTS served from the home assistant API folder. This effectively creates an ESP8266 Audio Node that gets served from HA. I need to figure out how to access the TTS filename from HA through a template.
@jumblies do you have any plans to do a nice youtube walk through of this, seems to be a great idea for door bells, washer/dryer notifications etc without having to go looking for the phone to see a notification on there. let me know if you do a youtube video, id love to see it.
I haven’t seen much interest but I’d be happy to try my hand.
I could use some guidance. Have you tried it yet and failed? If so, how far did you get?
I’ve got it playing HA TTS messages with some distortion which I think is due to the amp and might be bitrate dependent (Google TTS) is low and webradio plays just fine.
I havent tried it yet, i was waiting to see if there was a tutorial video, if i get some time over the next couple of weeks i will, if i succeed, ill do a video
Great! Give it a whirl. I’m using the mono amp with a 4W speaker. Using the other DAC I don’t think I got distortion. If you have all the parts it should be almost turn key. Needs MQTT broker and WiFi creds and then can be uploaded to a D1 mini.
With the mono amp, I have distortion of TTS files but I don’t think I have it with the stereo module. I believe it is due to clipping present in the MP3 files generated by google TTS but I don’t have a ton of solid evidence to back that up. Web radio plays fine through the mono amp with speaker without distortion and that is built into the code uploaded to github