Author Topic: Hungarian recognition and TTS using Google  (Read 11559 times)

0 Members and 1 Guest are viewing this topic.

krysn95

  • Contributor
  • ***
  • Posts: 81
  • Karma: 1
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #90 on: June 21, 2020, 12:45:56 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Hungarian recognition and TTS using Google
« Reply #91 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.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #92 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?


« Last Edit: June 21, 2020, 02:11:55 PM by Kalle »
***********  get excited and make things  **********

krysn95

  • Contributor
  • ***
  • Posts: 81
  • Karma: 1
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #93 on: June 21, 2020, 02:29:45 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

  • Contributor
  • ***
  • Posts: 81
  • Karma: 1
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #94 on: June 21, 2020, 02:31:30 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

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #95 on: June 21, 2020, 03:13:02 PM »
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

Code: [Select]

<?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 .........."
« Last Edit: June 21, 2020, 03:18:33 PM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Hungarian recognition and TTS using Google
« Reply #96 on: June 21, 2020, 03:29:13 PM »
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

  • Contributor
  • ***
  • Posts: 81
  • Karma: 1
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #97 on: June 21, 2020, 04:06:27 PM »
Thanks guys for your Support!
Than how do you see, James, what could be the solution?
« Last Edit: June 21, 2020, 04:21:43 PM by krysn95 »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #98 on: June 21, 2020, 04:29:13 PM »
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.
« Last Edit: June 21, 2020, 04:31:32 PM by Kalle »
***********  get excited and make things  **********

krysn95

  • Contributor
  • ***
  • Posts: 81
  • Karma: 1
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #99 on: June 21, 2020, 04:37:58 PM »
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...:)
« Last Edit: June 21, 2020, 05:48:08 PM by krysn95 »

krysn95

  • Contributor
  • ***
  • Posts: 81
  • Karma: 1
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #100 on: June 22, 2020, 10:30:02 AM »
Any idea guys?
I cant wait to try tó solve this..:)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Hungarian recognition and TTS using Google
« Reply #101 on: June 23, 2020, 10:18:10 AM »
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

  • Contributor
  • ***
  • Posts: 81
  • Karma: 1
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #102 on: June 23, 2020, 06:03:43 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Hungarian recognition and TTS using Google
« Reply #103 on: June 23, 2020, 06:55:44 PM »
Do you mean with regex pattern?

For example, with your Spotify command?

krysn95

  • Contributor
  • ***
  • Posts: 81
  • Karma: 1
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #104 on: June 24, 2020, 02:03:05 AM »
Yes, exactly