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

242
Views
How to buffer audio from url using axios in modern javascript

I want to buffer audio from url using axios in modern js not jQuery

var url = 'https://my_image.jpg' // example
url = axios.get(url, { responseType: 'arraybuffer' });
return Buffer.from(url.data);

The above code buffers image, In order to buffer audio like that, What should I do?

I used responseType: 'blob' to buffer audio from url but it couldn't be played, its 0 seconds. But in url its 7 seconds.

var url = 'https://translate.google.com/translate_tts?ie=UTF-8&q=Hello%20Everyone!%20How%20are%20you?&tl=en&total=1&idx=0&textlen=5&client=tw-ob&prev=input&ttsspeed=1'

I wanna buffer the audio url in the above variable using axios in modern js.

Also i need help in making a global regex for '\n'. I wanna replace all '\n' with space ( ' ' )

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!