Author Topic: Learning Arabic with Voxcommando  (Read 16453 times)

0 Members and 1 Guest are viewing this topic.

xtermin8r

  • $upporter
  • Sr. Member
  • *****
  • Posts: 366
  • Karma: 9
  • Crunchie
    • View Profile
Learning Arabic with Voxcommando
« on: March 20, 2013, 02:16:00 PM »
السلام عليكم

Learning a new language.

A demo of Voxcommando and the Robobrowser plugin in action.

Software Used:
Voxcommando and the Robobrowser plugin
Frameless 1.0.1.1 Frameless is a borderless, captionless image viewer with commandline options for display placement. http://skwire.dcmembers.com/fp/?page=frameless






[attachment=2]
« Last Edit: March 21, 2013, 04:27:35 PM by xtermin8r »
Neural Net Based Artificial Intelligence.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #1 on: March 20, 2013, 03:08:27 PM »
Wow. Is she pronouncing the Arabic words correctly?
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)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #2 on: March 20, 2013, 03:19:18 PM »
Excellent.  Would love to see the xml some time ;)

xtermin8r

  • $upporter
  • Sr. Member
  • *****
  • Posts: 366
  • Karma: 9
  • Crunchie
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #3 on: March 20, 2013, 04:04:14 PM »
Wow. Is she pronouncing the Arabic words correctly?

yes she is
Neural Net Based Artificial Intelligence.

xtermin8r

  • $upporter
  • Sr. Member
  • *****
  • Posts: 366
  • Karma: 9
  • Crunchie
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #4 on: March 20, 2013, 04:11:26 PM »
Excellent.  Would love to see the xml some time ;)

i'll upload it soon as i have made a few changes.
Neural Net Based Artificial Intelligence.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #5 on: March 20, 2013, 05:06:11 PM »
Wow nice work!
***********  get excited and make things  **********

xtermin8r

  • $upporter
  • Sr. Member
  • *****
  • Posts: 366
  • Karma: 9
  • Crunchie
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #6 on: March 21, 2013, 02:41:54 PM »
hi

below is the xml file for the Arabic Lesson 01 Demo.

webpage that robobrowser uses to collect the data  http://www.madinaharabic.com/Arabic_Language_Course/Lessons/L001_001.html

[attachment=1]
Neural Net Based Artificial Intelligence.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #7 on: March 22, 2013, 09:16:35 AM »
Wow.  Thanks for all the info.  Very cool that you can do all that with just two commands, and one extra command line utility.

I have actually been meaning to create an action which displays an image like that, but in the past I just used eventGhost for that.

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #8 on: February 07, 2016, 02:30:18 AM »
السلام عليكم هل هناك شيء عن  اوقات الصلاة يشتغل مع فوكس كماندو شكرا

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #9 on: February 07, 2016, 11:57:00 AM »
@rio14 . Unfortunately, I don't think xtermin8r checks this forum much.

Yes, there are probably a variety of ways to get VC to announce prayer times.

The website http://praytimes.org/ provides code in various programming languages to calculate prayer times depending on your location, including in Python. I was able to use their code without any problems using VC's Python plugin.

The only thing I added to their script is an extra function that generates scheduled events in VoxCommando, and also displays an OSD with all the prayer times for that day.

The scheduled events occur at the start of each of the following prayer times: 'Fajr', 'Sunrise', 'Dhuhr', 'Asr', 'Maghrib', and 'Isha'.

To use my example, the PY plugin must be enabled in VoxCommando. The python script, called prayerTimes.py, is attached. It should be placed in the PY subfolder of your VoxCommando folder.

