If you're using Linux system, I would recommend that you run
system("ffplay voice.mp3")
(ffplay is required. Any other software which can play voice file is also applicable.)
In windows environment, it should be possible to implement this in similar way.