Answers for "get audio duration node js"

0

get audio duration node js

const { getAudioDurationInSeconds } = require('get-audio-duration');

// From a local path...
getAudioDurationInSeconds('audio.flac').then((duration) => {
  console.log(duration);
});

// From a readable stream...

const fs = require('fs');
const stream = fs.createReadStream('audio.flac');

getAudioDurationInSeconds(stream).then((duration) => {
  console.log(duration);
});
Posted by: Guest on October-22-2021
0

get audio duration node js

$ npm install --save get-audio-duration
Posted by: Guest on October-22-2021

Code answers related to "get audio duration node js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language