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

469
Views
How to download dynamic generated audio from Web Speech API (window.speechSynthesis.speak()) call?

I have this code right here which download Dynamic generated Audio from speechSynthesis API, But every time click the download button it says the file is not supported or the file extension is incorrect, So please can any one help me with this ?

const button = document.getElementById("a1")

button.addEventListener('click',function(data , name = "try.mp3"){
  
  var voiceVal =  synth.speak(speakText)

  const blob = new Blob([voiceVal], {type:"audio/mpeg"})
  const href = URL.createObjectURL(blob)

  const a = Object.assign(document.createElement('a'),  {
    href,
    style:"display:none",
    download:"try"

  });

  document.body.appendChild(a)

  a.click()
  URL.revokeObjectURL(href)
  a.remove()
})
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!