Hey all,

Long time reader, first time poster… blah, blah, blah. = )

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". 

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 = said $v_listen) {
        if ($state eq 'Start') {
                if ($v_listen->{set_by} =~ '^vr') {
                        &Voice_Cmd::wait_for_command(0);
                }
                $v_listen->respond('app=control Yes sir?');
        }
        else {
                &Voice_Cmd::wait_for_command('Start listening');
                $v_listen->respond('app=control I am not listening.');
        }
}

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

Thanks,

Corey