๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • Tried. Failed. Logged.
๐Ÿ–ฅ๏ธํ”„๋ก ํŠธ์—”๋“œ/HTML | CSS | JAVASCRIPT

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - text to speech(text2speech)(SpeechSynthesisUtterance)

by Janger 2022. 11. 5.
728x90
function say(m) {
  var msg = new SpeechSynthesisUtterance();
  var voices = window.speechSynthesis.getVoices();
  msg.voice = voices[10];
  msg.voiceURI = "native";
  msg.volume = 1;
  msg.rate = 1;
  msg.pitch = 0.8;
  msg.text = m;
  msg.lang = 'en-US';
  speechSynthesis.speak(msg);
}

 

์ถœ์ฒ˜: 

https://stackoverflow.com/questions/15653145/using-google-text-to-speech-in-javascript

 

Using Google Text-To-Speech in Javascript

I need to play Google text-to-speech in JavaScript. The idea is to use the web service: http://translate.google.com/translate_tts?tl=en&q=This%20is%20just%20a%20test And play it on a cert...

stackoverflow.com

 

728x90