Author Topic: OSD Display Time  (Read 7635 times)

0 Members and 1 Guest are viewing this topic.

SteveB69

  • Contributor
  • ***
  • Posts: 72
  • Karma: -1
    • View Profile
OSD Display Time
« on: January 01, 2016, 11:09:40 PM »
I was wondering if there is a way to reduce the amount of time the OSD stays on screen for, looked al over the options but can't find anything.
Chances are I've searched the forum, searched the wiki & scoured You Tube but I'm just to thick to work it out without help!

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: OSD Display Time
« Reply #1 on: January 02, 2016, 02:19:40 AM »
In this command I have it show an OSD for 5000 milliseconds (5 seconds)

in the action the second parameter is used for duration and the third parameter is used for position

if you hover your mouse over each of the parameters (empty boxes next to the command) for an action it will give you a description what they can be used for, also if you open the action selection tree (the magic wand Icon next to the action) it will give you a description of what each action and parameter can do or you can look here: http://voxcommando.com/mediawiki/index.php?title=Actions

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<command id="361" name="show OSD for X time" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>Hello SteveB69</param>
      <param>5000</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

I know this can seem over whelming, but I'm self taught with this very program, it takes a little while to get a hold of things but the nice part about this program is that jitterjames and nimester do a GREAT job with the documentation and videos you just have to read through it and watch a lot of videos and experiment and you will get there

SteveB69

  • Contributor
  • ***
  • Posts: 72
  • Karma: -1
    • View Profile
Re: OSD Display Time
« Reply #2 on: January 02, 2016, 02:26:22 AM »
Thanks for the reply PegLegTV.

I've dropped the code you posted in, changed the milliseconds to 1000, what now? Restarted VC & the OCD when confirming commands is still on screen for around 10 secs.

Maybe you mis understood, I'm talking about the overall OSD that confirms every command, I know it can be turned off but I'd like it on, just not for 10 seconds??
Chances are I've searched the forum, searched the wiki & scoured You Tube but I'm just to thick to work it out without help!

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: OSD Display Time
« Reply #3 on: January 02, 2016, 02:38:25 AM »
sorry about that, I didn't realize you where talking about the OSD used for confirming commands. are you talking about the option in the options menu "Show OSD on Command" or are you talking about when you select "Must Confirm" inside a command?
« Last Edit: January 02, 2016, 03:00:16 AM by PegLegTV »

SteveB69

  • Contributor
  • ***
  • Posts: 72
  • Karma: -1
    • View Profile
Re: OSD Display Time
« Reply #4 on: January 03, 2016, 07:42:14 PM »
I have show OSD on command & only show OSD display if command is executed checked.
I don't use the Must Confirm command at the moment.

I'd like a 1 second or so showing of the OSD??
Chances are I've searched the forum, searched the wiki & scoured You Tube but I'm just to thick to work it out without help!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: OSD Display Time
« Reply #5 on: January 03, 2016, 10:17:52 PM »
When a command is recognized the osd that is shown will be there for a brief period which is fixed and cannot be changed by the user.

SteveB69

  • Contributor
  • ***
  • Posts: 72
  • Karma: -1
    • View Profile
Re: OSD Display Time
« Reply #6 on: January 03, 2016, 10:21:33 PM »
Ahh ok, my OSD is about 10 seconds...
Chances are I've searched the forum, searched the wiki & scoured You Tube but I'm just to thick to work it out without help!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: OSD Display Time
« Reply #7 on: January 04, 2016, 01:18:37 PM »
The OSD normally shows for 6 seconds (not 10), and then fades out quickly.  If it takes longer than that, it is because VC is frozen or busy for some reason.  That may depend on what your macro is doing.  If you use TTS.SpeakSync for example, and the speech takes more than 6 seconds to complete that may prevent the OSD from disappearing after 6 seconds.  In that case it should disappear when the speaking is finished.
« Last Edit: January 04, 2016, 03:50:53 PM by nime5ter »

Voxy

  • Jr. Member
  • **
  • Posts: 13
  • Karma: 1
    • View Profile
Re: OSD Display Time
« Reply #8 on: October 20, 2016, 01:57:32 PM »
I find the OSD very useful to get information about pronunciation, similar/conflicts between commands and so on but with the current implementation I can't use it because it's often in the way staying on for to long (6 seconds plus fade out time).
To make the OSD option usable for me I think it would need a setting for time out.

Is there any chance getting this needed and useful setting in Options or at least have OSD disappear after 2 seconds plus a quicker fade out?

Please, please,  please!
« Last Edit: October 21, 2016, 10:15:24 AM by Voxy »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: OSD Display Time
« Reply #9 on: October 20, 2016, 03:21:49 PM »
I assume you are talking about the automatic OSD for recognized commands confidence and alternates, and not the OSD actions for custom messages?

I find the timing a perfect balance to allow time for unhurried reading, but without staying onscreen for too long.  That said, an option to adjust the timeout is something I will consider adding.  I just prefer not to clutter the options form with too much stuff.  It is already very full.
« Last Edit: October 21, 2016, 11:39:58 AM by jitterjames »

Voxy

  • Jr. Member
  • **
  • Posts: 13
  • Karma: 1
    • View Profile
Re: OSD Display Time
« Reply #10 on: October 22, 2016, 11:21:17 AM »
Sorry for my harsh and rude phrasing in my previous post (now edited).

Yes, my OSD time out setting feature request is regarding the automatic OSD for recognized commands confidence and alternates.

