Author Topic: Help with my To Do list  (Read 4345 times)

0 Members and 1 Guest are viewing this topic.

Tom_G_2010

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 2
    • View Profile
Help with my To Do list
« on: January 02, 2021, 10:32:26 AM »
I've had great success so far with getting VC setup to handle my home automation.  I have all my Hubitat controlled
 lights switches and plugs working through VC.  I'm now adding the thermostats and entertainment center devices and I don't anticipate any issues there.

The goal in my case is to eliminate the need for the echo dots I have throughout the house. To get to that point I have a hardware challenge to overcome and a few functionality challenges. I'm hoping by listing them out here I can get some advice and pointers on resources to help get my over the goal line

Hardware Challenge
Multiple input devices.  I am testing a mic array from Seeed Studio https://www.seeedstudio.com/ReSpeaker-USB-Mic-Array-p-4247.html  that seems to be working well so far.  But, to cover my entire house I will need to place at least 4 mics.  I don't see anyway in Windows or VC to select multiple mics.  If it's there I looked right past it.  However, I am wondering if there might be a software based mixer that I could use to aggregate all the mic inputs and then make the mixers output the input source for VC.

Software Challenges
I have been asked by the family to make sure VC can handle all the common functions they presently use the echo dots for.  These include:

  • Asking for Weather information
  • Asking for Time
  • Managing a shopping list that can be accessed from their phones
  • Managing timers and alarms
  • Basic Math

I have the weather plugin loaded and running but I haven't figured out how to use the TTS plugin to speak the weather when VC is asked.  As for the rest of the list, I have not started on those items other than looking for resources to see if they are possible and if so, how.

Any advice or pointers would be greatly appreciated!!!
Happy New Year!!!
Tom G.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Help with my To Do list
« Reply #1 on: January 02, 2021, 04:13:39 PM »
I think you will be able to find most of this on the forum if you search.

I will try to help you with the Accuweather plugin.  I just took a look and I think they must have changed something in their API because the plugin seems to be broken.  I will release an update soon with a fix if I am able.  Then I can send you some sample commands.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Help with my To Do list
« Reply #2 on: January 04, 2021, 09:36:54 AM »
Multiple input devices.  I am testing a mic array from Seeed Studio https://www.seeedstudio.com/ReSpeaker-USB-Mic-Array-p-4247.html  that seems to be working well so far.  But, to cover my entire house I will need to place at least 4 mics.  I don't see anyway in Windows or VC to select multiple mics.  If it's there I looked right past it.  However, I am wondering if there might be a software based mixer that I could use to aggregate all the mic inputs and then make the mixers output the input source for VC.
For example, here is some discussion regarding multiple microphones: https://voxcommando.com/forum/index.php?topic=1839.msg15928#msg15928

Regarding your desire to eliminate Alexa from your home: Are you trying to get rid of Alexa completely for privacy or some other reasons, or do you just want to reduce your reliance on it because a local solution is faster and more reliable?

Although VC has a lot of advantages over a cloud based system like Alexa, there are certain things that Alexa will be able to do better than VoxCommando.  Especially open searches or being able to ask any math question will be difficult to achieve at the same level using VoxCommando.  Although VC can solve the math problems easily enough, creating the phrases and payloads for math is much more difficult, unless you only need to work with relatively small numbers.  If you just want to be able to add/subtract/multiply and divide numbers between 1 and 100 that's no problem, but if you want to say any number like 4 million 8 hundred and 37, that is a real challenge.  The only type of payload in VC that lets you say anything you want is the Dictation payload, and it tends to have a fairly poor accuracy in understanding.  All other payloads you need to define what can be said.  In the case of numbers you can degine a range of numbers, but each number in the range must be defined and stored in the grammar which is loaded in memory so using extremely large ranges is not a good idea.

Similarly, if you want to be able to ask trivia questions like "who stars in Avengers - End game", or "How old is the Queen", or "When is Father's day", you will find that the cloud assistants do a much better job.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Help with my To Do list
« Reply #3 on: January 04, 2021, 06:02:17 PM »
I believe I've corrected the issue with the Accuweather plugin.  At least for me there was an odd case where the moonrise or moonset was null (maybe because the mooncycle is more than 24 hours?) but it should be handled gracefully now.  You can download the new version here: https://voxcommando.com/home/downloads/

You should play around with the Accuweather plugin and TTS plugins.

