Skip to content

Audio drastically slowed down? #30

Description

@behrendCoreysGIT

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions