Alexa TTS (Text-To-Speech) [and more] plug-in for Vera

Hotfix seems to be working. Thanks !

I have been following your development of this plug-in and am pretty excited about the applications for announcements.

Just one thing i use “word_word” some times to send via http get request, so i do not have to url encode. Your hot fix removes this capability. allow _, -, and space

In the past, the _ char was mandatory, but they changed. If you url encode it, we should be safe. I don’t add any char right now.

I did try url encoding but it seem to fail, thats why i used _.
I may switch to -
I hot fixed my node-red using .replace(/_+/g, " "). This works correctly, but thats for after request is received.

You are a gent!

Are the different voices only supported under OpenLuup as well?

C

yep, supported only with jq at the moment.

my pleasure!

that’s my favorite feature at the moment. I’ve been running announcement since almost two weeks, and sometimes they’re not perfectly sync’ed, but they’re always working good for me.

I have added a line to substitute hypen for spaces…

sNotify = string.gsub(sNotify, " ", “-”)

This fits into a simple function I use to wrap the announcements:

function AlexaSpeak(sNotify, Dot, Volume)
local volume = Volume or 50
sNotify = string.gsub(sNotify, " ", “-”) – get rid of any spaces and use - instead
luup.call_action(“urn:dlna-org:serviceId:DLNAMediaController1”, “Say”, {Text=sNotify, Volume=volume, GroupZones=Dot}, TRV2[“TTS”])
luup.log("Speak: " … sNotify)
end

Cheers
Octo

1 Like

Nice work Sir, I’m back to normal speech patterns! :sunglasses:

Btw, do speaker groups work on Vera yet?

1 Like

Any idea on how I could do this on my Mac with Automator?

I assume it would need some apple script as automator doesnt hook into Messages OTB.

to be honest, it’s a PITA. I’m publishing 2-3 release per week, and they’re approving release every monday. Plus, the system is slow, old and very weird. I’ll do when it’s sable enough to not be updated so often.

Have you looked at the Alt App Store plugin? The plugins can be published directly from GitHub.

Not sure of Automator’s functions, so can not help you there.How do you receive your OTP as all you need to do is capture the OPT then make a http request to vera updating the OneTimePassCode variable.
http://veraIP:3480/data_request?id=variableset&DeviceNum=666&serviceId=urn:bochicchio-com:serviceId:VeraAlexa1&Variable=OneTimePassCode&Value=OTPVALUE

I was hoping to run this on my Mac as Mac OS has the messages client and so gets all my SMS messages, Unfortunately Automator only integrates with email messaging and not SMS or I’d be able to make this automatic.

Never mind, it’s pretty easy to fix this manually now.

Yep, on my plan. With this COVID-19 thing, these days have been insane at work. (and home, since school are closed too). I hope to have some time next week to add my plugins to altappstore.

Unfortunately this requires announcements and jq.

Yep. I have a very similar one, because a couple of announcements are made in specific devices, instead of a group. Plus, I change volume based on the time of the day (and week) and status. ie: volume is set to 3 before 8 am on workdays (10 am on week-ends) and after 10 pm on workdays (11 pm on week-ends), or if people are detected in bed (I use roller shutter positions to determine that, plus a scene that my wife runs when she’s up - the kids are usually up right after me anyway).

I can tweak it very easily and change group in a central position, I suggest everyone here to think of a similar solution for maximum flexibility.

can you change how you receive your OTP from amazon, i think you can choose to recieve it via email

Yes I think so but SMS is fine. Updating the OTP code is not difficult.

Ok, i thought you wanted to automate it.