Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
Add empty space to audio buffer?

I wrote a function that creates mp3 files from an array of buffers of audio content with all of them concatenated.

const generateAudioFile = async ({ fileName, audioContent }) => {
  const writeFile = util.promisify(fs.writeFile);
  await writeFile(
    path.join(__dirname, 'output', `${fileName}.mp3`),
    Buffer.concat(audioContent),
    'binary'
  );
};

While it does what it is supposed to do, there are no gaps between each audio content, and this is what I am trying to fix. I have tried padding some allocated space after each file like so but it does not do the job:

Buffer.concat([...audioContent.map(ac => Buffer.concat([ac, Buffer.alloc(10000)]))])

How can I add some silence between each audio buffer?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!