ALAudioSourceLocalization API

NAOqi Audio - Overview | API

Namespace : AL

#include <alproxies/alaudiosourcelocalizationproxy.h>

Method list

As any module, this module inherits methods from ALModule API. It also has the following specific methods:

class ALAudioSourceLocalizationProxy

Event list


void ALAudioSourceLocalizationProxy::setParameter(const std::string& parameter, const AL::ALValue& value)

Set the following parameters:

  • “EnergyComputation” to True or False (default). When set to True, the peak energy of the located sound is estimated. The ALMemory key “ALAudioSourceLocalization/SoundLocated” where the result of the computation is updated is modified consequently:
[ [time(sec), time(usec)],

  [azimuth(rad), elevation(rad), confidence, energy],

  [Head Position[6D]]
  • “Sensibility” between 0 and 1 to adjust the capacity of NAO to locate quiet sounds.
  • parameter – Name of the parameter
  • value – Value of the parameter
void ALAudioSourceLocalizationProxy::subscribe(const std::string& name)

Subscribes to ALAudioSourceLocalization. This causes the module to start writing information to ALMemory in “ALAudioSourceLocalization/SoundLocated”. This can be accessed in ALMemory using ALMemoryProxy::getData().

  • name – Name to identify the subscriber
void ALAudioSourceLocalizationProxy::unsubscribe(const std::string& name)

Unsubscribes to ALAudioSourceLocalization. This causes the module to stop writing information to ALMemory in “ALAudioSourceLocalization/SoundLocated”.



Event: "SoundLocated"
callback(std::string eventName, AL::ALValue value, std::string subscriberIdentifier)

Raised when a sound source has been localized.

  • eventName (std::string) – “SoundLocated”
  • value – Located source informations. Please refer to ALAudioSourceLocalization for details.
  • subscriberIdentifier (std::string) –


This event should be prefixed by “ALAudioSourceLocalization/” when subscribing to it.