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

567
Views
Cómo convertir MP3 de TTS (Texto a voz)

He hecho la funcionalidad de texto a voz usando el enlace mencionado a continuación: -

MDN - https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance

Ejemplo de MDN : https://mdn.github.io/web-speech-api/speak-easy-síntesis/

Quiero convertirlo en un archivo MP3 con una voz específica, es decir, mencionada en el menú desplegable Seleccionar voz . ¿Cómo puedo lograr eso?

Nota: - Quiero lograr esta funcionalidad usando JS o PHP

A continuación se muestra mi código

 var inputSpeakBtn = document.querySelector('.btn-test-voice'); var inputTxt = document.querySelector('#your-text'); var voiceSelect = document.querySelector('#new-voice-list'); var synth = window.speechSynthesis; setTimeout(() => { var voices = synth.getVoices(); for (let index = 0; index < voices.length; index++) { const voicesElement = voices[index]; var option = document.createElement('option'); option.textContent = voicesElement.name + ' (' + voicesElement.lang + ')'; option.value = index; voiceSelect.appendChild(option); } inputSpeakBtn.addEventListener('click', function() { var utterThis = new SpeechSynthesisUtterance(inputTxt.value); utterThis.voice = voices[voiceSelect.value]; synth.speak(utterThis); inputTxt.blur(); }) }, 1000);
 <div class="form-group col-md-12 form-new-voice use-tts"> <label for="">Your Text</label> <input id="your-text" type="text" class="form-control" placeholder=""> <label for="" class="mt-2">Select Voice</label> <select id="new-voice-list" class="form-control"> </select> <button class="btn btn-primary btn-test-voice mt-2">Test Voice</button> <button class="btn btn-primary btn-download mt-2">Download</button> </div>

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!