Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - marcusvdt

Pages: 1 [2]
16
I want the OSD.ShowText to show something like this:
Code: [Select]
1 message1 date1
2 message2 date2
3 message3 date3

Since the text lenght for message can vary slightly, I would like to use the tab char instead of regular spaces. Is it possible?
I've tried both "\t" and {TAB} but they don't work.


17
Other Plugins / TTS talking head - use of PNGs instead on JPGs
« on: June 18, 2015, 03:07:37 PM »
Hi all!
I've tried using png files instead of jpg file so I could try to get transparency while using a custom talking head.
Unfortunatelly it did not work.
Is this possible?

It would open more possibilities for a nice interface.

Also, is it possible to make the talking head to cover 100% of the screen instead of specifying fixed pixel size?

Thanks!

18
Can you please guide me why this command is not being recognized? I'm probably misunderstanding how it is supposed to work...
The purpose is to allow subset matching for any words that are separated by commas in the second payload xml. So if the user says one of the following phrases, the payload {1} should be the ID of the abajour as defined in the xml, and the payload {2} should be "1".
Alterar abajur para ligado
Alterar abajur para aceso
Alterar abajur para claro

This is not currently being recognized and it seems the words separated by commas in the payload xml are not being considered possible phrases. I want to have the flexibility of saying similar words which all mean the same thing, in this example above, there are three different words with the same meaning: turn the light on.