I have made the following example of how you could use the Python script with VoxCommando.
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.5-->
<commandGroup open="True" name="Call to prayer" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="315" name="load Python script" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecFile</cmdType>
      <params>
        <param>PY\prayerTimes.py</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>today</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>vc.loaded</event>
  </command>
  <command id="316" name="What are today's prayer times (edit the first action with your location info)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="myPrayTimes(lat,long,utc) --&gt; replace lat, long, utc with your location information. lat=your latittude, long = your longitude, utc = your time zone's offset from GMT. (e.g., in winter, Montreal, NYC, &amp; Washington, D.C. are -5 from GMT, so UTC will be -5)">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>myPrayTimes(45,-75,-5)</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.StopEventTimer</cmdType>
      <params>
        <param>today</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.SetEventTimer</cmdType>
      <params>
        <param>12:30 AM</param>
        <param>today</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>What are today's prayer times</phrase>
    <event>today</event>
  </command>
  <command id="317" name="Announce time for prayers" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>It's time for prayer: {1} begins at {2}.</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>It's time for prayer: {1} begins at {2}.</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Sound.PlayWav</cmdType>
      <params>
        <param>If appropriate, you could add an audio file such as a call to prayer wav.</param>
      </params>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>SMTP.Send</cmdType>
      <params>
        <param>youremail@yourmail.com</param>
        <param>Time for prayer: {1} at {2}</param>
        <param>Time for prayer: {1} at {2}</param>
      </params>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <event>praytime.*</event>
  </command>
</commandGroup>

Note: In the command, "What are today's prayer times," you will need to replace the location information with your own. As an example, I have shown my Canadian information (roughly).

Code: [Select]
myPrayTimes(45,-75,-5)
That is my information for myPrayTimes(lat,long,utc)

It will need to be replaced with your latitude, longitude, and time zone offset from GMT. (That will need to be manually edited when there are bi-annual timeshifts, in my case, from -5 to -4 during Daylight Saving Time).

So someone in Miami, FL, for example, would need to change that to something like:
Code: [Select]
myPrayTimes(26,-80,-5)
... That's a lot of information, sorry. :) I hope it makes sense and is of use to you. I'm happy to answer any questions or try to help resolve any problems with my example.
« Last Edit: February 08, 2016, 08:21:01 AM 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)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #10 on: February 08, 2016, 05:04:59 PM »
Another option would be to use the REST-based API posted at http://xhanch.com/xhanch-api-islamic-get-prayer-time/

That requires Internet access, of course, but for some users may be a simpler option.

As an example, the following URL will retrieve daily prayer times for all of February 2016 for Washington, D.C., in xml format.

http://api.xhanch.com/islamic-get-prayer-time.php?lng=-77&lat=39&yy=2016&mm=2&gmt=-5&m=xml
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)

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #11 on: February 14, 2016, 11:58:05 PM »
hi
please according to prayer times there is some thing to fix, when i start vc the first time and i excute the commande, time does not work and i see error in plugin py prayer times.py the error is
Line: 1 >> myPrayTimes(45,-73,-5)
NameError: name 'myPrayTimes' is not defined

the commande to work good i must go to plugin and file prayer times.py and i do  excute, so now commande can work fine, if i do full restart and execute commande, does not works,  i have to execute the prayer times to get it working is it narmal!! thank you 

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #12 on: February 15, 2016, 08:14:11 AM »
Hi,

I have just tested what I posted above, and the script is loading correctly for me.

I would need to see a VoxCommando log to know what is not working. Is it possible the python file is not located in VoxCommando's PY folder?

The command that first loads the script expects the file to be in the PY subfolder, within your main VoxCommando folder.

Code: [Select]
PY\prayerTimes.py
« Last Edit: February 15, 2016, 08:18:00 AM 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)

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #13 on: February 16, 2016, 02:00:30 AM »
hi
the file is in the right place.thank you

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #14 on: February 16, 2016, 08:01:02 AM »
The log doesn't show me what I need to see, unfortunately. I need to see what happens when VC first starts up and all the commands are loaded.

It looks like maybe you enabled logging after VC was already running. (Unless the log file I am looking at was edited?)

It is the 'VC.Loaded' event that should trigger the command "load Python script," which executes the Python script. That occurs when VC first launches and finishes loading command groups.

Can you please enable logging, then re-start VC, let it run for a few minutes, and then post that log file?  Thanks.



« Last Edit: February 16, 2016, 10:02:59 AM 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)

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #15 on: February 17, 2016, 02:39:14 AM »
hi
i did as you said look at 771 in the midle, thank you and sorry for didturbing.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #16 on: February 17, 2016, 08:56:46 AM »
I see that none of your Python scripts are loading as they are supposed to (the same problem occurs with gmailnotifier.py).

The error message is:
Code: [Select]
ERROR: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\voxcommando-EN\PY\prayerTimes.py
and

