That's not quite the whole story...that script just plays a single frequency at a time through the speaker. That's easy. Playing back a recorded sample is much less forgiving since the actual sound format for playback is unknown and, as others have tried and found, the bluetooth stack doesn't seem able to keep up with playback 100% of the time so you wind up with pops/noise in the playback.
I may add some experimental sound support for the next version, but it won't be anywhere near perfect.