ashishbajaj99 / mic

A simple stream wrapper for arecord (Linux (including Raspbian)) and sox (Mac, Windows). Returns a Passthrough stream object so that stream control like pause(), resume(), pipe(), etc. are all available.
MIT License
103 stars 61 forks source link

WAV format generates slowed down audio files? #15

Closed xavicolomer closed 7 years ago

xavicolomer commented 7 years ago

Hi there!

I created a program that generates an audio file everytime there is a silence. Using standard configuration (raw) the files are creating correctly but if I try to generate .wav using the fileType, the first one is created correctly but the other files the speech sounds like the time is slowed down.

I know I can convert them using ffmpeg, but would be great to do it directly. There is a chance the script generating the files (fs.WriteStream) is wrong, but that would also mean raw files should be also broken

Any Idea?

ashishbajaj99 commented 7 years ago

I would check the sampling rate settings...your playback sampling rate must match the recording sampling rate.