Code: [Select]
ERROR: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\voxcommando-EN\PY\gmail_notifier.py'
This suggests to me that:
1. Either the python files were placed in a different PY folder, rather than the folder C:\voxcommando-EN\PY, or
2. There's something wrong with that folder that is preventing VC from accessing it (or it doesn't exist?)

Your options are:

1. Verify that you are placing your Python files in the folder C:\voxcommando-EN\PY\  (NOT: C:\voxcommando-EN\plugins\PY).
2. Try moving the python file directly into the main VoxCommando folder, and then just change the file path in the command that loads the script:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.5-->
<command id="315" name="load Python script (changed file path)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>PY.ExecFile</cmdType>
    <params>
      <param>prayerTimes.py</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.TriggerEvent</cmdType>
    <params>
      <param>today</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>VC.Loaded</event>
</command>
« Last Edit: February 17, 2016, 09:02:16 AM 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)

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #17 on: February 17, 2016, 12:44:25 PM »
hi
yes the  py folder is in the plugin folder, for that it does not working,now i created py folder in vc folder it works but at vc start up the window of prayer time appear, or do i need to move the py folder from plugin to vc.
thank you

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #18 on: February 17, 2016, 01:24:55 PM »
You should edit the command, ""What are today's prayer times (edit the first action with your location info)".

I provided an example of how you can use the Python script. The commands that I posted do several different things, to provide examples.

You should look at each of the commands that I created, try to understand exactly what is occurring in each of them, and then customize the commands to do what you want.

If you don't want an OSD message when VoxCommando starts, just disable or delete the OSD actions in that command.

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)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #19 on: February 17, 2016, 01:45:13 PM »
Sorry, my mistake. I just checked my example.

The OSD message that appears is part of the Python script.

You can edit the Python script to delete the  2 OSD lines at the bottom.

 Or, if you like, I have commented them out in the attached. You can replace the file entirely with this one.
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)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #20 on: February 17, 2016, 04:01:41 PM »
or do i need to move the py folder from plugin to vc.

What you did was correct. No, you should not move the PY plugin folder. That is a separate, distinct folder that is necessary for the plugin's functionality.

In my installation, I have an extra PY folder already directly in the main VC folder that I use for storing python scripts. I thought that by default everyone had this, but apparently not.
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)

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #21 on: February 18, 2016, 02:19:44 AM »
thank you very very much

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #22 on: March 13, 2016, 01:07:19 PM »
I was asked how to add a prayer time event for the "last third of the night".

I have attached a revised python script with a new variable added, "LastThird". It will generate an event named "PrayTime.Last Third", with 2 payloads:

{1} "Last third of the night"
{2} the prayer time (e.g., 02:37)

« Last Edit: March 13, 2016, 01:51:17 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)

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #23 on: March 14, 2016, 05:47:22 AM »
Many thanks to Nim5ter, :clap  Good job praying times is now complete and works,
 just i added to be displayed: IMsak (time of fast) Midnight (last time to pray Isha) and time of begining of last third of the night best time to pray tahajjud your doaa.
Download prayertimes.py below
create PY folder and place your Python files in the PY folder C:\voxcommando\PY
You can add a adhan file(call for prayer file)
download the adhan file http://www.al-mostafa.info/main/athan/gan.php?file=mecca-mulla_www.al-mostafa.us.wav

don't forget to set your latitude, longitude, and time zone (montreal for example myPrayTimes(45,-73,-4)

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<commandGroup open="True" name="Call to prayer" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="315" name="load Python script" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecFile</cmdType>
      <params>
        <param>PY\prayerTimes.py</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>today</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>vc.loaded</event>
  </command>
  <command id="316" name="What are today's prayer times" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="50" loop="False" loopDelay="0" loopMax="0" description="myPrayTimes(lat,long,utc) --&gt; replace lat, long, utc with your location information. lat=your latittude, long = your longitude, utc = your time zone's offset from GMT. (e.g., in winter, Montreal, NYC, &amp; Washington, D.C. are -5 from GMT, so UTC will be -5)">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>myPrayTimes(45,-73,-4)</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.StopEventTimer</cmdType>
      <params>
        <param>today</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.SetEventTimer</cmdType>
      <params>
        <param>12:30 AM</param>
        <param>today</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>show me prayer time</phrase>
    <event>today</event>
  </command>
  <command id="394" name="Announce time for prayers" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>It's time for prayer: {1} begins at {2}.</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>It's time for prayer: {1} begins at {2}.</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Sound.PlayWav</cmdType>
      <params>
        <param>C:\voxcommando-EN\mecca-mulla_www.al-mostafa.us.wav.</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Sound.SetVol</cmdType>
      <params>
        <param>1</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>SMTP.Send</cmdType>
      <params>
        <param>email here</param>
        <param>Time for prayer: {1} at {2}</param>
        <param>Time for prayer: {1} at {2}</param>
      </params>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <event>praytime.*</event>
  </command>
