Tiny Node.js module to concat your audio files (.wav format) without any gap
npm install wav-concatWav-concat node.js module to concat multiple wav audio files using ffmpeg
wav-contat provides a programmatic interface to do basically the same as calling ffmpeg via CLI like:
``
ffmpeg -i audio1.wav audio2.wav audio3.wav -y -filter_complex concat=n=3:v=0:a=1 out.wav
`
- ffmpeg
You can download static builds of ffmpeg from here.
If you want to use wav-concat in Heroku, you could use the ffmpeg2 buildpack
`bash`
npm install wav-concat
`js
var wavconcat = require('wav-concat')
var songs = [
'audio1.wav',
'audio2.wav',
'audio3.wav'
]
wavconcat(songs)
.concat('out.wav')
.on('start', function (command) {
console.log('ffmpeg process started:', command)
})
.on('error', function (err, stdout, stderr) {
console.error('Error:', err)
console.error('ffmpeg stderr:', stderr)
})
.on('end', function (output) {
console.error('Audio created in:', output)
})
`
Take a look to the programmatic API for more details
wav-concat constructor. You should pass an
array with the desired audio files.Supported audio formats:
wav#### wav-concat#concat(output)
Merge wav files and generate the output audio to the given file path.
$3
Type: stringCurrent package semantic version
$3
Type: function`fluent-ffmpeg API constructor
MIT © Thomas Cosialls