웹사이트 History 2026/06/06 영어/일본어 텍스트를 음성으로 변환 재생(Text-to-Speech)
본문
TTS는 Text-to-Speech의 약자로,
컴퓨터나 스마트폰이 텍스트(문자)를 인공 음성으로 읽어주는 ‘문자 음성 자동 변환’ 기술을 뜻합니다.
텍스트-음성 재생 메뉴 하단에
https://www.tokwok.com/bbs/group.php?gr_id=tts
영어 / 일본어 게시판이 있습니다.
브라우저 자체 지원 엔진 Web Speech API (HTML5)를 활용하였습니다.
외국어 학습에 유용하게 활용하시기 바랍니다.
------
view.skin.php
<script>
let speech = new SpeechSynthesisUtterance();
speech.lang = 'en-US'; // 언어 설정
function speakText(text) {
window.speechSynthesis.cancel(); // 이전 재생 중지
speech.text = text;
window.speechSynthesis.speak(speech);
}
function stopSpeech() {
window.speechSynthesis.cancel();
}
</script>
<button type="button" onclick="speakText('<?php echo addslashes(str_replace(array("\r", "\n"), "", strip_tags($view['wr_content']))); ?>')">
추천0
댓글목록 0
등록된 댓글이 없습니다.
