Author Topic: Arabic TTS and Al-Jazeera  (Read 9550 times)

0 Members and 1 Guest are viewing this topic.

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Arabic TTS and Al-Jazeera
« on: April 16, 2016, 08:50:45 PM »
hi
i need help how to read in arabic
1-
 headlines news from  http://www.aljazeera.net/portal or any arabic news site like Blaze headlines code. using google tts or any arabic tts.
2-
and how to read arabic from text file. thank you
« Last Edit: April 16, 2016, 10:10:27 PM by rio14 »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Arabic TTS and Al-Jazeera
« Reply #1 on: April 17, 2016, 08:46:31 AM »
Hi,

For #2, the following command works for me with the attached Arabic text file. In this example, I placed the file in my main VC folder.:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.7-->
<command id="151" name="read Arabic text file" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>File.Read</cmdType>
    <params>
      <param>Arabic-Lipsum.txt</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>read file</phrase>
</command>

If the standard File.Read action in VoxCommando has not been working for you, we would need to see an example of the file that is not working.

I used a random text generator to create the attached file. It is in Arabic, but it will not make sense. :)
http://generator.lorem-ipsum.info/_arabic
« Last Edit: April 26, 2016, 08:07: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: Arabic TTS and Al-Jazeera
« Reply #2 on: April 17, 2016, 07:29:31 PM »
OK mais comment introduire ou utiliser la commande (read file) avec google tts.
merci
« Last Edit: April 26, 2016, 08:07:21 AM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Arabic TTS and Al-Jazeera
« Reply #3 on: April 17, 2016, 09:31:47 PM »
On peut utiliser la solution que James ait déjà donné ici : http://voxcommando.com/forum/index.php?topic=2270.msg20477#msg20477

C'est toujours la même solution dans chaque instance.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.7-->
<groupCollection open="True" name="exemple en arabe">
  <commandGroup open="True" name="Google TTS Streaming" enabled="True" prefix="" priority="0" requiredProcess="" description="">
    <command id="316" 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="342" 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>
  <commandGroup open="True" name="Arabic tests" enabled="True" prefix="" priority="0" requiredProcess="" description="">
    <command id="220" name="read Arabic text file" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
      <action>
        <cmdType>File.Read</cmdType>
        <params>
          <param>Arabic-Lipsum.txt</param>
          <param>2</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <params>
          <param>{LastResult}</param>
        </params>
        <cmdRepeat>0</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.TriggerEvent</cmdType>
        <params>
          <param>Google.TTS</param>
          <param>{LastResult}</param>
          <param>ar</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <phrase>read file</phrase>
    </command>
  </commandGroup>
</groupCollection>
« Last Edit: April 26, 2016, 08:07:33 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: Arabic TTS and Al-Jazeera
« Reply #4 on: April 17, 2016, 09:37:05 PM »
Il faut toujours passer deux "payloads" dans l'événement "Google.TTS".

Le premier, c'est le texte (ou un variable qui represente le texte), et le deuxième, c'est le code pour la langue désirée.
« Last Edit: April 26, 2016, 08:07:53 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: Arabic TTS and Al-Jazeera
« Reply #5 on: April 18, 2016, 12:24:21 PM »
merci nime
pour la lecture des grands titres des nouvelles comment peut on transferer le texte d'une page web et l'ecrire dans une fichier texte.

google tts fait beacoup d'erreure au niveau de pronentiation, il ya un logiciel appelé Dragon NaturallySpeaking avez vous une idee s'il fonctionne avec VC (recognition et tts).
 encore merci
« Last Edit: April 26, 2016, 08:08:07 AM by nime5ter »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Arabic TTS and Al-Jazeera
« Reply #6 on: April 18, 2016, 01:28:11 PM »
comment peut on transferer le texte d'une page web et l'ecrire dans une fichier texte.

http://voxcommando.com/mediawiki/index.php?title=Actions#Write
« Last Edit: April 26, 2016, 08:08:18 AM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Arabic TTS and Al-Jazeera
« Reply #7 on: April 18, 2016, 01:36:15 PM »
google tts fait beacoup d'erreure au niveau de pronentiation, il ya un logiciel appelé Dragon NaturallySpeaking avez vous une idee s'il fonctionne avec VC (recognition et tts).
 encore merci

Vous devez trouver TTS  (la synthèse vocale) dans le format SAPI 5.