The test command is this below.
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.2-->
<command id="561" name="test Actuators on/off" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{1}   {2}   {CR}{#P} {CR} {LastResult}</param>
      <param>4000</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Alterar</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">MySensors Payloads\ONOFF.xml</payloadFromXML>
  <phrase optional="true">para</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">MySensors Payloads\ONOFF-commands.xml</payloadFromXML>
</command>

First payload xml (name of the sensor):
Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<!--A VoxCommando Payload file-->
<PayloadsRoot>
    <payload>
        <value>51|99</value>
        <phrase>luz ht</phrase>
    </payload>
    <payload>
        <value>3|1</value>
        <phrase>abajur</phrase>
    </payload>
</PayloadsRoot>


second payload xml (available commands that I may say for a specific category of sensors):
Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<!--A VoxCommando Payload file-->
<PayloadsRoot>
    <payload>
        <value>1</value>
        <phrase>ligado, aceso, ligada, acesa, clara</phrase>
        <subsetmatching>true</subsetmatching>
    </payload>
    <payload>
        <value>0</value>
        <phrase>desligado, apagado, desligada, apagada, escuro</phrase>
        <subsetmatching>true</subsetmatching>
    </payload>
    <payload>
        <value>2</value>
        <phrase>teste</phrase>
        <subsetmatching>true</subsetmatching>
    </payload>
</PayloadsRoot>

Notice above that I have created a dummy entry to the payload xml file so I can ensure the problem I'm having is really related to the subset matching. The phrase "teste" which is in the same payload xml is recognized perfectly.

Thanks!

19
This is probably a question to James, not sure if anyone else has been able to try that before.

The list contains basically the data needed to generate a new payload xml. Before I go and make a function on python that will create a standard payload xml file from scratch, I would like to check if it is possible to do that with an action on VC?

The list that is returning from my python script contains the results from a database query, so many lines of value/phrases can return on that list.

If I'm able to take that return from VC and transform that data on a payload xml, that's wonderful, but I don't know how to do it. So I'm asking for help on that.
If it can't currently be done, then I'm going to create the payload file directly from the py script, which seems easy but then if you guys change anything in the xml format in the future releases, I'll need to go back to this script and change it accordingly. I would like to avoid it if possible.

The screenshots show what I'm talking about.
Thanks!

20
Python Scripting / Querying map tables with python.
« on: June 02, 2015, 02:35:27 PM »
Quick example demonstrating how to get a python script to query map tables.

First of all you need to download the library from here. Then copy ONLY the DLL file (only the dll file) to the folder below and ignore any instructions from the developer.
<your VC folder>\dlls

Here is the command:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.2-->
<commandGroup open="True" name="map query test" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="633" name="Run the querymaps.py at startup" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecFile</cmdType>
      <params>
        <param>PY\querymaps.py</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>VC.Loaded</event>
    <event>VC.Rebuild</event>
  </command>
  <command id="549" name="Query maps.db3" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="Quick example on how to query a table Sensors_Presentation listing all the lines from the table where the fromkey field is equal to the ones in the Sensors_Control_Type table and the tovalue field is equal to 'BOOLEAN' on the Sensors_Control_Type table. Purely a relational database example.">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>executesquery("select * from Sensors_Presentation where fromkey in (select fromkey from Sensors_Control_Type where tovalue='BOOLEAN')")</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
</commandGroup>


Here is the python script. Save it inside your VC installation folder, inside the PY folder and name it querymaps.py:
Code: [Select]
import sqlite3

#Executes queries to VC's map tables
def executesquery(sql):
    print "Going to execute the query:"
    print str(sql)
    con=sqlite3.connect("data\\maps.db3")
    c=con.cursor()
    c.execute(sql)
    print c.fetchall()


21
First of all I'd like to say that this is kind of an advanced topic related to creating an enhanced controller for My Sensors 100% based on python and VC. My code is based on the original controller by James/Dave/Kalle (thanks for starting this out!).
The job is 90% done and I'll share the result when it is done.
So let's go...

For each type of standard sensors that are supported by MySensors, I defined a control_type, like boolean, integer, string, etc. The purpose of this definition is to use this information to let VC dynamically know which sensors can receive each of the payloads. For example, BOOLEAN type of sensors, will accept payloads ON or OFF. Sensors that have been identified as INTEGER type, will accept payload range 1-100.

In short, once a new sensor is presented to the controller, the python script sends to VC what type of sensor is being presented and then this relationship between the sensor ID and the type of commands it will accept is created on the table Sensors_Control_Type for future reference.

At the same time, another table automatically saves an ALIAS for each sensor, relating the sensor ID with an ALIAS. That ALIAS will be used dynamically later as payload for commands (so that the user can say the ALIAS when requesting a command to a sensor, and consequently let VC build the command to send to a specific sensor accordingly).
The initial ALIAS is equal to the type of the sensor as defined in the MySensors API, for example a light actuator will be created on the table as LIGHT. The user will change this manually to anything that is desired like "LIVING ROOM LIGHT". This is the only thing that I'm planning to let to the user do manually.

So I have a table Sensors_Control_Type with the fromkey being composed of "nodeID|childID", and the tovalue field containing the control_type as I defined in the presentation phase (BOOLEAN, INTEGER, FLOAT, ETC). Each "nodeID|childID" represents an unique sensor in the system, hence I have one line in the table for each sensor. But the same control_type (value) may appear many times in this table because I may have many sensors of the same type (ie. many light actuators in the house).

Well, I want to have one command in VC for controlling BOOLEAN sensors, another command for controlling INTEGER sensors, and so on. I want these payloads to be generated dynamically and updated when a new sensor is presented.
This way the users can add new standard sensors to the system dynamically. When a sensor presents itself, the commands for it will be immediately available to the user because the payload xmls will be updated accordingly.

As an example, the command for BOOLEAN sensors is:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.2-->
<command id="559" name="Toggle on/off" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="This command receives the nodeID|childID from a payload xml called (MySensors Payloads\Sensors_BOOLEAN_sensors.xml) based on the ALIAS of the sensor you want to set the status for. The actual status that you want to set comes from (MySensors Payloads\Sensors_BOOLEAN_payloads.xml). In the end, this cmd builds the message to be sent to the sensor. The sub type field comes from the Sensors_Type map table. Hence the command is dynamically built.&#xD;&#xA;nodeID;childID;type=1;ack=1;;subtype={M:Sensors_Type.{1}};payload=1">
  <action>
    <cmdType>Results.SetLastResult</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.Replace</cmdType>
    <params>
      <param>|</param>
      <param>;</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>MySensorsGatewayBuildWrite("{LastResult};1;1;{M:Sensors_Type.{1}};1\n")</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Turn</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">MySensors Payloads\Sensors_BOOLEAN_sensors.xml</payloadFromXML>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">MySensors Payloads\Sensors_BOOLEAN_payloads.xml</payloadFromXML>
</command>


I have all this done and already working, EXCEPT the dynamic creation of the payload files like Sensors_BOOLEAN_sensors.xml

I would like to be able to do something like this:
select * from Sensors_Presentation where fromkey in (select fromkey from Sensors_Control_Type where tovalue='BOOLEAN')

What I need is to get the result of this query to output from the tables to a payload xml. Before I go and research how can I do that using python, I thought I should ask for a confirmation that a command like Map.Query can do that or not.
Maybe you guys at VC can create a new command in VC like Map.QueryToXML, what do you think? ;-)
I've tested Map.Query with the above sql query but it returns only the first result. Either way I would not be able to export to a payload xml only with the Map.Query

By the way, my controller works like a charm, but I'm trying to eliminate any manual setups so the thing runs smoothly and dynamically.

