When I run the "Example usage with mic:" code for saving the stream as a .wav the resulting file is drastically slowed down. So a 5-second recording is a minimum of 10s. Note that if I speed this audio up in a video editing software it sounds perfect. (Windows 10 / SoX 14.4.1)
//The code
var FileWriter = require('wav').FileWriter;
var mic = require('mic');
var micInstance = mic({
rate: '16000',
channels: '1',
debug: true
});
var micInputStream = micInstance.getAudioStream();
var outputFileStream = new FileWriter('./test.wav', {
sampleRate: 16000,
channels: 1
});
micInputStream.pipe(outputFileStream);
micInstance.start();
setTimeout(function() {
micInstance.stop();
}, 5000);
When I run the "Example usage with mic:" code for saving the stream as a .wav the resulting file is drastically slowed down. So a 5-second recording is a minimum of 10s. Note that if I speed this audio up in a video editing software it sounds perfect. (Windows 10 / SoX 14.4.1)
//The code
var FileWriter = require('wav').FileWriter;
var mic = require('mic');
var micInstance = mic({
rate: '16000',
channels: '1',
debug: true
});
var micInputStream = micInstance.getAudioStream();
var outputFileStream = new FileWriter('./test.wav', {
sampleRate: 16000,
channels: 1
});
micInputStream.pipe(outputFileStream);
micInstance.start();
setTimeout(function() {
micInstance.stop();
}, 5000);