</commandGroup>
« Last Edit: March 14, 2016, 01:03:01 PM by rio14 »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #24 on: March 14, 2016, 07:57:19 AM »
Thanks rio14. I see you also added a wav file, "mecca-mulla_www.al-mostafa.us.wav".

Is that a file you can share, or can you recommend a website where these can be found?

Also, to clarify for other users: In the most recent version that rio14 posted, the payloads for the LastThird event will be slightly different than what I said above. They will instead be :

{1} LastThird
{2} [the time]
« Last Edit: March 14, 2016, 08:08:19 AM 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)

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #25 on: April 16, 2016, 08:03:39 PM »
hi
this is time and wheather in arabic language using google tts after modification. pronociation not excellent and not bad.
if someone has an improovement i apreciate that.
you need WUnder plungin

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<commandGroup open="False" name="Google TTS Streaming" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="428" name="++ Speak to me google" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>google.tts</param>
        <param>.و عليكم السلام و رحمة الله, و بركاته</param>
        <param>ar</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>3500</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>assalaamoo alaikom</phrase>
  </command>
  <command id="452" name="arabic time google" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="25" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>google.tts</param>
        <param>السلام عليكم, الساعة الان, {DtCustom.h:mm}.</param>
        <param>ar</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>السلام عليكم, الساعة الان, {DtCustom.h:mm}.</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>3500</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>google what time is it</phrase>
  </command>
  <command id="490" name="arabic wheather google" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="25" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>WUnder.GetCustom</cmdType>
      <params>
        <param>السلام عليكم, درجة الحرارة الان. {C.temp_c}. اما درجة الحرارة القصوى اليوم فهي. {D0.high}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetLastResult</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>google.tts</param>
        <param>{LastResult}</param>
        <param>ar</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>3500</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType />
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>google what's the wheather like</phrase>
  </command>
  <command id="405" name="Call Google.TTS" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="triggered by an event expecting 2 payloads&#xD;&#xA;{1} text to speech&#xD;&#xA;{2} language code">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>GoogleTranslate</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Navigate</cmdType>
      <params>
        <param>https://translate.google.com/#en/{2}/{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Google.TTS</event>
  </command>
  <command id="407" name="Google.TTS ready" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="triggered by an event expecting 2 payloads&#xD;&#xA;{1} text to speech&#xD;&#xA;{2} language code">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>GoogleTranslate</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>gt-res-listen</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>RoboB.Click</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.Hide</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>RoboB.Show</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <event>RoboB.DocComplete.GoogleTranslate</event>
  </command>
