Techumber

JavaScript Text To Speech

Github avatar
April 30, 2019.1 min read

Simple JavaScript speech synthesis.

const speak = (message: string) => { var msg = new SpeechSynthesisUtterance(message); var voices = window.speechSynthesis.getVoices(); msg.voice = voices[0]; window.speechSynthesis.speak(msg); };

Example

Techumber @ 2022