Le plugin TTS de VC a besoin de TTS SAPI 5.

Essayez http://www.acapela-group.com/. Mais demander à l'avance si leurs voix sont du format 32-bit SAPI-5, et si on peut les utiliser avec n'importe quel application dans Windows.

Non, ce n'est pas possible d'utiliser Dragon avec VC pour la reconnaissance vocale. (c-à-d, vous pouvez utiliser les deux programmes à part, mais la reconnaissance vocale de Dragon ne peut pas servir comme remplacement pour le "moteur" de Microsoft dans VC)

Quand même, Nuance Dragon Naturally Speaking n'a pas un version dans la langue arabe (sauf pour les entreprises -- c'est un produit distinct).

http://voxcommando.com/forum/index.php?topic=1449.0
« Last Edit: April 26, 2016, 08:08:38 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: Arabic TTS and Al-Jazeera
« Reply #8 on: April 23, 2016, 02:46:52 AM »
hi
acapela does not have tts for windows, have just for android. no problem.

About headlines news like the code of peglegTV  blaze news i put url of http://www.aljazeera.net/aljazeerarss/3c66e3fb-a5e0-4790-91be-ddb05ec17198/4e9f594a-03af-4696-ab98-880c58cd6718

instead of blaze .com but does not write in the payload file i desactivate tts
1-how to write from that url aljazeera headlines to payload file.
2-or is it possible to write the rss news in the red band on the top of the  site http://www.alarabiya.net/rss/rssLatestNews.xml to payload file. thank you help please
code
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<commandGroup open="True" name="The Blaze" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1082" name="the blaze" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <params>
        <param>one moment please as I check to see what is new at aljazeera dot net</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>http://www.aljazeera.net/aljazeerarss/3c66e3fb-a5e0-4790-91be-ddb05ec17198/4e9f594a-03af-4696-ab98-880c58cd6718</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>&amp;#\d+;</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>&lt;title&gt;(.*?)&lt;/title&gt;&lt;link&gt;(.*?)&lt;/link&gt;</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <params>
        <param>payloads\TheBlaze.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.AddPair</cmdType>
      <params>
        <param>payloads\TheBlaze.xml</param>
        <param>{Match.{i}.2}</param>
        <param>{i}</param>
      </params>
      <cmdRepeat>{#M}</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>latest headlines from aljazeera.net</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.AddText</cmdType>
      <params>
        <param>{i}. {Match.{i}.1}.</param>
      </params>
      <cmdRepeat>3</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <params>
        <param>Latest headlines from aljazeera dot net</param>
      </params>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <params>
        <param>{i}. {Match.{i}.1}.</param>
      </params>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>headline {i}</param>
        <param>{Match.{i}.1}</param>
      </params>
      <cmdRepeat>3</cmdRepeat>
    </action>
    <action>
      <cmdType>Group.Rebuild</cmdType>
      <params>
        <param>aljazeera</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>tell me the news</phrase>
  </command>
  <command id="1255" name="More from The Blaze" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>src="https://www.youtube.com/embed/(.*?)"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>Loading You Tube video from the blaze, please wait</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>XJson.Raw</cmdType>
          <params>
            <param>player.open</param>
            <param>"item": {"file":"plugin://plugin.video.youtube/play/?video_id={Match.1.1}"}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>Results.RegExReplace</cmdType>
          <params>
            <param>&amp;.(\d+);</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.RegExReplace</cmdType>
          <params>
            <param>;..(\d+)</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.RegEx</cmdType>
          <params>
            <param>&lt;p&gt;(\w)(.*?)&lt;/</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.MatchConcat</cmdType>
          <params>
            <param><![CDATA[ ]]></param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.RegExReplace</cmdType>
          <params>
            <param>&lt;.*?&gt;</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.SpeakSync</cmdType>
          <params>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <action>
      <cmdType>SMTP.Send</cmdType>
      <params>
        <param>youremailhere</param>
        <param>The Blaze News Stories</param>
        <param>The Blaze.com - &lt;a href="{1}"&gt;{Var.headline {PF.1}}&lt;/a&gt; </param>
        <param />
        <param>True</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Tell me more about</phrase>
    <phrase>headline, article</phrase>
    <phrase>number</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\TheBlaze.xml</payloadFromXML>
  </command>
</commandGroup>


« Last Edit: April 26, 2016, 08:08:51 AM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Arabic TTS and Al-Jazeera
« Reply #9 on: April 23, 2016, 08:04:28 AM »
Hi,

That's right. You cannot just change the URL in PegLeg TV's post to al-jazeera. The Scrape action will store all of the html text on a web page, which can then be accessed as {LastResult}.

But then you need to use the correct regular expression (regex) for that particular website in order to capture the particular information you are looking for on that web page. This involves analysing tags and patterns on the page, to tell VC what text to capture.

If you'd like to learn how to use regular expressions, we have a few tutorial videos. And there are also many web sites and other videos on the Internet that teach how to use regular expressions.

http://voxcommando.com/mediawiki/index.php?title=Video_Tutorials#Core_Concepts

Yes, the best link for you to use to capture headlines and their associated links is the RSS page, which uses XML. That seems to be the page you're using, so that is good.

Then you can capture the item-level text that is between <link> </link> tags and also between <title> </title>.

You might want to start with a simpler problem, and then work your way up to your Al Jazeera goal.

P.S. That's too bad about acapella. They used to sell SAPI5 Windows voices. We had a user here who used their Arabic TTS, but that was 5 years ago.
« Last Edit: April 26, 2016, 08:09:09 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)

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: Re: Learning Arabic with Voxcommando
« Reply #10 on: April 23, 2016, 05:50:06 PM »
acapela does not have tts for windows, have just for android. no problem.

