You may want to submit a detailed problem description along with your script and system's specs (OS version, soundcard make and model, etc.) to inquisit<at>millisecond.com so the developers can take a closer look.
Apart from that, the only things I can think of are (1) updating your soundcard drivers, (2) setting up and testing a basic voicerecord test script to see if recording works at all on your system and (3) testing on a different system.