Does Misty already have the ability to play an audio loop in the background i.e. while other code is running in the foreground? Imagine how endearing Misty would be humming a tune while off behind the sofa or in another room. For someone who lives alone it might provide a sense of companionship. It might help to more easily locate Misty if it was exploring.
The expected behavior is that playing a sound file will start it and the rest of the script continues; more or less, there is the ability for background audio. I assume the next portion of this is a request to play sounds on loop?
The other part of this is a portion of Misty’s personality. I think part of the liveliness is for Misty to react to the environment and emit sounds according to her internal state. I am looking forward to this kind of robot personality too!
For the moment, I think you could achieve this desired behavior now, by using the current Sound/PlayFile API - play a file, set yourself a timer for when it ends, and then start the file again when the timer goes off and reset the timer.
I am a big fan of the idea of the robot generating intentional sounds as it goes about its day. Humming, whistling, coughing, snorting, etc are all parts of the `life’ of the robot. But, as @Scott mentioned, the robot gets even more alive when the sounds that are generated are tied to the robot’s internal state - Both in what sounds are made, and how they are expressed. I.e, whistling happily or sadly. We’re working on systems to support this sort of behavior, hopefully we can get something into your hands before too long to play with.
On a different note, what other sorts of audio capabilities would you (@miker) be interested in beyond looping? Cross-fading? The ability to cut off a file mid-play? ??
A relevant paper on having robots generate sounds while they go about their business: