

[JavaScript] Test Text-to-Speech in Web Speech API
source link: http://siongui.github.io/2017/04/22/javascript-test-tts-in-web-speech-api/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

[JavaScript] Test Text-to-Speech in Web Speech API
April 22, 2017
Test Text-to-Speech (TTS) feature in Web Speech API. Not working in Chromium 57, but working in Firefox 53 (both running on Ubuntu Linux 17.04).
HTML:
<input type="text" value="hello world" id="text"> <button type="button" id="tts">Text to Speech</button>
JavaScript:
var input = document.querySelector("#text"); var tts = document.querySelector("#tts"); tts.addEventListener("click", function(e) { var text = new SpeechSynthesisUtterance(input.value); window.speechSynthesis.speak(text); });
References:
[1]Using Google Text-To-Speech in Javascript - Stack Overflow
[2]Web apps that talk - Introduction to the Speech Synthesis API | Web | Google Developers
[3]javascript - Web speech api not working currently in chromium / electron / nw js? - Stack Overflow
Author: Siong-Ui Te ∈ Category: JavaScript
Recommend
-
63
Having interacted with several apps over the years, there is a very high chance that you have interacted with apps that provide some form of voice experience. It could be an app with text-to-speech functionality like read...
-
33
Serving Intelligent APIs with Google Cloud Run
-
8
Audio Description using the Web Speech API Posted on April 28, 2019 When HTML5 was published, it introduced the <video> and <audio> elements,...
-
8
The Web Speech API is used to incorporate voice data into web apps. In this tutorial, we will build a simple webpage that uses the Web Speech API to implement speech recognition. You can check the browser compatibility for the Web Speech API...
-
9
Web Speech API↑ → Web Speech API Draft Community Group Report, 18 August 2020 This ver...
-
9
Tutorial How To Build a Text-to-Speech App with Web Speech API Development
-
5
JavaScript Text-to-Speech Table of contents Step 1 - Setting Up The AppStep 2 - Checking Browser CompatibilityStep 3 - Testing JavaScript Text-to-Speech
-
7
Some test samples for Text-To-Speech solutions I am doing some research on TTS (Text-To-Speech) recently and noticed three almost state-of-the...
-
4
Easiest way to add text to audio functionality to your apps
-
6
JavaScript TutorialHow To Convert Text to Speech With JavaScriptConvert text to speech easily with the Web Speech API
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK