I wrote a script that should let the Nao walk or play a wav file when pressing a button. But the sound file never gets played and I think I am not using a correct path.
def sing(note):
try:
path = findNotePath(note)
soundProxy = naoqi.ALProxy("ALAudioPlayer", host, port)
fileid = soundProxy.loadFile(path)
soundProxy.post.playFile(fileid)
except Exception as e:
print(e)
print("Ton nicht abspielbar")
print(path)
def findNotePath(note):
path = "/home/nao/FullOctave/" + note + ".wav"
return path
This is my output:
[W] 1685708250.183120 30208 qi.path.sdklayout: No Application was created, trying to deduce paths
[I] 1685708250.189637 30208 qimessaging.session: Session listener created on tcp://0.0.0.0:0
[I] 1685708250.794682 30208 qimessaging.transportserver: TransportServer will listen on: tcp://192.168.178.31:53942
[I] 1685708250.794682 30208 qimessaging.transportserver: TransportServer will listen on: tcp://192.168.147.1:53942
[I] 1685708250.794682 30208 qimessaging.transportserver: TransportServer will listen on: tcp://192.168.30.1:53942
[I] 1685708250.794682 30208 qimessaging.transportserver: TransportServer will listen on: tcp://127.0.0.1:53942