I'm playing an mp3 file containing several sentences, and relying on robot.sound.is_active() returning False to tell me when the file has finished playing. Most of the time it's accurate, but there are a substantial number of trials where the function returns False prematurely, with less than half of the mp3 file having played.
The problem seems to be caused by moments of silence in the mp3 file. If my text-to-speech service puts in a pause between sentences, then sometimes robot.sound.is_active() returns False even though there is a lot more of the mp3 file left to play.
This is causing serious problems for my human-robot interaction experience.
I'm playing an mp3 file containing several sentences, and relying on robot.sound.is_active() returning False to tell me when the file has finished playing. Most of the time it's accurate, but there are a substantial number of trials where the function returns False prematurely, with less than half of the mp3 file having played.
The problem seems to be caused by moments of silence in the mp3 file. If my text-to-speech service puts in a pause between sentences, then sometimes robot.sound.is_active() returns False even though there is a lot more of the mp3 file left to play.
This is causing serious problems for my human-robot interaction experience.