Archived
25 lines
751 B
Python
25 lines
751 B
Python
from numpy import sort
|
|
from playsound import playsound
|
|
import paramiko
|
|
import os
|
|
from naoqi import ALProxy
|
|
|
|
pth = "/home/nao/Documents/Pure tones/"
|
|
|
|
files = os.listdir(pth)
|
|
|
|
# for f, file_as_num in enumerate(sorted(int(os.path.splitext(file)[0][:-2]) for file in files)):
|
|
# print(file_as_num)
|
|
# playsound(os.path.join(pth,str(file_as_num) + "Hz.wav"))
|
|
# raw_input("Continue?")
|
|
|
|
aap = ALProxy("ALAudioPlayer", "sam.local", 9559)
|
|
aad = ALProxy("ALAudioDevice", "sam.local",9559)
|
|
|
|
aad.setOutputVolume(10)
|
|
|
|
sam_pth = "/home/nao/volume_test/"
|
|
for f, file_as_num in enumerate(sorted(int(os.path.splitext(file)[0][:-2]) for file in files)):
|
|
print(file_as_num)
|
|
aap.playFile(sam_pth + str(file_as_num) + "Hz.wav")
|
|
raw_input("Continue?") |