[Tutor] a Pygtk question sort of

ALAN GAULD alan.gauld at btinternet.com
Sat Jan 12 19:44:47 CET 2013


Forwarding to the List

Pleae use ReplyAll for list responses.

 
Alan Gauld
Author of the Learn To Program website
http://www.alan-g.me.uk/



>________________________________
> From: richard kappler <richkappler at gmail.com>
>To: Alan Gauld <alan.gauld at btinternet.com> 
>Sent: Saturday, 12 January 2013, 2:15
>Subject: Re: [Tutor] a Pygtk question sort of
> 
>
>
>
>
>I'm not sure what you mean by "down pretty hard" but this definitely looks like a question for a pocketsphinx forum...
>>
>
>
>CMU Sphinx runs forums that would have been appropriate on Sourceforge, but those are "down hard" eg trying to access them gives a 404 error (this is new, they have never been down before, at least in my experience).  The help/discussion forums at python.org are apparently in the midst of migrating to a new format/software and, while there, are unsearchable and mostly missing for the next few days.
> 
>....I want to use this code or code
>>>like it ....in my bot program, so I don't need the gui, button or any of that. I
>>>
>>>need pocketsphinx to work exactly as below, but send the text output
>>>back to the main program or to a different program (chatbot) instead of
>>>the gui. Make sense?
>>>
>>Sadly no.
>>Can you explain exactly how you intend running pocketspinx?
>>What is the main program? A Python script? Or some other external program? Where does chatbot fit in? Is it just an arbitrary example or is there some specific symbiosis going on?
>
>
>It's a robot I've been working on for some months. It consists of a laptop interfaced with an Arduino board that reads sensors, sends the data to the laptop for decision making and controls the motors based on commands generated by the "main" bot program on the laptop, written in python (2.73). 
>
>
>Among the many separate programs called by the python program that is the "main" part of the bot, will be pocketsphinx for speech recognition, festival for text to speech, Chatscript for the chatbot, the Arduino which coms through serial and other things still being worked out. The Arduino is coded and communicating quite well with the laptop/python program. Chatscript (via boost) and Festival are working well enough for now. I'm trying to work the pocketsphinx bit now.
>
>
>What pocketsphinx needs to do is convert the user's speech to text and send it to the python program ("main program" think master control) via the gst pipe set up in the script I appended to the original post. Come to think of it my terminology is way off here, as I believe the appended script will ultimately be a class within the bot's python program, so think of it more as a main loop within the python program. In that loop the sensors will be read, the AI will determine priorities based on needs or commands, pocketsphinx will listen and convert speech to text returning the text output to the main loop, where the text will be either matched with a few preset sentences for commands like "move forward," "turn left," etc or, if there are no matches there, the text is sent out to Chatscript (a separate, C++ program) for NLP processing and response, which response will be returned to the python program and sent out to Festival for text to speech response,
 then the loop starts over unless the "end program" command is given, in which case the loop is exited and the program terminates.
>
>
>Hopefully better?
>
>
> 
>gui method and the button. The problem is the button controls the vader
>>>(determines begin and end of utterances) as well. Detailed explanation
>>>
>>
Nope, you lost me again...
>
>
>The previously appended code basically does three things: 
>1) it creates a little gui text box with a button.  
>2) it uses gst to receive real time audio from the mic and opens a pipeline to ---
>3) send the audio to pocketsphinx speech rec engine for decoding to text
>
>
>How it works: start the program, a gui pops up with a button labeled "speak" and behind the scenes gst and pocketsphinx are started/initialized. The vader (voice activity detector), controlled by the button method, determines the beginning and endpoint of an "utterance" (think sentence). So, once the program/script is started and everything up and running, when you push the "speak" button, gstreamer receives the audiostream from the mic, the button changes to "stop" and the vader sets to work breaking the audio stream into utterances for pocketsphinx to process/convert to text. The output from pocketshinx, what the engine thinks you said, is displayed in real time in the text box of the gui.
>
>
>I want that text directed into the python program for further processing instead of the text box.
>
>
>regards, Richard
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130112/9c4a4230/attachment-0001.html>


More information about the Tutor mailing list