</commandGroup>
« Last Edit: April 16, 2016, 08:57:52 PM by rio14 »

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #26 on: April 16, 2016, 08:38:03 PM »
this is other arabic time and wheather with bot face animation
if some one has an improovement i apreciate that.
humantouch2 in  payload folder
voicecommands in vc folder
need of flashplayer installed.
Robob plugin
WUnder plugin

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<commandGroup open="True" name="arabic BOT" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1461" name="bot answer" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>VC ani</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Show</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>textToSay</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.SetText</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Wait</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByTag</cmdType>
      <params>
        <param>INPUT</param>
        <param>2</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.SetEventTimer</cmdType>
      <params>
        <param>13</param>
        <param>bot test part 2</param>
      </params>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.SetEventTimer</cmdType>
      <params>
        <param>5</param>
        <param>xbmc unmute</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>bot speak</event>
  </command>
  <command id="1467" name="start bot" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>VC ani</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.SetWinSize</cmdType>
      <params>
        <param>450</param>
        <param>400</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Navigate</cmdType>
      <params>
        <param>http://www.oddcast.com/home/demos/tts/tts_example.php</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Wait</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>File.Write</cmdType>
      <params>
        <param>{Path.VC}\botstate.txt</param>
        <param>enabled</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>VC.loaded</event>
  </command>
  <command id="1450" name="bot goodbye" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>RoboB.Hide</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>bot goodbye</event>
  </command>
  <command id="1486" name="hide bot" enabled="true" alwaysOn="True" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.Standby</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>textToSay</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.SetText</cmdType>
      <params>
        <param>مع السلامة.</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Wait</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByTag</cmdType>
      <params>
        <param>INPUT</param>
        <param>2</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Wait</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.SetEventTimer</cmdType>
      <params>
        <param>3</param>
        <param>bot goodbye</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>hide bot</phrase>
  </command>
  <command id="1465" name="bot time arabic" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="25" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>RoboB.ElementByTag</cmdType>
      <params>
        <param>LABEL</param>
        <param>1</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <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>ar</param>
        <param>specify here the language (e.g. eng for English or ger for German</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>200</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>{TAB}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.TextEntry</cmdType>
      <params>
        <param>Magged</param>
        <param>write here the name of the TTS voice</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Show</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetLastResult</cmdType>
      <params>
        <param>السلام عليكم, الساعة الان, {DtCustom.HH:mm}  </param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>السلام عليكم, الساعة الان, {DtCustom.HH:mm}  </param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>bot speak</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType />
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>time in arabic</phrase>
  </command>
  <command id="1470" name="bot wheather arabic" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="25" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>RoboB.ElementByTag</cmdType>
      <params>
        <param>LABEL</param>
        <param>1</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <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>ar</param>
        <param>specify here the language (e.g. eng for English or ger for German</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>200</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>{TAB}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.TextEntry</cmdType>
      <params>
        <param>Maged</param>
        <param>write here the name of the TTS voice</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Show</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>WUnder.GetCustom</cmdType>
      <params>
        <param>السلام عليكم, درجة الحرارة الان. {C.temp_c}. اما درجة الحرارة القصوى اليوم فهي. {D0.high}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetLastResult</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>bot speak</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>wheather  in arabic</phrase>
  </command>
</commandGroup>
« Last Edit: April 25, 2016, 11:31:32 AM by rio14 »

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #27 on: April 24, 2016, 09:13:51 PM »
Hi
this is translation by dictation English to Arabic, ofcourse you can change the language code to translate to any language
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<commandGroup open="False" name="translation en to ar" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="430" name="Call Google.TTS" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="triggered by an event expecting 2 payloads&#xD;&#xA;{1} text to speech&#xD;&#xA;{2} language code">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>GoogleTranslate</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Navigate</cmdType>
      <params>
        <param>https://translate.google.com/#en/{2}/{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Google.TTS</event>
  </command>
  <command id="409" name="Google.TTS ready" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="triggered by an event expecting 2 payloads&#xD;&#xA;{1} text to speech&#xD;&#xA;{2} language code">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>GoogleTranslate</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>gt-res-listen</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>RoboB.Click</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.Hide</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>RoboB.Show</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <event>RoboB.DocComplete.GoogleTranslate</event>
  </command>
  <command id="510" name="translate" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="40" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>google.tts</param>
        <param>{1}</param>
        <param>ar</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>2000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{1}</param>
        <param>10000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>say</phrase>
    <payloadDictation>payloadDictation: Regular</payloadDictation>
  </command>
</commandGroup>

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #28 on: April 26, 2016, 11:52:54 AM »
hi NIM
i don't see your code (aljazeera news) here..any how to be a complete code is it possible to add (say next news) to display the next 5 headlines and read it?

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<commandGroup open="False" name="Aljazeera news" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1251" name="Aljazeera" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="20" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>http://www.aljazeera.net/aljazeerarss/9ff80bf7-97cf-47f2-8578-5a9df7842311/99e42274-a82e-4930-bbd5-ba2b24a88a22</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExSingle</cmdType>
      <params>
        <param>item.*?&lt;title&gt;&lt;.*?DATA.(.*?)\]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>****...أحدث الأخبار بموقع الجزيرة...****</param>
        <param>30000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.AddText</cmdType>
      <params>
        <param>{i}. {Match.{i}.1}</param>
      </params>
      <cmdRepeat>5</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.MatchConcat</cmdType>
      <params>
        <param>...</param>
        <param>5</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>Google.TTS</param>
        <param>...أحدث الأخبار بموقع الجزيرة...{LastResult}</param>
        <param>ar</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>News</event>
    <phrase>tell me the news</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\aljazeera.xml</payloadFromXML>
  </command>
  <command id="422" name="Call Google.TTS" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="triggered by an event expecting 2 payloads&#xD;&#xA;{1} text to speech&#xD;&#xA;{2} language code">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>GoogleTranslate</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Navigate</cmdType>
      <params>
        <param>https://translate.google.com/#en/{2}/{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Google.TTS</event>
  </command>
  <command id="417" name="Google.TTS ready" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="triggered by an event expecting 2 payloads&#xD;&#xA;{1} text to speech&#xD;&#xA;{2} language code">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>GoogleTranslate</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>gt-res-listen</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>RoboB.Click</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.Hide</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>RoboB.Show</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <event>RoboB.DocComplete.GoogleTranslate</event>
  </command>
</commandGroup>

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #29 on: April 26, 2016, 01:05:49 PM »
The Al Jazeera news reading part of the original thread has been moved to VoxCommando Basics and Core Features.

http://voxcommando.com/forum/index.php?topic=2571.0

I'm sorry, I forgot to create a link here to the new thread when I separated the different topics this morning.
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)

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #30 on: June 20, 2016, 03:01:55 PM »
hi nim
according to arabic translation  i wanted  display text like   english word=arabic translation   i used last result but does not working because it takes the result of the prevouise command how to fix it thank you

 
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.9-->
<commandGroup open="False" name="translation en to ar" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="430" name="Call Google.TTS" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="triggered by an event expecting 2 payloads&#xD;&#xA;{1} text to speech&#xD;&#xA;{2} language code">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>GoogleTranslate</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Navigate</cmdType>
      <params>
        <param>https://translate.google.com/#en/{2}/{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Google.TTS</event>
  </command>
  <command id="409" name="Google.TTS ready" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="triggered by an event expecting 2 payloads&#xD;&#xA;{1} text to speech&#xD;&#xA;{2} language code">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>GoogleTranslate</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>gt-res-listen</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>RoboB.Click</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.Hide</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>RoboB.Show</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <event>RoboB.DocComplete.GoogleTranslate</event>
  </command>
  <command id="510" name="translate" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="40" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>google.tts</param>
        <param>{1}</param>
        <param>ar</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>2000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{1} = {lastresult}</param>
        <param>10000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>say</phrase>
    <payloadDictation>payloadDictation: Regular</payloadDictation>
  </command>