22
Feature Requests / Payload dictation for SP version
« on: April 10, 2015, 06:42:00 PM »
Hi!
 :o I just discovered the SP version of Voice Commando does not allow open dictation payloads, right?
Is it possible to enable the open dictation on it so can interact with a google search for example?

For a Google search, I will always need to say something that I can't predict what it is, for example, like I do when I use Samsung's VR engine on my phone, where I can say:
"Google notícias de santos"
In this specific example, my phone will use an online engine to convert my speech to text and it will search for it.

I'm wondering if I can have more flexibility with VC, while interacting with applications. For example, I'd like to be able to search for a video from my personal videos using open dictation to enter the name of the video to be searched, not a predefined payload xml.

I was briefly reading the docs from MS about the SP 11 and it seems it is possible. Of course this is beyond my current knowledge of actually how it is done in details, so sorry if I'm asking something too much difficult to achieve.


This is a feature very desired for my plans with VC in the near future. For example, I should be able to dictate a new calendar entry and the like.

Please correct me and clarify if I'm talking complete bullshit.  :bonk

Thanks.

23
I'm currently translating and adapting many the Kodi standard configuration that came with VC.
On a side note, Portuguese has a different logic than English, for example we place adjectives after sustantives (not before), plus many commands must still be used in English (like Play and Stop). Easy to solve since I can use phonetic phrases for those cases.

Back to the subject, I'm gradually rebuilding some phrases, adjusting the payloads, etc.
Before I put too much the effort for later discovering I should have done it differently, I'd like to kindly ask if there is a recommended way for constructing the phrases when there are similar parts of phrases that may appear in many different commands For example, I suppose it would be better to have a different begining keywords for each different device that I wan to control, like "TV turn on", "Receiver volume up", "Kodi play movie", "Light living room off", and so on.
For example, If I want to have different commands with similar phrases like "What album is this" and "What movie is this", won't these common words present in both commands make it harder for VC to correctly understand what command I want to execute?

Which of the examples below are more likely to ease the speech recognition in VC?
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="491" name="What album" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.SoftMute</cmdType>
    <params>
      <param>60</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>300</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Player.GetItem</param>
      <param>"playerid":0, "properties": ["album"]</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.ParseTokens</cmdType>
    <params>
      <param>This is from the album: {item.album}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.SpeakSync</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.SoftUnMute</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>What,Which</phrase>
  <phrase>album, C D, disc, recording</phrase>
  <phrase optional="true">is this, is playing, I'm hearing</phrase>
</command>

