News:

If you have an Android device, check out VoxWav!

Main Menu

Hungarian recognition and TTS using Google

Started by krysn95, May 15, 2020, 05:40:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

krysn95

Oh I see:(
And would it be possible to solve, that the VC execute a command only once in a time period?

With a program what is as flexible as the VC, it must be a way...

jitterjames

If there are just a few particular commands where this happens then yes it's easy to do using variables and a logic block but you will have to edit each command individually.

But there is no way to automatically do it for all commands.

Kalle

#92
Mhh, ok - I have tried that - and maybe it can help you, but without guarantee.

let me check it first if it makes sense.

Is the recognized "double" Command exact the same twice?


***********  get excited and make things  **********

krysn95

Quote from: jitterjames on June 21, 2020, 01:50:46 PM
If there are just a few particular commands where this happens then yes it's easy to do using variables and a logic block but you will have to edit each command individually.

But there is no way to automatically do it for all commands.

Grat!
Exactly that is what am looking for. It is no problem if there is no automatically solution, the each command individuslly edit will be perfect:))

krysn95

Quote from: Kalle on June 21, 2020, 01:53:11 PM
Mhh, ok - I have tried that - and maybe it can help you, but without guarantee.

let me check it first if it makes sense.

Is the recognized "double" Command exact the same twice?

yes it is...

For example
Command-->-What is the time
VC--> The time is X o clock
VC--> The time is X o clock

Kalle

#95
Can you try this command and let me know if it work for you?


That's how my Command is supposed to work:
Google creates an event in VC (check.double) which contains the command to be executed as payload.
VC writes this command into a Maptable and checks with a LogicBlock if it has been already exist in the maptable.
If it already exist in the maptable, a OSD text "I am a  double..." is showing.
If it is not in the maptable, a OSD text with "I am the only one..." is showing and the new value will be stored in the maptable.

You have also create a RegEx pattern in the TCP plugin Google Speech settings first and don't forget to press "Save Settings" - see attached picture

here the command code (copy and paste it to your command tree in VC



<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.3.0.3-->
<commandGroup open="True" name="Krysn95test" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="805" name="double test" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Map.CreateTable</cmdType>
      <params>
        <param>TEST</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)==(B)</ifType>
      <ifParams>{M:TEST.check.double}&amp;&amp;{1}</ifParams>
      <then>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>I am a double and will be ignored</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>Map.Set</cmdType>
          <params>
            <param>TEST</param>
            <param>check.double</param>
            <param>{1}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>I am the only one and execute now</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <event>check.double</event>
  </command>
</commandGroup>


You have to say "Check command .........."
***********  get excited and make things  **********

jitterjames

The problem with this is.

1) you need to say "check command" before any command in order for this to work.

2) by using the regex pattern you are disabling the method that VC uses to look at all the possible strings of recognized text that Google has detected.  Google may send only one or up to 8 variations and VC will (normally) automatically check each one in order to see if it matches a valid voice command.  If you want to use a RegEx pattern with (.*?) it will use only the first string and throw all the rest away.  Maybe this will seem like it is working for some tests but in general it is going to greatly increase the chance that VC will not find a valid command to match the first string that Google detects.

krysn95

#97
Thanks guys for your Support!
Than how do you see, James, what could be the solution?

Kalle

#98
Yes, this is only for testing and I thought it was obvious to deactivate everything else.
Say "check command..." was in the description at the end of the post  ;)
I think James know a even better way by storing the recognized text as variable and then VC can use it within a logic.
***********  get excited and make things  **********

krysn95

#99
Anyway, both of you genius and Im apprechiate for your work.

Without you I do not have the chance to solve this..

Hopefully James will also have idea...:)

krysn95

Any idea guys?
I cant wait to try tó solve this..:)

jitterjames

Please try replacing the TCP plugin dll with the attached file.

After receiving a message from Google speech it will ignore all other incoming messages from Google speech for 1.5 seconds.

It's just a test for now.  Later I will probably make it optional and allow you to set the timeout to any value.

If you have never replaced a plugin DLL for VoxCommando before, then please read this first for important information: https://voxcommando.com/mediawiki/index.php?title=Unblock_DLL

krysn95

Perfect!!!! ;D

Only one thing:
When the tcp Google creates an event in VC is still duplicate the command..
Is it possible to solve this part also?

jitterjames

Do you mean with regex pattern?

For example, with your Spotify command?