Author Topic: How can I use voice attack to retrieve data like weather?  (Read 2835 times)

jpjazzy

  • Guest
How can I use voice attack to retrieve data like weather?
« on: May 07, 2018, 12:01:24 PM »
Hello,

I am new to VoiceAttack (VA) since last night and I like the speech integration with macros. I have used AutoHotkey before which is very similar, with a big more programming power and no voice attachment piece. I suppose I could write scripts and just have VA launch them, but I was hoping to do it all in one program. I am trying to learn more on how to make VA more dynamic though so I was going to start with a few simple commands. I tried searching for them on the forums, but didn't really see anyone who had done something similar.

Long story short, I want to do the following commands and was wondering if anyone had ideas or insights on how I can achieve them.

voice attack weather - retrieve the weather and use speech to say it.
voice attack time - retrieve the current local time and use speech to say it.
voice attack date - retrieve the current local date (including day) and say it.
voice attack cpu temps - retrieves current cpu temp(s) from a program called core temp.
voice attack RAM usage - retrieves current RAM usage from core temp.

The list goes on with what I would like to do, but this is a good start. Does anyone have any ideas on how I could achieve each of these commands?

Also if anyone has general tips on making dynamic commands (variables etc.) I would love to see them.
« Last Edit: May 07, 2018, 12:06:13 PM by jpjazzy »

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: How can I use voice attack to retrieve data like weather?
« Reply #1 on: May 07, 2018, 12:23:36 PM »
Let's get you started:

Quote
voice attack time - retrieve the current local time and use speech to say it.
Code: [Select]
Say, 'The current time is {time}'
Check out page 122 of the VA user manual.

Quote
voice attack date - retrieve the current local date (including day) and say it.
Code: [Select]
Say, 'The current date is {DATE}'
Check out page 123 of the VA user manual.

More advanced:
Quote
voice attack weather - retrieve the weather and use speech to say it.
You can use an inline function to access weather data available through various APIs. Here and here are starting points.

Quote
voice attack cpu temps - retrieves current cpu temp(s) from a program called core temp.
voice attack RAM usage - retrieves current RAM usage from core temp.
Again, this will likely come down to using an inline function to obtain this information. I'm not sure if core temp provides an API to access this, but you can search Google for things like "C# get core temps."

jpjazzy

  • Guest
Re: How can I use voice attack to retrieve data like weather?
« Reply #2 on: May 07, 2018, 12:34:55 PM »
Perfect. I use javascript a lot messing with APIs so that should be fairly easy. Thanks for your help. :)