Since my post I've been working on finding a way to use actions to achieve what I want.
Perhaps that possibility is already there although I don't quite manage to achieve what I want, an automatic OSD with customizable timeout setting.

Firstly I can't get the command to get triggered by every voice command.
I tried dragging the megaphone icon from the history but it doesn't get accepted as an event.
Activating VC.Alternates in Options - OSD I can use these events but they only occur for voice commands when there are Alternates  but I also would like to get voice commands without alternates in an OSD to verify it was interpreted as intended.

Secondly I can't find a variable-parameter for Alternates to be put as/in the text message.


To display the OSD message I've tried three different actions:

* The Growl plugin doesn´t have any timeout setting as an Action Parameter in VC but in the Growl Application settings for Application - Voxcommando you have quite a few settings including Sticky which means stay visible until clicked and even without Sticky set to on you can keep the balloon window visible by putting the mouse pointer over it.
Unfortunately the shortest TimeOut in Growl is setting is 3 seconds which is ok and less than half of the timeout length for VC Automatic OSD but I would prefer 1-2 seconds.

* OSD.ShowText worked ok but I miss settings to control or turn off fade out.

* VcAdvanced.Notify work well but it's timeout setting didn't have any effect on my Windows 7 computer, it was 4 seconds no matter what number for milliseconds I set.
For me, I prefer the VC Growl plugin over VcAdvanced.Notify.

(On a side note/a tip: the Growl application has it's own Windows plugin that shows all Windows balloon notifications through Growl giving you a lot of settings like layou, position, timeout, for balloon notifications from any application, even from those without any built-in Growl plugin/feature.)


The basic and important parts that I can´t get to work is how to get the command to get triggered by every voice command and
how to get Alternates to be put as/in the text message.

Does anyone have any ideas or suggestions for how to fix/where to find the missing parts to make automatic OSD work by using actions and events?

@jitterjames regarding having to many settings in options;
Perhaps a Basic + Advanced layout could solve this problems, only the basic more fundamental settings in Basic View and the more optional, advanced fine tuning settings in an Advanced View?
« Last Edit: October 22, 2016, 12:11:28 PM by Voxy »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: OSD Display Time
« Reply #11 on: October 22, 2016, 01:48:39 PM »
You can use the OSD events Python script already posted on the forum.

If you're not already using the Python plugin you'll need to activate it. The script should be saved locally and then loaded once when VC first launches. We usually do that using a command something like this. In this case, I saved the script as "osdEvents.py" and placed it in a PY subfolder that I created, directly within my main VC folder (this is not the PY plugin folder within \plugins):

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.3.0-->
<command id="55" name="load OSD events python file" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>PY.ExecFile</cmdType>
    <params>
      <param>PY\osdEvents.py</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>VC.Loaded</event>
</command>

Once the script is loaded, a VC.Reco event will be generated each time a command is recognized.

The VC.Reco event includes 6 payloads, if you use the script as it is currently written:

1. The phrase you said that was recognized (equivalent to the variable {LastSpoken})
2. The command name (as listed in your command tree)
3. The command group name
4. The confidence value
5. Whether the speech understood passed the confidence value (true or false)
6. Whether the command was executed (true or false)
« Last Edit: October 22, 2016, 04:25:25 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)

Voxy

  • Jr. Member
  • **
  • Posts: 13
  • Karma: 1
    • View Profile
Re: OSD Display Time
« Reply #12 on: October 22, 2016, 04:41:27 PM »
Thank you very much nime5ter. This solution fills almost all my OSD needs, the only thing missing is the Alternates.
Thanks to your tip I also learned and understood much more about Events and them saving information to variables.

Both the event VC.Reco and the event VC.Alternates save data to variables. When I then recall variable {1} I get the variable data {1} from both events.
Do you know any way to distinguish  between them. Is it perhaps possible by recalling the variables in a more precise way like {(VC.Reco)1} and {(VC.Alternates.6)1} ?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: OSD Display Time
« Reply #13 on: October 22, 2016, 04:45:02 PM »
I think you are talking about payloads.  It's good to call them by their proper name in order to avoid confusion, because variable means something specific in VoxCommando, or is just kind of vague when used as a general term.

In VoxCommando payloads can only be accessed by number {1}, {2} etc.

I believe alternates are also accessible from python, but if you're happy with the look of the OSD display in VoxCommando you may just want to wait for the next release.  I will add an option to change the display time.

Voxy

  • Jr. Member
  • **
  • Posts: 13
  • Karma: 1
    • View Profile
Re: OSD Display Time
« Reply #14 on: October 22, 2016, 06:19:31 PM »
I'm talking about the data 1-6 in nime5ters image attached to this post.
Which is the correct term for them?

I have also attached a Group with the Command I am experimenting with. Perhaps my questions gets clearer when you look at it.
While experimenting and trying it out I have put all parts in separate messages but I plan to combine them in fewer or one message when/if I get everything to work with Alternates.

Now that I have found Growl and if there is a way to get hold of the Alternates and put them in messages I think that alternative would be more interesting for me then to start to use the built-in automatic OSD with timeout setting.
Even though Growl's minimum 3 seconds timeout is a little bit long for me it has got many nice features that make me tolerate this and I can close Messageboxes before the timeout just by clicking on them. I can also keep them open by holding the mouse pointer over them.
Also, with the Growl solution users can choose which information they want in the popup message boxes.

If, however, there isn't any way to get hold of the Alternates and put them in Growl messages the automatic OSD with timeout setting  would be very useful for me for showing the Alternates, and perhaps also even though there would be be a solution for showing the Alternates in Growl messages.