Here is a sample command for the current weather using Accu and GTTS.  If you don't use GTTS you can just replace the actions with TTS.* instead GTTS.* actions.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.3.1.1-->
<command id="989" name="Todays Weather" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="" loopMax="" description="">
  <action>
    <cmdType>AccuW.GetCustom</cmdType>
    <params>
      <param>Current weather: [C.WeatherText], [C.Temp] degrees [U.Temp] ;
Tonight: [F0.Night.Text], low of [F0.MinTemp].
Sunset is at [F0.Sun.Set]</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{lastresult}</param>
      <param>10000</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>GTTS.SpeakSync</cmdType>
    <params>
      <param> {lastresult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>todays weather, local weather, what's it like out</phrase>
</command>

You can copy and paste the xml into a group in your command tree.
« Last Edit: January 04, 2021, 10:38:33 PM by jitterjames »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Help with my To Do list
« Reply #4 on: January 04, 2021, 07:06:37 PM »
Software Challenges
I have been asked by the family to make sure VC can handle all the common functions they presently use the echo dots for.  These include:

  • Asking for Time
  • Managing a shopping list that can be accessed from their phones
  • Managing timers and alarms
  • Basic Math

Happy 2021. As James mentions, for some things the Amazon speech recognition and response is going to be a more flexible/natural solution -- but Internet/cloud reliant, of course.

I'm responding to just a few things on your list. If you haven't yet done so, browsing through "Haddood's Gems" on the forum is a useful way to explore various creative projects that might help as well. He's basically done the heavy lifting of curating previous forum posts on common topics of interest such as setting timers and telling the time etc.

Time:  Creating a command to ask the time is pretty easy, but you may not yet have discovered all the built-in variables (including time variables):
https://voxcommando.com/mediawiki/index.php?title=Variables
So you ask the time, and then you can customize the time variable in your command's TTS action (and/or OSD action) so that it provides the time in your preferred format.

Managing timers and alarms: Once again, the reason this is typically easier with a cloud-based system is because human beings have many ways of expressing time and it can be hard to account for that when constructing a voice command. Also, your family probably wants to be able to set reminders using any phrase that comes to mind, which once again leaves you with only the dictation payload option that James already discussed.

However, it's not a problem to set timers or alarms for a specific list of common tasks, for example, using VC's VC.SetEventTimer action and have this trigger a command with a TTS announcement.  If you can solve the command phrasing problem in this way, you'll be able to do this. For alarms set for the future-future, VC's Google Calendar plugin might be a better approach, if you don't mind using Google Calendar.

There are many examples of such commands on the forum. Here's one thread that's relevant to both 1 and 3: https://voxcommando.com/forum/index.php?topic=1370.0

Grocery lists. There are other options, but typically Our Groceries is used (free version). There are mobile app versions for Apple and Android.


In terms of math, this is probably not what you're looking for, but you might find it a helpful example nonetheless:
https://voxcommando.com/forum/index.php?topic=2165.0
« Last Edit: January 04, 2021, 10:57:56 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Tom_G_2010

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 2
    • View Profile
Re: Help with my To Do list
« Reply #5 on: January 04, 2021, 07:57:10 PM »
Regarding your desire to eliminate Alexa from your home: Are you trying to get rid of Alexa completely for privacy or some other reasons, or do you just want to reduce your reliance on it because a local solution is faster and more reliable?

There are a several reasons I'm looking to eliminate Alexa and you've hit the top ones: 1.Reduced Cloud Dependance; 2.Privacy; 3.Speed.

Of the strengths you noted Alexa has over VC (open searches, math question, trivia questions, etc) the only one I hear my wife or kids use regularly is math, but we can live without that.  Your overall point though about Alexa's strengths has me pondering isolating an echo in a soundproof box with a mic and speaker inside that can be momentarily enabled by a VC command...   ???  "VC ask Alexa When is Father's day"  :o

I see you also replied about the weather and there are other replies as well.  THANKS! Off to do some reading.

Tom_G_2010

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 2
    • View Profile
Re: Help with my To Do list
« Reply #6 on: January 05, 2021, 09:40:00 AM »
I believe I've corrected the issue with the Accuweather plugin.  At least for me there was an odd case where the moonrise or moonset was null (maybe because the mooncycle is more than 24 hours?) but it should be handled gracefully now.  You can download the new version here: https://voxcommando.com/home/downloads/

It appears to be working now.  Prior to the fix I was getting multiple nulls.  Now everything I've tested so far return correct values.  All I have left to do on this punch list item is season to taste.

THANKS!
Tom G.

PS: On one of the other items I'm getting an interesting behavior that leads to another question: Do voice files carry hard coded regional settings?  I have all my pc regional settings set for US with the correct time zone, in my case East Coast. I have everything regarding language on the pc and in VC set to US English with only one exception.  I prefer the spoken voice to be a British female voice so I used Microsoft Hazel.

The date on my pc shows as Tuesday 5 January 2021 or 1/5/2021 but when VC speaks the date via TTS it says May 1st 2021.  Is this a result of my using the English UK voice file or am maybe missing a setting someplace.  I hope I can correct this or do something custom to get the correct date spoken without having to give up on that voice file.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Help with my To Do list
« Reply #7 on: January 05, 2021, 10:44:38 AM »
I'm not sure what you mean by "voice files" but if you use a British TTS voice it will probably assume whatever text you feed into it is in a British format.  Since the UK uses Day/Month/Year and the Date you are feeding it is Month/Day/Year the TTS voice is getting the day and the month reversed.

The simplest solution is probably just to use the {LongDate} variable, since it writes out the full date as: "January 5, 2021" instead of "01-05-2021"

If you need even more control you can use the {DtCustom.*} variable.  Documentation can be found here: https://voxcommando.com/mediawiki/index.php?title=Variables#Date.2FTime

For the record, the only short date format that makes sense in my opinion is YYYY/MM/DD.  I wish the planet would adopt this format.  There is never any ambiguity about it and it has the bonus of being sorted correctly.  :bignod

Tom_G_2010

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 2
    • View Profile
Re: Help with my To Do list
« Reply #8 on: January 05, 2021, 11:10:34 AM »
I'm not sure what you mean by "voice files"

By that I meant I downloaded additional voices from Microsoft. Among them the English UK voice called Microsoft Hazel.  If that is the cause of the reversed month and day then I'll go with the longer date format as you suggest since no one at home likes the English US voices.

For the record, the only short date format that makes sense in my opinion is YYYY/MM/DD.  I wish the planet would adopt this format.  There is never any ambiguity about it and it has the bonus of being sorted correctly.  :bignod

I'm completely with you on a global standard for date formats.  In the military units I was in the solution was to use 2 digit numeric date, spelled out or abbreviated month, and a 4 digit numeric year: 05 January 2021.  With the month in alpha and the two numeric segments different lengths even when the order was changed it was still perfectly clear what the date was.

Tom_G_2010

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 2
    • View Profile
Re: Help with my To Do list
« Reply #9 on: January 05, 2021, 02:17:14 PM »
The simplest solution is probably just to use the {LongDate} variable, since it writes out the full date as: "January 5, 2021" instead of "01-05-2021"

If you need even more control you can use the {DtCustom.*} variable.  Documentation can be found here: https://voxcommando.com/mediawiki/index.php?title=Variables#Date.2FTime

I logged in on my lunch break and did some testing. {LongDate} didn't work, it resulted in reading out May 1st in long form as today's date.  With the time I had available for lunch I couldn't figure out a way to leverage {DTCustom.___} to invert the two values without a lot of logic to deal with day and month value ranges. So, I ran a few tests using US and UK voices that confirmed the voice files do have regional settings baked in that override the related regional pc config settings.

To make it work I added a SetVoiceName command before and after they Speak {LongDate} command.  The first switches the voice to a US voice so the date gets spoken correctly.  Then after the date is spoken the second switches the voice back to the preferred UK voice.  It's not ideal in that everyone here dislikes the US voices, but at least they only have to put up with it for Date requests.

THANKS! For all the help!
Tom G.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Help with my To Do list
« Reply #10 on: January 05, 2021, 06:39:12 PM »
When you have more time you can figure out the custom datetime formats and get what you want.   You will not need to use any logic, just a single variable with the correct formatting.

But if {LongDate} is not working then it is giving you the wrong date which is odd.  It's not a question of the TTS mixing things up.  It's hard to know exactly what is going on without being able to work directly with your system, but you may be able to fix things using the action VC.SetCulture
See https://voxcommando.com/mediawiki/index.php?title=Actions#SetCulture

Tom_G_2010

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 2
    • View Profile
Re: Help with my To Do list
« Reply #11 on: January 09, 2021, 12:41:32 PM »
...you may be able to fix things using the action VC.SetCulture
See https://voxcommando.com/mediawiki/index.php?title=Actions#SetCulture

VC.SetCulture en-US for the Win!

I now have a British voice speaking dates in a US format.  Thanks!!!
« Last Edit: January 09, 2021, 12:46:48 PM by Tom_G_2010 »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Help with my To Do list
« Reply #12 on: January 09, 2021, 04:53:03 PM »
 8)