or

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="540" name="What movie is this" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Player.GetItem</param>
      <param>"playerid":1,  "properties": ["title","cast"]</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <params>
      <param>"name".*?"(.*)"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.MatchConcat</cmdType>
    <params>
      <param>, </param>
      <param>3</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.ParseTokens</cmdType>
    <params>
      <param>Now playing {item.title} starring {lastresult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.SoftMute</cmdType>
    <params>
      <param>60</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.SpeakSync</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.SoftUnMute</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>What movie is this, which movie is this, what video is this, which video is this, what film is this, which film is this, what movie I'm watching, which movie I'm watching</phrase>
</command>

this previous one compared to the one below, is likely to make things harder or easier for VC to differentiate between the commands?

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="540" name="What movie is this" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Player.GetItem</param>
      <param>"playerid":1,  "properties": ["title","cast"]</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <params>
      <param>"name".*?"(.*)"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.MatchConcat</cmdType>
    <params>
      <param>, </param>
      <param>3</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.ParseTokens</cmdType>
    <params>
      <param>Now playing {item.title} starring {lastresult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.SoftMute</cmdType>
    <params>
      <param>60</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.SpeakSync</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.SoftUnMute</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>What,Which</phrase>
  <phrase>movie, film, video</phrase>
  <phrase optional="true">is this, I'm watching</phrase>

</command>

24
In my house, due to bad Wifi signal through the rooms, I have wired routers physically connected to a main router through a switch. Only the main router is a DHCP server and all the routers are in the same network, 192.168.1.0/24.

My phone running Voxwav is on the same LAN as the PC running VC, which means both are using IPs on the same LAN 192.168.1.0/24, although they are in different routers. Actual Voxwav IP is 192.168.1.111 and the VC IP is 192.168.1.105 (it is a reserved IP that has been set on the DHCP).

When both Voxwav and VC devices are connected via wifi to the same router on my LAN, I see no issues, everything works perfectly.

When the PC running VC is connected via wifi to one router and Android phone is connected to another router, Voxwav reports the TCP error below:
Quote
Could not establish connection to 192.168.1.105:33339
failed to connect to
/192.168.1.105 (port 33339) after 3000ms: isConnected failed: EHOSTUNREACH (No route to host)

The PC does not show any sign of a connection on this test.

Then, I tested using a telnet app on the phone opening a TCP connection to 192.168.1.105 on port 33339. The history tab on VC running on the PC displayed "TcpMic.NewClient" which confirms the phone is able to make a tcp connection on port 33339 to the PC. So maybe this error message above is complaining about the TCP connection where it is not the real issue?

But I don't know what happens with the UDP connection and how it is necessary for Voxwav to perform its job. I suppose this is the part of the communication that is not working.
On a side note, the antena icon on Voxwav pro does not find the IP of the PC on this scenario and I suppose it is because of the broadcast that can't pass through from one router, through the switch and then to another router. ANyway, I have set the host IP for the UDP config on Voxwav manually to 192.168.1.105.

From the wiki:
"Your Android device must be connected to the same LAN (local area network) as the PC running VoxCommando"
Technically, both the android and PC are in the same LAN in my case, but maybe you meant they should be on the same router?

Could you please give me some light on what can be done to fix it?


25
Bug Reports / Problem sending accented characters with TellVox
« on: April 05, 2015, 12:23:23 PM »
Hi!

Not sure if this is really a feature request, a bug, or the normal behavior, but let's go. Please move the thread accordingly for another forum if it is the case.

Intro:
In Portuguese (from Brazil or Portugal) we have some words that have completely different meanings if they are written with or without the correct accentuation. For those who are native English, it may sound weird, but in Portuguese the correct accentuation is crucial.
Reference:
http://en.wikipedia.org/wiki/Acute_accent
http://en.wikipedia.org/wiki/Circumflex
http://en.wikipedia.org/wiki/%C3%87
http://en.wikipedia.org/wiki/Tilde


So, I'm now adapting and translating all the Kodi phrases and commands tha came with VC. Because I don't have access to my computer right now, I'm doing it remotely with Team Viewer and testing the new translated/adapted commands with TellVoxCommando.exe
When I send a command like "reproduzir álbum" with TellVoxCommando.exe, this phrase is not recognized by VC. If I change the phrase in the xml to "reproduzir album" (without the acute accent) and then test the same phrase (without the acute accent) through TellVoxCommando.exe, it does work.
So I'm wondering either VC or TellVoxCommando.exe (or both) are not prepared to work with accentuated chars.

This test has arisen a critical problem to me, because my plan is to use VC with everything in Portuguese.
Can't verify how the voice recognition in Windows deals with accentuation right now because I can't talk to the microphone on my computer since I'm away from home. But I firmly believe it will recognize accents and hence VC should be able to deal with them.




Could you please confirm or either correct me regarding this?
if this is currently the normal behavior and if it is going to be fixed in the near future?
Maybe this is a behavior only with TellVoxCommando.exe, so pardon me if I'm wrong about the assumption that VC will not work with accentuation.

Thank you in advance!


26
This is probably more related to my own system since I did not find any thread about this problem, but then I still need some help...

Every time TTS.Speak is executed, the beginning of the text to be spoken does not actually output to the TV.
I'm using a mini PC, with NVidia's ION technology, connected to the TV through a HDMI cable.
I believe either the NVidia driver or maybe the TV has some issue while playing sounds through this HDMI cable. In fact I suspect the issue is with the driver since I don't remember having this issue when I was using the same mini PC with Windows 7 plus the analog output directly from sound card (instead of the HDMI cable).
I think this ION stuff does some kind on realtime emulation to play the sounds through the HDMI cable and hence the delay to actually start outputting a sound.

Do you guys have any clue about that?

Before I choose to go back to the analog connection (it is a nightmare to remove the TV from the wall so I have access to the connectors, I'd like at least to understand what is happening and check if it is possible to work around some way. Currently I'm placing some dummy chars in the beginning of every TTS.Speak so the sound is activated while these chars are being spoken and hence I can hear the real message that I wanted.

BTW, Wonderfull software. I'm currently using the trial but will buy it soon.

27
Hi!
Marcus from Brazil here.
New to this forum and starting to plan how I will build my home automation system.
First thing that I'm looking for is the hardware devices that I will need to buy to be able to control some lights at home and the TV, sound system and A/C.

This WiWo looks promising. It communicates through Wifi (LAN or internet) with a cell phone app and offer the ability to control any IR or RF devices remotely with such app. But as per the description, it is their proprietary app that learns the IR codes and saves them to their proprietary cloud. So I'm wondering if you guys believe it is possible to have VC or Event Ghost to communicate with the WiWo, replacing their proprietary app.

Thanks!

Pages: 1 [2]