they do for developers not end users ... try to see if you can automate one of these 2 software, maybe you can make them speak what is in the clipboard, by simulating hotkeys or mouse clicks..
http://nextup.com/download.html
http://www.naturalreaders.com/priceorder.html

When Voice command gets tough, use hand gestures

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Re: Learning Arabic with Voxcommando
« Reply #11 on: April 23, 2016, 06:48:38 PM »
This site seems to sell Voxygen's SAPI5 for Windows voices.

https://best-of-vox.com/windows

They're a bit pricy, and I don't know if the Arabic synthesis is any good. You can test 'Adel' -- the Arabic TTS voice that they are selling here: https://www.voxygen.fr/

That said, all TTS voices have problems and mispronounce some words -- there is no perfect voice. Generally, I do not have my computer read long texts to me. It's usually not very easy to process what the computer is saying if it is reading a full paragraph or more.
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: Arabic TTS and Al-Jazeera
« Reply #12 on: April 24, 2016, 02:20:48 AM »
hi
i found this vocalizer voice arabic male maged but it's trial 30 days after installation it appears in option VC ftp://voicepacks:ReaditAir2015%23@ftp.visionaid.com/VisionAid%20Arabic%20Vocalizer%20Voice%20Pack%202.6.2.msi
and here there are many voices and languages http://visionaid.com/phpincludes/en/support/voices/voices.php

