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

0 Members and 2 Guests 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: 1999
  • 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: 7714
  • 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: 2320
  • 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: 7714
  • 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: 1999
  • 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: 1999
  • 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: 1999
  • 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: 1999
  • 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)