</commandGroup>

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #31 on: June 20, 2016, 04:01:12 PM »
Hi Rio,

1. Remember to be careful with your 2 Google.TTS commands. If you try to create new commands that are triggered with the same events and command names that you already use for your text-to-speech, you will have many problems.

2. Your {LastResult} did not work because your Google.TTS command was not originally designed to capture and store the Arabic text in VoxCommando.

The original Google.TTS RoboBrowser command works by literally typing the text that you want spoken aloud on the Google Translate webpage, and then automatically clicking on the "Listen" button that appears on that page. The RoboBrowser window is hidden, so we don't see it. The audio is coming from the hidden RoboBrowser window.

3. In this case, you want to display the English text and its Arabic translation. That requires that we actually capture the Arabic text from the hidden RoboBrowser window, so that we can use it in VoxCommando.

i. First we need to select the correct field ("Element") on the Google Translate page. To find the correct element, we need to "show" the RoboBrowser window temporarily so that we can see what is happening.

Now we can use our RoboBrowser "Investigator" Tool to find the ID for that text field. We discover that the ID is called "result_box".

[See attached image]

ii. Once we've selected that element in our command, we can capture the text in "result_box", using the action RoboB.GetText.

iii. That text will now be stored in {LastResult}.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.9-->
<commandGroup open="True" name="translation en to ar" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="430" name="Translate English to Arabic" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="triggered by an event expecting 2 payloads&#xD;&#xA;{1} text to speech&#xD;&#xA;{2} language code">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>GoogleTranslateEn2Ar</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Navigate</cmdType>
      <params>
        <param>https://translate.google.com/#en/{2}/{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>GoogleTranslate</event>
  </command>
  <command id="409" name="GoogleTranslation page loaded" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="triggered by an event expecting 2 payloads&#xD;&#xA;{1} text to speech&#xD;&#xA;{2} language code">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>GoogleTranslateEn2Ar</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>result_box</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.GetText</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>{var.EnglishText} = {LastResult}</param>
            <param>10000</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>Translation unsuccessful.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <event>RoboB.DocComplete.GoogleTranslateEn2Ar</event>
  </command>
  <command id="542" name="translate" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="40" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>GoogleTranslate</param>
        <param>{1}</param>
        <param>ar</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>EnglishText</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>say</phrase>
    <payloadDictation>payloadDictation: Regular</payloadDictation>
  </command>
