Author Topic: Hungarian recognition and TTS using Google  (Read 21098 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 #60 on: June 01, 2020, 05:29:09 PM »
You already asked this one too.  As I said before, there is currently no way to know which PC sent recognized speech from the Google Web page to VC.

Yes, if you run a complete installation of VoxCommando on another machine then it's possible to relay the commands to another PC running VC along with information about which PC is sending the command.  Then you have to figure out how to use that information.

In case of this (complete installation of VoxCommando on another machine) how Can I indetify the source pc of the command?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Hungarian recognition and TTS using Google
« Reply #61 on: June 01, 2020, 05:50:21 PM »
Can you please test a few times and tell me if it always happens after 20 commands?  Or is it more like after 20 minutes?

Also please send a log file.  You can send it by email if you prefer.

krysn95

  • Contributor
  • ***
  • Posts: 81
  • Karma: 1
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #62 on: June 02, 2020, 04:59:51 PM »
Can you please test a few times and tell me if it always happens after 20 commands?  Or is it more like after 20 minutes?

Also please send a log file.  You can send it by email if you prefer.

sure, thanks!
The time is no problem..so it is not after 20 minutes.
Usually after ~20 command...

Ho can I get the log file if the program is frozen?
(sorry..im still beginner)

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #63 on: June 03, 2020, 02:12:03 AM »
Go to the Options menue in VC and check mark the "enable Log" if it is not enabled.
If the Log was allready enabled, you will find the logfile (voxLog.txt) in your VC mainfolder.
***********  get excited and make things  **********

krysn95

  • Contributor
  • ***
  • Posts: 81
  • Karma: 1
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #64 on: June 03, 2020, 05:21:56 PM »
great, thanks, Im find the voxlog.txt.


Does anybody have experience with the Spotify windos app?
Is it possible to control throug VC? ^-^

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #65 on: June 03, 2020, 05:58:41 PM »
You can control the Spotify App with VC mouse and button commands
***********  get excited and make things  **********

krysn95

  • Contributor
  • ***
  • Posts: 81
  • Karma: 1
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #66 on: June 03, 2020, 06:51:07 PM »
You can control the Spotify App with VC mouse and button commands

as I thought, thanks:-)
Could you help me how can I send directly the serched music command (or the shortcuts) directly into theSpotify app?

Thanks a lot!

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #67 on: June 04, 2020, 03:52:21 AM »
To the desktop App or the Webplayer?


I have delete the code, because I had no time to correct the misstakes  :bonk


@James: XY coordinates work better than shortcuts, because they do not always work reliably.
« Last Edit: June 04, 2020, 12:01:42 PM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Hungarian recognition and TTS using Google
« Reply #68 on: June 04, 2020, 10:01:30 AM »
I think you need to explain how to set all the map table variables because krysn95 is a new user and even I was a bit confused about how this works at first.

Personally I would hard code the XY values into the commands instead of using a map table, unless you expect these values to be changing a lot.

I think that if the desktop app is being used then it makes a lot more sense to use Keyboard shortcuts, so krysn95 should let us know what they are using.

Finally the RegEx pattern Kalle shows in his example will "hijack" all voice commands coming from Google speech so none of your commands will work.  No matter what you say it will always execute the spotify search command.

Instead you should use a RegEx pattern like this:
Pattern:   Spotify.search (.*)   
Event Name: Spotify.Search

krysn95

  • Contributor
  • ***
  • Posts: 81
  • Karma: 1
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #69 on: June 04, 2020, 06:17:42 PM »
wow guys:)

Im using the Spotify dektop app but im affraid, i need a bit more detailed tutorial.

Im already checked the shortcuts in the Spotify desktop app:

Search: CTRL+L
Play / Pause: Space
Next song: CTRL + right arrow

thanks a lot for the help!

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #70 on: June 04, 2020, 06:34:58 PM »
Yes we know this, but it will take some time to write down a tutorial.
Please try the shortcuts in your Spotify Desktop App with your keyboard and check if they work as expected.

It is not a big thing to let VC later this do for you - only a bit hard to find all the needed steps. So after CTRL+L let you do a search, but then the spacebar is not enough to let spotify play the song - there are one or more "tab" or a mouse click required.
***********  get excited and make things  **********

krysn95

  • Contributor
  • ***
  • Posts: 81
  • Karma: 1
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #71 on: June 04, 2020, 08:41:41 PM »
Ok:)

Then just a short question:


How Can I putt the searched music title into the Spotify searc bar?
(how can I take out thsi part from the command)
« Last Edit: June 04, 2020, 08:45:14 PM by krysn95 »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Hungarian recognition and TTS using Google
« Reply #72 on: June 05, 2020, 10:07:59 AM »
use a RegEx pattern like this in the TCP Google Speech settings:

Pattern:   Spotify.search (.*)   
Event Name: Spotify.Search

then the event will have a payload with all the words that you said after "Spotify Search"

https://voxcommando.com/mediawiki/index.php?title=Events

https://voxcommando.com/mediawiki/index.php?title=Payloads

https://www.youtube.com/watch?v=zFwjHrueJXI&feature=youtu.be&t=754

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Hungarian recognition and TTS using Google
« Reply #73 on: June 05, 2020, 10:48:03 AM »
So if you are using the Spotify desktop app in Windows set the regex rule as above and then something like this might work for you.

note: it almost seems like Spotify has gone out of its way to make this difficult.  They don't even have a play, or pause, or stop command.  Just a toggle for play pause...  :bonk

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.3.0.5-->
<command id="785" name="+Spotify Search" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>TTS.Speak</cmdType>
    <params>
      <param>Searching for {1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>InputKeys.Send</cmdType>
    <params>
      <param>{CONTROL}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="True">
    <ifType>ProcessRunning</ifType>
    <ifParams>spotify&amp;&amp;</ifParams>
    <then>
      <action>
        <cmdType>Launch</cmdType>
        <params>
          <param>C:\Users\james\AppData\Roaming\Spotify\Spotify.exe</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.Pause</cmdType>
        <params>
          <param>2500</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <action>
    <cmdType>Window.Focus</cmdType>
    <params>
      <param>spotify</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Window.Maximize</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>500</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>InputKeys.Send</cmdType>
    <params>
      <param>{CONTROL}({L})</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>500</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>InputKeys.TextEntry</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>500</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Mouse.MoveAbsolute</cmdType>
    <params>
      <param>340,240</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Mouse.LeftClick</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>Spotify.Search</event>
</command>

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Hungarian recognition and TTS using Google
« Reply #74 on: June 05, 2020, 01:01:36 PM »
Good job James  ::bow

I think the absolute position 340,240 for the mouse click depends on the Monitor resulution - I have a 32" and use 680,240.
To bad that we can't use the RoboB to control the webplayer  :'(




@krysn95    You need to adjust the path to Spotify to your path in the command above
***********  get excited and make things  **********