Page 1 of 1

How do I speak a variable

PostPosted: Mon Jan 15, 2018 7:01 am
by MarcoGT
Hi all,

I am trying to let Indigo (v7) speak a variable.
I thought that using %%v:ID%% worked, but it doesn't. I am using the standard "speak" field in the Indigo GUI. I would like to avoid python because the action shall be maintainable by my father :D

Thanks

Re: How do I speak a variable

PostPosted: Mon Jan 15, 2018 7:46 am
by DaveL17
I don't believe that the Speak field in the Indigo UI supports substitutions.

Re: How do I speak a variable

PostPosted: Mon Jan 15, 2018 9:15 am
by Colorado4Wheeler
I've built a speak utility into one of my plugins, it is currently for Airfoil setups but could pretty easily be modified to give you flexibility like being able to use whatever the system output is and being able to use variables. Just let me know what you need out of it entirely and I'll see what I can do (if you want to go down that route).

Re: How do I speak a variable

PostPosted: Mon Jan 15, 2018 10:21 am
by MarcoGT
Ideally I would need a plugin where you can mix a combination of sentences + variables to be spoken, for example:

"The outside temperature is" + var_1 + "degrees with humidity of + "var_2" % + "Max temp will be " + var_3 + "and min temp will be" + var_4.

Something like this :)

Re: How do I speak a variable

PostPosted: Mon Jan 15, 2018 10:31 am
by DaveL17
My Announcements plugin does precisely this. It’s in the plugin store. It’s still in beta, but works well as it sits.


Sent from my iPhone using Tapatalk

Re: How do I speak a variable

PostPosted: Mon Jan 15, 2018 10:36 am
by Colorado4Wheeler
I would just go with Dave's plugin :wink:, it's already there and working.

Re: How do I speak a variable

PostPosted: Mon Jan 15, 2018 10:58 am
by MarcoGT
DaveL17 wrote:
My Announcements plugin does precisely this. It’s in the plugin store. It’s still in beta, but works well as it sits.


Sent from my iPhone using Tapatalk


I only find the Announcer plugin by nsheldon, but not your Announcement plugin

Re: How do I speak a variable

PostPosted: Mon Jan 15, 2018 11:28 am
by Colorado4Wheeler
MarcoGT wrote:
I only find the Announcer plugin by nsheldon, but not your Announcement plugin


Try the GIT link for it if you can't find it.

Re: How do I speak a variable

PostPosted: Mon Jan 15, 2018 11:31 am
by MarcoGT
Yes, I got it from Git.
I created a new announcement device, but then I can I create a schedule to speak that announcement?

Re: How do I speak a variable

PostPosted: Mon Jan 15, 2018 11:40 am
by Colorado4Wheeler
I'm not sure if his are callable or not, I know they are devices but the only action I know of is to refresh the announcements. If you want to try mine out you can get it from my Git repository and it's an action rather than a device so it can be called on the fly.

Re: How do I speak a variable

PostPosted: Mon Jan 15, 2018 12:57 pm
by MarcoGT
Your solution works fine, thanks a lot.
Thanks also to Dave for the support.

Re: How do I speak a variable

PostPosted: Mon Jan 15, 2018 2:28 pm
by DaveL17
Yes, my plugin is system output agnostic. It's just for constructing the announcements themselves.

I'll take care of getting it up on the store (thought I had done that).

Re: How do I speak a variable

PostPosted: Tue Jan 16, 2018 10:41 am
by ckeyes888
Speaking of speaking variables...can that be done with a Python script?

Thanks,

Carl

Re: How do I speak a variable

PostPosted: Tue Jan 16, 2018 11:09 am
by Colorado4Wheeler
Yes it can:

Code: Select all
indigo.server.speak("Hello world", waitUntilDone=True)