</commandGroup>

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)

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #32 on: June 21, 2016, 02:27:11 PM »
thank you nim
it's a little thing but needs a big job

Powers

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 3
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #33 on: December 13, 2020, 10:12:40 AM »
The website http://praytimes.org/ provides code in various programming languages to calculate prayer times depending on your location, including in Python. I was able to use their code without any problems using VC's Python plugin...

Hello all! I was interested in VC about a year ago this week, however, never dived in until now. Browsing thru the forums and found this to be pretty neat. I know its been years and both this forum thread and website haven't been updated in a while. I am not good with python and tried first myself and couldn't get the offset/adjust to work. The VC shows the time when it loads and my fajr and isha times are off. Fajr is early by 24 minutes and isha late by 15 minutes.

@nime5ter (or anyone else who is better at python then me, meaning everyone else!) I tried to place this in many different location but with no success. May I get assistance please?

prayTimes.adjust( {fajr: 24, isha: -15} );

Thank you an advance!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #34 on: December 13, 2020, 11:48:26 AM »
Greetings and welcome to the forum.

The calculations do seem to be off, thanks for pointing it out. I will take a look at the Python to try to figure out what's up. I'll try to post a response some time this week.
« Last Edit: December 14, 2020, 09:44:09 AM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #35 on: December 14, 2020, 10:56:24 AM »
The VC shows the time when it loads and my fajr and isha times are off. Fajr is early by 24 minutes and isha late by 15 minutes.

What calculation method are you using?  I think the code defaults to Egyptian and we may need to specify ISNA?

Powers

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 3
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #36 on: December 17, 2020, 10:52:40 AM »
Hi jitterjames

I set calcMethod = 'ISNA' and timeFormat = '12h'. I am in Washington DC. I set the coordinate as 38.89, -77.04, exact string is, "myPrayTimes(38.89, -77.04,-5)" for the action, "PY.ExecString". I have attached a photo of the executed times but Fajr should be around 6am and Isha around 6pm

Was there other argument/parameters I needed to set?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #37 on: December 18, 2020, 12:02:24 PM »
At this point I really don't know what code you are using, or how you determine if the times generated are correct, but the attached code seems to be correct (as far as I can tell) so you may want to give it a try.

Powers

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 3
    • View Profile
Re: Learning Arabic with Voxcommando
« Reply #38 on: December 19, 2020, 07:48:04 PM »
Yup, that was it, my file was messed up. But really it turns out the line you added at the bottom did the trick. Which is weird, means the python variable for "calcMethod" does not work for VC.

The line:
    prayTimes.setMethod('ISNA');

Thank you @jitterjames

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Learning Arabic with Voxcommando
« Reply #39 on: December 21, 2020, 05:01:19 PM »
Yup, that was it, my file was messed up. But really it turns out the line you added at the bottom did the trick. Which is weird, means the python variable for "calcMethod" does not work for VC.

The line:
    prayTimes.setMethod('ISNA');

Thank you @jitterjames

I think it's just a matter of how and when you set the variable and if that results in valid Python code.  I just followed some online guides and they suggested using that method so that's what I did.