Personal tools
Document Actions

Bug with microphone

Up to Tux gadgets

Bug with microphone

Posted by Luc at December 20. 2007
Hi !

The new tuxsetup 1.2 final is really nice, but I still have some problems I've got with the beta.


When I launch something which require the microphone, I can see "MICRO STREAM: ACQUISITION ON" on the terminal but when I talk, I heard nothing back.

Sometimes tux recognizes a word and launch a gadget but he can't move and speak.
The only way to have "ACQUISITION OFF" and my Tux OK is to open the micro gadget and to close it.

The new gadget "tux controller" stops my tux too because I thing it uses the microphone.

I'm using Debian testing and I launch tux with python2.5 because the firmware updater doesn't work with python2.4 (the default in my debian)


Thank you for your help.

Luc.

Re: Bug with microphone

Posted by Luc at January 06. 2008
For my problem, I changed some lines :

In GdgObject.py I turn off the micro when a word is recognize because the subprocess "arecord" is never kill :

def __on_word(self, word):
tux.micro.off()
print 'Recognized word : %s' % word
tux.cmd.leds_blink(6, 20)


And in tuxapi_class.py I add an option for auto-release arecord after 10 seconds if a word is not recognize :

def get_micro_data():
device = self.parent.hw.alsa_device
cmd = ["arecord", "-D", device, "-t", "raw", "-d", "10"]


That's not perfect, but it works better than before for me.

Re: Bug with microphone

Posted by Luc at March 29. 2008
Hi !

Just to say the bug is still in 1.3-rc1.

I made some others test so I have more informations to give.

When I press the head of tux, the ACQUISITION start but the event "head_released" never happened, so Tux never closes his mouth.
But if I "killall arecord", the acquisition ends and tux closes his mouth.

So I tried some modifications :

in tuxapi_class.py, micro.on function :

while (self.__process.poll() == None):
self.__process_mutex.acquire()
buff = self.__process.stdout.read(800)
self.__on_new_buffer(buff)
self.__process_mutex.release()
time.sleep(1) <----------- 1 second

and

def __send_energy_monitoring(self, buffer):
return
(I don't know what this function does...)


With this 2 changes, all the events works (Tux opens and closes his mouth), but the voice recognizion doesn't work.... :-/

Please someone can help me ?

I'm using Debian testing


Thanks

Re: Bug with microphone

Posted by se at March 31. 2008
Hey Luc,
The problem you describe could not be reproduced from our side. But it looks the problem might be more related with arecord.
Maybe you have another application open, using the sound device of the microphone. But then again if the device is already busy it shouldn't keep the beak of Tux open...




Powered by Ploneboard
You are here: Home Forum Tux gadgets Bug with microphone

Powered by Plone CMS, the Open Source Content Management System