Saves the entire audio buffer into a file
audio_saveBuffer(line,wavfile)
Java object. Audio line
String. Name of wav file that will used to save the audio
This function saves the entire audio buffer into a specified file. The audio will be saved as a wav file.
// Requires a microphone line = audio_getLine(16000,16,1,%t,%t,2,3); audio_startCapture(line) messagebox("Please say something and then click OK to continue","modal"); audio_stopCapture(line) audio_saveBuffer(line,TMPDIR+"\myaudio.wav") [audiodata,fs]=wavread(TMPDIR+"\myaudio.wav"); playsnd(audiodata,fs) | ![]() | ![]() |