split audio silence
split audio silence takes an mp3 stream and is separates the audio buffer into multiple audio buffers and manifest to be able to stitch those files back together with the silence.
usage
;; const segments = await ;console; /* something like[ { buffer: <Buffer> }, { pause: 4 }, { buffer: <Buffer> }]*/
Buffers are at this time PCM data so if you would like to write them back into mp3 there is a method on the segments, toMP3Stream
, that return a passthrough stream you can pipe from.
const segments = await segments