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

292
Views
javascript de "texto a voz" de Microsoft Azure, evento onend

Buenos días.

Estoy creando un sitio web, integrando la API de texto a voz de Microsoft. Y necesito activar una función cuando el audio termine de reproducirlo.

He estado investigando mucho, pero no encontré ningún método que realmente funcione.

Algún evento "onend" que funcione.

¿Sabes cómo podría lograr esto? Gracias

 startSpeakTextAsyncButton.addEventListener("click", function () { startSpeakTextAsyncButton.disabled = true; resultDiv.innerHTML = ""; synthesizer = new SpeechSDK.SpeechSynthesizer(speechConfig); synthesizer.speakTextAsync( phraseDiv.value, function (result) { startSpeakTextAsyncButton.disabled = false; resultDiv.innerHTML = "synthesis in process"; if (result.reason === SpeechSDK.ResultReason.SynthesizingAudioCompleted) { resultDiv.innerHTML = "synthesis finished"; } else if (result.reason === SpeechSDK.ResultReason.Canceled) { resultDiv.innerHTML = "synthesis failed. Error detail: " + result.errorDetails + "\n"; } synthesizer.close(); synthesizer = undefined; }, function (err) { startSpeakTextAsyncButton.disabled = false; resultDiv.innerHTML = "Error: "; resultDiv.innerHTML = err; resultDiv.innerHTML = "\n"; window.console.log(err); synthesizer.close(); synthesizer = undefined; }); });
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!