pepper.framework.backend.naoqi.microphone module

class pepper.framework.backend.naoqi.microphone.NAOqiMicrophone(session, index, callbacks=[])[source]

Bases: pepper.framework.abstract.microphone.AbstractMicrophone

NAOqi Microphone

Parameters:
  • session (qi.Session) – Qi Application Session
  • index (NAOqiMicrophoneIndex or int) – Which Microphone to Use
  • callbacks (list of callable) – Functions to call each time some audio samples are captured
RATE = 16000
SERVICE = 'ALAudioDevice'
processRemote(channels, samples, timestamp, buffer)[source]

Process Audio Window from Pepper/Nao

This function must be exactly called “processRemote”, according to NAOqi specifications.

Make sure this thread is idle to receive calls from NAOqi to ‘processRemote’, otherwise frames will be dropped!

Parameters:
  • channels (int) – Number of Channels
  • samples (int) – Number of Samples
  • timestamp ((int, int)) – seconds, millis since boot
  • buffer (bytes) – Audio Buffer