NAOqi Audio - Overview | API
Namespace : AL
#include <alproxies/alsounddetectionproxy.h>
As any module, this module inherits methods from ALModule API. It also has the following specific methods:
Use it to set the sensitivity of the detection.
Parameters: |
|
---|
Available parameters:
So the sensitivity of the detection can be set by calling this function as follows:
import sys
from naoqi import ALProxy
if (len(sys.argv) < 2):
print "Usage: 'python sounddetection_setparameter.py IP [PORT]'"
sys.exit(1)
IP = sys.argv[1]
PORT = 9559
if (len(sys.argv) > 2):
PORT = sys.argv[2]
try:
sd = ALProxy("ALSoundDetection", IP, PORT)
except Exception,e:
print "Could not create proxy to ALSoundDetection"
print "Error was: ",e
sys.exit(1)
# Sets the sensitivity of the detection to 0.3 (less sensitive than default).
# The default value is 0.9.
sd.setParameter("Sensitivity", 0.3)
print "Sensitivity set to 0.3"
Subscribes to ALSoundDetection. This causes the module to start writing information to ALMemory in “SoundDetected”. This can be accessed in ALMemory using ALMemoryProxy::getData().
Parameters: |
|
---|
Unsubscribes to ALSoundDetection. This causes the module to stop writing information to ALMemory in “SoundDetected”.
Parameters: |
|
---|
Raised when a significant sound has been detected.
Parameters: |
|
---|