[EMAIL PROTECTED] wrote:
> AGI's and EAGI's will get you fairly far, but for some things I need
> separate threads eavesdropping on a channel while regular execution
> continues. For example, being able to say "help" at any time, and
> interrupt whatever is going on.
>
Which is a pretty good argument for producing a stub that allows for
those kinds of hooks to be programmed in a high-level language IMO. Of
course, cleaning up the AGI API at the same time to allow for more
flexible usage elsewhere (e.g. asynchronous playing of digits, numbers,
names, etceteras for prompts) would be a very useful goal too.
toSayQueue.append( Digits( XXX ) )
toSayQueue.append( SoundFile( XXX ) )
user.getAudioStream( INPUT ) # file-like audio streams, maybe
gstreamer or the like
# maybe some processing registration functions that kick off
"eavesdropping" behaviour
user.onDigits( someFunction )
user.onSilence( someOtherFunction, duration )
user.onAudio( someRecordFunction )
user.onRecognised( someTextFunction, vocabulary )
# and some output-queue control
toSayQueue.abortPlaying() # cancel immediately, maybe have option
for trailing off volume...
toSayQueue.clear() # clear the remaining queued items...
or what have you (obviously you'd spend a while looking at the actual
abstractions you need/want before you write it).
Anyway, just my $0.02, have fun,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com