OK according arabic headlines news i did something from aljazeera site
 displaying the headlines is OK but google tts read just one line, if some one can fix the code to read all lines thank you
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="1240" name="Aljazeera" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" 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>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.AddText</cmdType>
      <params>
        <param>{i}. {Match.{i}.1}</param>
      </params>
      <cmdRepeat>5</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>2000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetLastResult</cmdType>
      <params>
        <param>{i}. {Match.{i}.1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>headline {i}</param>
        <param>{Match.{i}.1}</param>
      </params>
      <cmdRepeat>5</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>
  </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>

« Last Edit: April 26, 2016, 08:09:31 AM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Re: Learning Arabic with Voxcommando
« Reply #13 on: April 24, 2016, 07:47:33 AM »
If the trial version is working with VC, then it sounds like you could buy their software with the TTS included and the TTS will work also with VC.

I suggest that you analyse the original Reuters news command group and the Blaze command group so that you understand what we were doing for those commands.

The RSS feed provides you with a list of headlines to news stories, and the URLs where each of those articles is located on al-jazeera's site.

VC can read you a list of headlines, but then you need to tell VC which of those stories you want to see (or hear), using a separate voice command. In that separate voice command, you can scrape the page that contains the actual article.

So you should have one command that collects the titles and associated links, and stores them in a payload XML file. And a different command that navigates to the page with the news story and reads it. That second command will use the payload XML that you just created in order to know which URL to go to.
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: Arabic TTS and Al-Jazeera
« Reply #14 on: April 24, 2016, 09:27:35 PM »
hi
this code display 5 headlines latest news from aljazeera.net in arabic and store all headlines in file aljazeera.xml
but reading is just for the 1rst headline, and i want reading be for the 5 headlines i didnt find a solution  :(
if someone can help Thank you
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="1240" 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>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.AddText</cmdType>
      <params>
        <param>{i}. {Match.{i}.1}</param>
      </params>
      <cmdRepeat>5</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>2000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetLastResult</cmdType>
      <params>
        <param>{i}. {Match.{i}.1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.AddPair</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
        <param>{Match.{i}.2}</param>
        <param>{i}</param>
      </params>
      <cmdRepeat>{#M}</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>google.tts</param>
        <param>{i}. {Match.{i}.1}</param>
        <param>ar</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>headline {i}</param>
        <param>{Match.{i}.1}</param>
      </params>
      <cmdRepeat>5</cmdRepeat>
    </action>
    <action>
      <cmdType>Group.Rebuild</cmdType>
      <params>
        <param>Aljazeera</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>
« Last Edit: April 26, 2016, 08:09:47 AM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Arabic TTS and Al-Jazeera
« Reply #15 on: April 25, 2016, 08:18:12 AM »
Because you need to send the 5 headlines to a Google URL, rather than trying to trigger the Google.TTS event 5 times (which probably would not work), you can link together (concatenate) all of the 5 headlines into one string, and then use that long string as your URL.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.7-->
<command id="1242" 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>
    </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>

http://voxcommando.com/mediawiki/index.php?title=Actions#MatchConcat
« Last Edit: April 26, 2016, 08:10:02 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: Arabic TTS and Al-Jazeera
« Reply #16 on: April 25, 2016, 11:17:45 AM »
HI nim5ter
Good its fantastic
« Last Edit: April 26, 2016, 08:11:57 AM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Arabic TTS and Al-Jazeera
« Reply #17 on: April 26, 2016, 07:56:58 AM »
Good. I'm glad it meets your needs.

I am now going to separate some of the different question topics in this thread, and transfer them to the "support" section of the forum.

In general, it's better if we have new questions on the forum posted as new, distinct topics. Really long threads can make information difficult to find.
« Last Edit: April 26, 2016, 08:12:07 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)

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: Arabic TTS and Al-Jazeera
« Reply #18 on: April 27, 2016, 12:19:49 AM »
can someone post the final commands into the xml exchange ? then I will add it to the gems
When Voice command gets tough, use hand gestures

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Arabic TTS and Al-Jazeera
« Reply #19 on: April 27, 2016, 10:48:03 AM »
James and I are away at the moment. Perhaps someone else can help. The existing command already matches all the headlines. Right now it only reads 5 aloud, but does not store any of them.

rio14 would like to have the ability to ask for the next five, and so on.

That does not involve any more scraping or dealing with the Al-Jazeera site. The headlines should be stored somehow, then one needs to track that five have been read, and then deliver the next five upon request, etc.
« Last Edit: May 01, 2016, 12:47:32 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: Arabic TTS and Al-Jazeera
« Reply #20 on: April 30, 2016, 01:08:58 AM »
Looks like this would not be worth including in the gems anyhow.
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: Arabic TTS and Al-Jazeera
« Reply #21 on: May 01, 2016, 11:54:05 AM »
hi all
i have reinstalled windows, and i don't know why google tts does not work on VC.

this is a payloaded headlines from Aljazeera site nearly 45 headlines and i want
to add the option of (say next news) next five headlines. thank you

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.6-->
<commandGroup open="True" name="Aljazeera news" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1251" name="Aljazeera 1" 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>Scrape</cmdType>
      <params>
        <param>http://arabic.cnn.com/world/rss</param>
      </params>
      <cmdRepeat>0</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>29000</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>PayloadXML.Clear</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.AddPair</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
        <param>{Match.{i}.2}</param>
        <param>{i}</param>
      </params>
      <cmdRepeat>{#M}</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: Arabic TTS and Al-Jazeera
« Reply #22 on: May 04, 2016, 01:59:29 PM »
hi all
i have reinstalled windows, and i don't know why google tts does not work on VC.

If you are still having problems with this, we would need more information. For example, you can enable logging in VC, then use commands that use the Google TTS so that we can see if any error messages or other relevant information is logged.

this is a payloaded headlines from Aljazeera site nearly 45 headlines and i want
to add the option of (say next news) next five headlines. thank you

In the command posted above, the payload xml is not properly storing the headlines. I'm not sure if you ever looked at the payload xml that is generated? This is because the command is trying to store {Match.x.2} values, but the regular expression only captures one pattern in (brackets) therefore there is no {Match.x.2}.

If you only want to capture one regular expression pattern, you can access that pattern as {Match.x.1} -- (or {Match.x}, actually)
See: http://voxcommando.com/mediawiki/index.php?title=Variables#Matches

Below I have provided 2 very different solutions to your problem. The first solution does not involve any Python coding, so it is a solution that any VoxCommando user should be able to create even if not a programmer.

Instead of asking for the "next 5" headlines, and having to keep track of how many headlines have been read, we can instead ask for a specific range of headlines, or just a single headline. This might be nice if you want to hear one of the headlines again:

"Read Al Jazeera headline number x", or "Read Al Jazeera headlines x through y".

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.7-->
<commandGroup open="True" name="Aljazeera news fixed" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1289" name="Aljazeera fixed" 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>(Total: {#M} headlines){CR}****...أحدث الأخبار بموقع الجزيرة...****</param>
        <param>29000</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>PayloadXML.Clear</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.AddPair</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
        <param>{Match.{i}.1}</param>
        <param>{i}</param>
      </params>
      <cmdRepeat>{#M}</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="460" 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="455" 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="174" name="Read Al Jazeera headline number {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>headlines</param>
        <param>هنا هو الخبر تسأل عن</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.GetValue</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="True">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>There is no headline number {1}.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.TriggerEvent</cmdType>
          <params>
            <param>Google.TTS</param>
            <param>There is no headline number {1}</param>
            <param>ar</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>VC.TriggerEvent</cmdType>
          <params>
            <param>Google.TTS</param>
            <param>{var.headlines}...{LastResult}</param>
            <param>ar</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>هنا هو الخبر تسأل عن</param>
            <param>8000</param>
            <param>-5</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.AddText</cmdType>
          <params>
            <param>{1}. {LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>Read Al Jazeera</phrase>
    <phrase>headline number</phrase>
    <payloadRange>1,55</payloadRange>
    <phrase optional="true">again</phrase>
  </command>
  <command id="182" name="Read Al Jazeera headlines {1} through {2}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>headlines</param>
        <param>هنا هو الخبر تسأل عن</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.GetValue</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="True">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>VC.TriggerEvent</cmdType>
          <params>
            <param>Google.TTS</param>
            <param>There is no headline number {1}</param>
            <param>ar</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>There is no headline number {1}.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.StopMacro</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>...هنا هو الخبر تسأل عن...</param>
        <param>26000</param>
        <param>-5</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <loop>
      <loopParams>
        <from>{1}</from>
        <to>{2}</to>
      </loopParams>
      <loopActions>
        <action>
          <cmdType>PayloadXML.GetValue</cmdType>
          <params>
            <param>payloads\Aljazeera.xml</param>
            <param>{j}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.AddText</cmdType>
          <params>
            <param>{j}. {LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>headlines</param>
            <param>{var.headlines}...{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </loopActions>
    </loop>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>Google.TTS</param>
        <param>{var.headllines}</param>
        <param>ar</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Read Al Jazeera headlines</phrase>
    <payloadRange>1,55</payloadRange>
    <phrase>through</phrase>
    <payloadRange>1,55</payloadRange>
  </command>
</commandGroup>

Your original request was to add a command asking for the next 5 headlines. The easiest way to do that is to use a Python script that keeps track of how many headlines have been read aloud. Although it is a simple script, one does need to know how to code a bit.

Attached is the Python script. As always, it should be placed in the VC\PY folder.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.7-->
<commandGroup open="True" name="Aljazeera news w/ python" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1270" name="Aljazeera (payloads fixed)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="20" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <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>PayloadXML.AddPair</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
        <param>{Match.{i}}</param>
        <param>{i}</param>
      </params>
      <cmdRepeat>{#M}</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>max</param>
        <param>{#M}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecFile</cmdType>
      <params>
        <param>PY\alj-script.py</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>alj_next5</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>News</event>
    <phrase>tell me the news</phrase>
  </command>
  <command id="476" 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="440" 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="176" name="Next 5 al jazeera headlines" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>myHeadlines({var.max})</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Next 5 al jazeera headlines</phrase>
    <phrase optional="true">please</phrase>
    <event>alj_next5</event>
  </command>
</commandGroup>

Since we can't count on other people to write customized scripts for us all the time, it is good to know that there are alternative solutions. We may have to change our goals slightly, or think about the problem differently. But usually there is a solution.

[Edit to alj-script attachment. Last line triggering the Google.TTS should not have been commented out. New attachment is correct. 5-May-2016]
« Last Edit: May 05, 2016, 11:13:08 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: Arabic TTS and Al-Jazeera
« Reply #23 on: May 04, 2016, 10:46:18 PM »
hi
this is my log file, google tts does not work after installing windows.
and many thanks for aljazeera codes .

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Arabic TTS and Al-Jazeera
« Reply #24 on: May 05, 2016, 11:19:14 AM »
Maybe you need to update internet explorer to a more recent version.

Also make sure that you don't have multiple commands with the same phrases that could interfere with the command you are using.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Arabic TTS and Al-Jazeera
« Reply #25 on: May 05, 2016, 11:35:21 AM »
And you may need to check your audio output settings to test audio output with Internet Explorer. Whatever you would usually need to do to resolve audio problems on your PC.
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: Arabic TTS and Al-Jazeera
« Reply #26 on: May 05, 2016, 11:16:03 PM »
I just noticed that in the Python script that I uploaded above, the last line had been commented out.

You should remove the # symbol at the beginning of the line:
Code: [Select]
#vc.callAction('VC.TriggerEvent','Google.TTS&&%s'%tts,None)
Otherwise, the script will not trigger the TTS announcement. I had turned it off while testing for my own sanity, and forgot to delete the # symbol before posting.
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: Arabic TTS and Al-Jazeera
« Reply #27 on: May 09, 2016, 09:41:00 AM »
hi nim5ter
i updated my ie to ver11 and goggle tts works back, i tested the script of aljazeera and there are many voices of google tts speak at the same time, may be 5 times the number of headlines i said may be.
mais pratiquement le script d aljazeera est le meilleur. merci

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Arabic TTS and Al-Jazeera
« Reply #28 on: May 10, 2016, 08:50:38 AM »
Also make sure that you don't have multiple commands with the same phrases that could interfere with the command you are using.

La cause est probablement comme James a dit. Il faut assurer qu'il y a un seul ensemble de commandes pour Google.TTS dans votre arbre des commandes.

Dans chaque exemple, je vous ai donné un groupe avec les commandes Google.TTs inclus. C'était pour les autres, s'ils n'ont pas déjà les deux commandes pour le Google TTS.

C'est toujours important de vérifier que les evenements et phrases dans l'arbre sont uniques.
« Last Edit: May 10, 2016, 09:12:58 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: Arabic TTS and Al-Jazeera
« Reply #29 on: May 10, 2016, 10:33:29 AM »
oui t as raison c est regler merci beacoup

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Arabic TTS and Al-Jazeera
« Reply #30 on: May 16, 2016, 04:02:48 PM »
hi all
thanks to you james and nim5ter to arrive finally to acheve this arabic news i combined the option of the first and the second code with script posted by nim5ter, i fixed somes arabic words, the code is working 100%
all you need copy and paste the code
create py folder in VC folder and put alj-script.py in PY folder.
this is a link of arabic-tarik voice and other voices 30days trial versionhttp://www.kobaspeech.com/en/download-voices

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.7-->
<commandGroup open="False" name="Aljazeera news w/ python2" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1299" name="Aljazeera (payloads fixed)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <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>PayloadXML.AddPair</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
        <param>{Match.{i}}</param>
        <param>{i}</param>
      </params>
      <cmdRepeat>{#M}</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>max</param>
        <param>{#M}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecFile</cmdType>
      <params>
        <param>PY\alj-script.py</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>alj_next5</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>News</event>
    <phrase>tell me the news</phrase>
  </command>
  <command id="505" 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="469" 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="205" name="Next 5 al jazeera headlines" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>myHeadlines({var.max})</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Next news</phrase>
    <phrase optional="true">please</phrase>
    <event>alj_next5</event>
  </command>
  <command id="188" name="Read Al Jazeera headline number {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>headlines</param>
        <param>..........هَذَه  الاخبَارُ  اللَتي  تَبْحَثُ  عَنْها..........</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.GetValue</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="True">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>{1} لا يُوجَدُ عُنْوَانٌ بِهَذَا الَّرقْمْ</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.TriggerEvent</cmdType>
          <params>
            <param>Google.TTS</param>
            <param>{1} لا يُوجَدُ عُنْوَانٌ بِهَذَا الَّرقْمْ</param>
            <param>ar</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>VC.TriggerEvent</cmdType>
          <params>
            <param>Google.TTS</param>
            <param>{var.headlines}...{LastResult}</param>
            <param>ar</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>..........هَذَه  الاخبَارُ  اللَتي  تَبْحَثُ  عَنْها..........</param>
            <param>8000</param>
            <param>-5</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.AddText</cmdType>
          <params>
            <param>{1}. {LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType />
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>tell me the news</phrase>
    <phrase>number</phrase>
    <payloadRange>1,55</payloadRange>
  </command>
  <command id="204" name="Read Al Jazeera headlines {1} through {2}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>headlines</param>
        <param>..........هَذَه  الاخبَارُ  اللتي  تَبْحَثُ  عَنْها..........</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.GetValue</cmdType>
      <params>
        <param>payloads\Aljazeera.xml</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="True">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>VC.TriggerEvent</cmdType>
          <params>
            <param>Google.TTS</param>
            <param>{1} لا يُوجَدُ عُنْوَانٌ بِهَذَا الَّرقْمْ</param>
            <param>ar</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>{1} لا يُوجَدُ عُنْوَانٌ بِهَذَا الَّرقْمْ</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.StopMacro</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>..........هَذَه  الاخبَارُ  اللتي  تَبْحَثُ  عَنْها..........</param>
        <param>26000</param>
        <param>-5</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <loop>
      <loopParams>
        <from>{1}</from>
        <to>{2}</to>
      </loopParams>
      <loopActions>
        <action>
          <cmdType>PayloadXML.GetValue</cmdType>
          <params>
            <param>payloads\Aljazeera.xml</param>
            <param>{j}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.AddText</cmdType>
          <params>
            <param>{j}. {LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>headlines</param>
            <param>{var.headlines}...{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </loopActions>
    </loop>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>Google.TTS</param>
        <param>{var.headllines}</param>
        <param>ar</param>
      </params>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>Google.TTS</param>
        <param>{var.headlines}</param>
        <param>ar</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>read headlines</phrase>
    <payloadRange>1,55</payloadRange>
    <phrase>to</phrase>
    <payloadRange>1,55</payloadRange>
  </command>
</commandGroup>

thanks a lot

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Arabic TTS and Al-Jazeera
« Reply #31 on: June 05, 2016, 10:54:43 PM »
Hi
this is pandora bot speak Arabic, and any language you want just change language code
and upgrade internet explorer to 11
 
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.6-->
<commandGroup open="True" name="pandora w/translation" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="776" name="pandora W/translation" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="10" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PandoraBot.866638556e37479a</cmdType>
      <params>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>question:   {1} ................... answer:  {LastResult}</param>
        <param>3000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>0</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>VC.Pause</cmdType>
      <params>
        <param>2000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>pandora</phrase>
    <payloadDictation>payloadDictation: Regular</payloadDictation>
  </command>
  <command id="488" 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="446" 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>

rio14

  • Contributor
  • ***
  • Posts: 59
  • Karma: 4
    • View Profile
Re: Arabic TTS and Al-Jazeera
« Reply #32 on: June 05, 2016, 11:08:07 PM »
tomorrow is the first of fasting month june 6 for muslums (ramadhan month)
this code give the age of the moon and the % of illumination for calculation
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.6-->
<commandGroup open="False" name="moon age ramadhan month" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="528" name="moon phase" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="25" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>WUnder.GetCustom</cmdType>
      <params>
        <param>age of the moon is {A.ageOfMoon},  and illumination is  {A.percentIlluminated}% </param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetLastResult</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{LastResult}</param>
        <param>10000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType />
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>google tell me age of the moon</phrase>
  </command>
</commandGroup>

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Arabic TTS and Al-Jazeera
« Reply #33 on: June 06, 2016, 08:18:20 AM »
Thanks for posting. The Ramadan command looks like a great addition.

Did you mean to post that command in this topic thread? I think it would fit well with your prayer time commands.
« Last Edit: June 06, 2016, 12:10:39 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: Arabic TTS and Al-Jazeera
« Reply #34 on: June 06, 2016, 01:02:52 PM »
no problem as you like thank you