AudioFile

javadoc

This service can play a variety of audio files.  Speech with Google backend  requires this service.

Examples:


#file : service/AudioFile.py edit raw
#########################################
# AudioFile.py
# more info @: http://myrobotlab.org/service/AudioFile
#########################################
 
# start the services
audiocapture = Runtime.start("audiocapture","AudioCapture")
audiofile = Runtime.start("audiofile", "AudioFile")

# it starts capturing audio
audiocapture.captureAudio()
# it will record for 5 seconds
sleep(5)
# save last capture
audiocapture.save("mycapture.wav");

# audiofile.playFile("c:/sounds/beep.mp3")
audiofile.playFile("mycapture.wav")

Alessandruino's picture

AHAHAH :D the epic motto :D

AHAHAH :D the epic motto :D funny :D

FlavioSune's picture

Thanks Al! The error was just

Thanks Al!

The error was just playFile doesn't seem to work with wav files, just playWAVFile.