Page 1 of 1

making announcements in tasks

Posted: Wed Sep 14, 2011 11:08 am
by nsisman
Slowly finding my way thru this.

Two questions please.

1..If I want Housebot to make an announcement by text to speech do I need to add a separate text to speech device for each task or can I just change the announcement in the main text to speech device ?


2. How can I get some .wav files to play as part of a task ? I can't find anything in "action" to do this ?


Thanks in advance

Neil

Re: making announcements in tasks

Posted: Wed Sep 14, 2011 1:07 pm
by Richard Naninck
1. Don't use the Speech device so no help here.

2. You could create a script device containing the code below and download Playwav.exe from the internet and store the .exe in some HouseBot directory you point to in the script (in my case /AutoHome/Programs/). Store a link to the wav file you want to play in a property and set the Script State to running.

Code: Select all

WavFile = GetPropertyValue("Your Device.Your Property")
Call Play_WavFile(WavFile)

Sub Play_WavFile(WavFile)
Dim MyShell
Dim CommandString

	Set MyShell   = CreateObject("WScript.Shell")
	CommandString = Chr(34) & "C:\Program Files\HouseBot\Config\AutoHome\Programs\PlayWAV.exe " & Chr(34) & Chr(34) & WavFile & Chr(34)
	
	Call MyShell.Run(CommandString, 0, True)
	
	Set MyShell = Nothing
End Sub

Re: making announcements in tasks

Posted: Wed Sep 14, 2011 8:53 pm
by markd
1. I use one Text-2-Speech device that I hit from multiple tasks to play announcements. I set the Output Device field and the Text field to what is required.

2. You can use Winamp to do this- not sure there is any other built in way to do it. Or there is Richard's script. . .

Re: making announcements in tasks

Posted: Sun Sep 18, 2011 3:22 pm
by ScottBot
I use this mplayerto play wav files. It's very configurable and I can run it from a task. However, it can be a little involved trying to get all of the command line args setup for your particular system.

Re: making announcements in tasks

Posted: Mon Sep 19, 2011 2:18 pm
by edgar
Hi All,

I also use one speech device for all tasks and it works well. Just to add a reminder, You can easily inject status of other variables using tasks to speak the 'state' of something:

For example if you want to use TTS to say the last caller you can easily do so by changing the property state 'Text to Speak' to: 'The last incoming call was from %%Phone Device.Last Caller%%.

I actually use this feature as a Welcome home speech if my 'sign of life' timer' goes over 90 minutes and someone opens the front door.

Question for all: One thing I cannot figure out is if I can easily create a text file of mapped abbreviations to words/phrases for the speech engine so when I have my device read the temperature it can correlate the '68 F' (from the weather plugin) to speak ' 68 degrees Fahrenheit'. At the moment, it says 'The temperature is 68 F (eff)'.

One more thing to add since Richard's script was mentioned here....I think this is the script used to play back TTS speech on other windows machines. I had issues with the permissions that the script needs.... and could not get things to work. So I tried using a Device Replicator (running Housebot Server on both machines) and things seem to work pretty well (by replicating the speak device).

Great thread...hope this helps...thanks in advance to anyone with advice on my issue!

v/r

Kevin

Re: making announcements in tasks

Posted: Wed Oct 26, 2011 3:50 am
by wallebalboa
Hi.
if you want to speech on diffrent locations/machines i would really recommend you to look into xAP speech and the xAp plugin for Housebot. then its no need to install full housebot on all machines.
I run SWremote , xAP hub and xAP Speech ( just testing xAP voice for voicecommands too ) on all my "remote" computers. this vill give wildcard adressing ("*") for wholehouse announsments, volume and voice adjustments on each machine.
kind regs

Re: making announcements in tasks

Posted: Thu Oct 27, 2011 3:20 pm
by jacco van der Ven
I am playing now with xAP speech, I try to send an speak command from housebot but it didn't work.

xAP Message Class = tts.speak { Say=Hello Volume=100 }
xAP Message Target = [ nothing ]

I know the remote computers are working, I send an speak command from my iphone and it is working.

This is how I set it up, I think I do something wrong?

Re: making announcements in tasks

Posted: Thu Oct 27, 2011 4:37 pm
by wallebalboa
Hi.
its the "xAP message target" that is triggering the send... set it to "mi4.speech.* "and it will sound on all ...
use the xAP v4 viewer to check that you get messages out from housebot and that xAP speech it doing hartbeat and grants the speech command...
the xAP message class shall be tts.speak
and you need to set up 2 extra properties for say and volume...
look more in the documentation about xAP send to understand how you get the message out of HB...
however it would be nice if the change of tts.speak/say could trigger the send... now you need to set the thing to say in tts.speak/say property and then set the target in the same task... not a big deal thou... ;-)

Re: making announcements in tasks

Posted: Thu Oct 27, 2011 5:22 pm
by jacco van der Ven
I know how to make some properties, but how do I call them?
In the viewer is aan Listener error, because it has invalid characters.

Can you post an printscreen for me please?

Regards

Re: making announcements in tasks

Posted: Thu Oct 27, 2011 6:12 pm
by wallebalboa
just add a xAP genericalpha property to the xAP Sender Device and name it "tts.speak/Say".
you can manually set the properties to values in HB to test and then use a task or a script to set them to values

what do you mean with call them?

use the viewer to test how to get the right message out...

sorry but i dont know how to get an image here in the forum... :oops:

Re: making announcements in tasks

Posted: Fri Oct 28, 2011 1:53 am
by jacco van der Ven
Ok, I didn't understand how I named the property, but your last post was helpfull
now it is working.

Thanks

Re: making announcements in tasks

Posted: Sun Oct 30, 2011 5:37 pm
by edgar
Hi All,

I have been working xAP this weekend and it is pretty neat. Played around with Speech, Weather and News.

I do have a question about it though. How do you get HB to actually send a xAP message. I can do it from the device screen by 'clicking' on the grey button...but this does not appear to be a property i can control. I am not sure if this is the question that was asked earlier but i did create a task and set the xAP message target to a particular value..like mi4.speech.* but that did not actually send the message out from HB to the xAP network. What do i need to do to 'send' the xAP message?

Thanks for any help on this. When i send manually...it works great...i just need to be able to do it from a SWRemote or Task now.

v/r

Kevin

Re: making announcements in tasks

Posted: Mon Oct 31, 2011 5:31 am
by jacco van der Ven
I have a task that checks the value of message.target if this is not "Receiver" (just a word) that it will change it in "Receiver"
When I want to say something on a pc I change the value in mi4.speech.laptop and it will say the message, the task will change it back in "Receiver".

Regards,
Jacco