"Start Listening" confirmation

"Corey Elliott" <[email protected]> Mon, 16 Oct 2006 14:59:00 -0500
Newsgroups gmane.comp.misc.misterhouse.announce
Message-ID <D6FF7256F0E5444285101D32843CF77C012921B1@WPSCV6LH.OPR.STATEFARM.ORG>
This is a multi-part message in MIME format.

--===============2063426690==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C6F15D.85E53201"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C6F15D.85E53201
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hey all,=20

Long time reader, first time poster... blah, blah, blah. =3D )

I have recently gotten around to get MH up and running on my Server 2003
box and everything is going great!  Setup was simple and uptime is
proving to be a non-issue.  It's really quite amazing!

As I wait for my newly purchased X10 items, I've begun snooping around
in the code of MH.  I'm a self taught programmer (basic, VB, C++) but
have never dabbled in Perl and I am, by far, not an expert.  The code
looks pretty straight forward so I've decided I want to do some
customizing.  I'm implementing a new weather command to get, parse, and
say the weather forecast discussion as well as the current conditions
and the forecast. (I'm a weather nut and like listening the bi-daily
forecast discussion).  That's going well; however, my next project is a
little harder for me.

I'm using VR and TTS and both are working amazingly well.  It accepts
the VR from across the kitchen, even using the cheap mic built into my
server monitor.  However, there's no way for me to know when the
computer is listening to me... I'd like to play a wav file.  I'd like to
leave the MS VR engine sitting in "listening" mode.  I don't want the MS
engine worrying about switching back and forth from listening and not
listening so I'll just leave it in listening mode and I am going to have
MH handle that.  My idea is to leave MH in MH's "not listening" mode all
the time.  Then I'd like to speak a command, let's say "Computer" for
all the Trek geeks, and then I'd like to have MH play a little wav file
and go into listening mode for 3 seconds, and then default back to "not
listening". =20

After looking through the code, I came across the actual start/stop
listening code in the mh_control.pl.  Would it be best to simply alter
the code there, change the voice trigger from "[Start, Stop] listening"
to "Computer" and modify the remaining code in this block:

if ($state =3D said $v_listen) {
	if ($state eq 'Start') {
		if ($v_listen->{set_by} =3D~ '^vr') {
			&Voice_Cmd::wait_for_command(0);
		}
		$v_listen->respond('app=3Dcontrol Yes sir?');
	}
	else {
		&Voice_Cmd::wait_for_command('Start listening');
		$v_listen->respond('app=3Dcontrol I am not listening.');
	}
}

Is that how you guys would handle this?  Am I heading in the right
direction?

Thanks,

Corey

------_=_NextPart_001_01C6F15D.85E53201
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7650.28">
<TITLE>&quot;Start Listening&quot; confirmation</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=3D2 FACE=3D"Arial">Hey all, </FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Long time reader, first time =
poster&#8230; blah, blah, blah. =3D )</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I have recently gotten around to get MH =
up and running on my Server 2003 box and everything is going =
great!&nbsp; Setup was simple and uptime is proving to be a =
non-issue.&nbsp; It's really quite amazing!</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">As I wait for my newly purchased X10 =
items, I've begun snooping around in the code of MH.&nbsp; I'm a self =
taught programmer (basic, VB, C++) but have never dabbled in Perl and I =
am, by far, not an expert.&nbsp; The code looks pretty straight forward =
so I've decided I want to do some customizing.&nbsp; I'm implementing a =
new weather command to get, parse, and say the weather forecast =
discussion as well as the current conditions and the forecast. (I'm a =
weather nut and like listening the bi-daily forecast discussion).&nbsp; =
That's going well; however, my next project is a little harder for =
me.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I'm using VR and TTS and both are =
working amazingly well.&nbsp; It accepts the VR from across the kitchen, =
even using the cheap mic built into my server monitor.&nbsp; However, =
there's no way for me to know when the computer is listening to =
me&#8230; I'd like to play a wav file.&nbsp; I'd like to leave the MS VR =
engine sitting in &quot;listening&quot; mode.&nbsp; I don't want the MS =
engine worrying about switching back and forth from listening and not =
listening so I'll just leave it in listening mode and I am going to have =
MH handle that.&nbsp; My idea is to leave MH in MH's &quot;not =
listening&quot; mode all the time.&nbsp; Then I'd like to speak a =
command, let's say &quot;Computer&quot; for all the Trek geeks, and then =
I'd like to have MH play a little wav file and go into listening mode =
for 3 seconds, and then default back to &quot;not listening&quot;.&nbsp; =
</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">After looking through the code, I came =
across the actual start/stop listening code in the mh_control.pl.&nbsp; =
Would it be best to simply alter the code there, change the voice =
trigger from &quot;[Start, Stop] listening&quot; to &quot;Computer&quot; =
and modify the remaining code in this block:</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">if ($state =3D said $v_listen) {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">if ($state eq 'Start') {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">if ($v_listen-&gt;{set_by} =3D~ '^vr') {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">&amp;Voice_Cmd::wait_for_command(0);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">}</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">$v_listen-&gt;respond('app=3Dcontrol Yes sir?');</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">}</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">else {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">&amp;Voice_Cmd::wait_for_command('Start =
listening');</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">$v_listen-&gt;respond('app=3Dcontrol I am not =
listening.');</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">}</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">}</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Is that how you guys would handle =
this?&nbsp; Am I heading in the right direction?</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks,</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Corey</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C6F15D.85E53201--


--===============2063426690==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--===============2063426690==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
misterhouse-announce mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/misterhouse-announce

--===============2063426690==--