Page 1 of 1

Voice for Domoticz using ESP8266

Posted: Tuesday 03 January 2017 18:05
by ricorico94
Hi,

I was looking for an easy and cheap way to make Domoticz "speak" in various rooms to deliver messages to family members, wake up kids, etc. : I already use the famous S.A.R.A.H solution which provides voice control and good Text-To-Speech, but since it requires one windows tablet (or PC) for each room, it would be quickly expensive and it's not very small. I had in mind a tiny device which I could duplicate in any room.

I think I found on instructables a very interesting project which could answer several of my expectations : someone named Karawin built a web radio based on a NodeMCU/ESP8266 and a VS1053 audio board. What is interesting is that this developer accepted to modify his code so that the device can be remotely controlled to accept URLs pointing to Text-To-Speech online sites.

For instance, using any laptop, I could type from a laptop an url like :http://192.168.XX.YY/?instant="http://a ... -se-lever"and the device played back a few seconds later the sentence (in French) "Bonjour il faut se lever".
So Far, I've only tried from a laptop, but I think Domoticz will be able to do it easily through its UI (in buttons' controls) or through scripts.

Image

There are still some issues:
- there's some delay (approx 10s) between the remote URL order and the playback due to some internal buffer, but maybe the developper will be able to tweak such mecanism
- the TTS engine I found is not wonderful. It's the only one I found proposing "free service" and its quality is not the best. But maybe we can find others, or maybe we'll find some cheap subscriptions once the solution proves it is useful.
- the solution is designed to use headsets, whereas I'd need speakers. I'm not good in electronics and the speakers I purchased (https://fr.aliexpress.com/item/2x-Small ... 97361.html ) do not match the VS1053 requirements. But with my little understanding, maybe I found an idea with an intermediate amplifier between the speaker and the VS1053: https://fr.aliexpress.com/item/5Pcs-3W- ... 84784.html. If any of you could confirm to me if it would work or any other better approach (changing speakers and/or amplifier), I'd appreciate
- the current software of the prototype doesn't accept spaces in the sentence to be played (must be replaced with "-" minus signs). It's a bit annoying as it would make scripts a bit more complex (you would need to remember this constraint.. lower "WAF" if anyone at home should be able to use such voice messages). But well, it's a a show stopper.
- the developer also proposes to extend the base prototype with LCD screen : I hadn't time to test but that could be nice to display messages or at least the time (to use it as alarm clock as well). I purchased a LCD screen, but to be honest, when I received it, I realized I could never read time on it !! I'll need to find a bigger LCD screen or to find a way to "double" this small screen to display hours on one screen and minutes on a second screen (the advantage could be to keep the solution both very tiny and very cheap -larger screens seem significantly more expensive) (the screen I had found: https://fr.aliexpress.com/item/2016-New ... 11759.html If anyone can propose better screen approach, I'll welcome it: I want to be able to get a screen with very low light during night and bright during day: usual alarm clocks are too bright during night to my taste))

(note: I think the VS1053 also has an embedded microphone, so maybe we could even imagine using this project to record voice control for instance to "feed" a S.A.R.A.H device... but that's maybe difficult)

Here's the link to this great project :
http://www.instructables.com/id/Wifi-We ... nd-VS1053/
and https://hackaday.io/project/11570-wifi- ... and-vs1053

What do you think of this project ? Do you think it's a good solution to bring TTS to Domoticz in several rooms ?

Ricorico94

Re: Voice for Domoticz using ESP8266

Posted: Wednesday 04 January 2017 11:32
by pvm
What price do you expect for the total solution (hardware/ housing/powersupply)?
A 36 euro's tablet might be simpler / cheaper (price based on aliexpress)

Re: Voice for Domoticz using ESP8266

Posted: Monday 09 January 2017 11:02
by ricorico94
Hi,

Cost is about :
NodeMCU: 2,7€
VS1053: 6€
speaker 0,25W : 0,3€
amplifier: 0,5€
and one usb charger: 2-5€ depending on model you purchase
Oled screen: 2,5€
arduino nano : 2€ (to use the OLED screen)
a few wires..

So all in all with screen option, cost is about : 16-18€. Obviously cheaper than a tablet but of course more limited in screen size and no battery.

In my view, cost is not the most important thing here : maybe I couldn't find the best way, but I had understood that to have Domoticz making an android tablet to pronounce a sentence, you need to add applications on the tablet and I'm not sure I could do whatever I want with that application. Moreover the applications I was advised to use were not free and not opensource, so maybe less customizable as well.
If you wanted to use an android tablet, what would be the the SW setup ? (which applications and which mecanism used with Domoticz)

br,
ricorico94

Re: Voice for Domoticz using ESP8266

Posted: Monday 09 January 2017 11:15
by pvm
I'm not an android expert. Possibly Tasker can help triggering speech. I thought other users have this kind of setup running