Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Talking Web Apps by @odelaguila
Search
gdljs
February 24, 2016
Technology
46
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Talking Web Apps by @odelaguila
Slides de la décima sesión de GDLJS del 23 de Febrero
Talking web apps
gdljs
February 24, 2016
Transcript
27 slides
Talking web apps
Orlando Del Aguila
None
@eatcodetravel eatcodetravel.com hashlabs.com
Talking web apps
Speech Synthesis API Web Speech API
Speech Synthesis API Web Speech API
Support Speech Synthesis
API Speech Synthesis Volume Rate Pitch Language Voice
API Speech Synthesis 1 var msg, voices; 2 msg =
new SpeechSynthesisUtterance(); 3 voices = window.speechSynthesis.getVoices(); 4 5 // some voices don't support altering params 6 msg.voice = voices[10]; 7 msg.voiceURI = 'native'; 8 msg.volume = 1; // 0 to 1 9 msg.rate = 1; // 0.1 to 10 10 msg.pitch = 2; //0 to 2 11 msg.text = 'Hello World'; 12 msg.lang = 'en-US';
API Speech Synthesis 1 var msg, voices; 2 msg =
new SpeechSynthesisUtterance(); 3 voices = window.speechSynthesis.getVoices(); 4 5 6 7 8 9 10 11 12 13
API Speech Synthesis 4 5 // some voices don't support
altering params 6 msg.voice = voices[10]; 7 msg.voiceURI = 'native'; 8 msg.volume = 1; // 0 to 1 9 msg.rate = 1; // 0.1 to 10 10 msg.pitch = 1; //0 to 2 11 msg.text = 'Hello World'; 12 msg.lang = ‘en-US'; 13 speechSynthesis.speak(msg); 1 2 3
API Speech Synthesis 1 // speechSynthesis has a queue, 2
// and you don't need to worry about it. 3 speechSynthesis.speak(msg); 4 speechSynthesis.cancel(); 5 speechSynthesis.pause(); 6 speechSynthesis.resume();
API Speech Synthesis 1 // SpeechSynthesisUtterance has events 2 var
msg = new SpeechSynthesisUtterance(); 3 4 msg.onstart = function onstart() {}; 5 msg.onend = function onend() {}; 6 msg.onerror = function onerror() {}; 7 msg.onpause = function onpause() {}; 8 msg.onboundary = function onboundary() {};
Speech Synthesis API DEMO
Speech Synthesis API Web Speech API
Support Web Speech API
API Language Continuous InterimResults Web Speech API
API onstart onend onresults onerror Web Speech API
API Web Speech API 1 // notice the webkit prefix
2 var recognition; 3 recognition = new webkitSpeechRecognition(); 4 recognition.lang = 'es-VE'; 5 recognition.continuous = true; 6 recognition.interimResults = false; 7 8 // Events 9 recognition.onstart = function () {}; 10 recognition.onend = function () {}; 11 recognition.onresult = function () {}; 12 recognition.onerror = function () {}; 13 recognition.start();
API Web Speech API 1 2 3 4 5 6
7 8 9 10 11 12 13 11 recognition.onresult = function () {};
API Web Speech API 1 recognition.onresult = function (event) {
2 var length, transcript, msg; 3 length = event.results.length - 1; 4 transcript = event.results[length][0].transcript; 5 transcript = transcript.trim(); 6 7 console.log(transcript); 8 9 msg = new SpeechSynthesisUtterance(message); 10 msg.text = message; 11 window.speechSynthesis.speak(msg); 12 }
Web Speech API DEMO
Resources
Web apps that talk Voice driven apps MDN Web Speech
API Web Speech API Spec
QA
Thanks
More Decks by gdljs
See All by gdljs
Construyendo la mejor experiencia de pagos en línea by @IvanChukitow
gdljs
0
84
Testabilidad en Javascript by @codingpains
gdljs
0
52
Desarrollo de aplicaciones con react native by @charliesbox
gdljs
0
140
¿Debería usar la librería de moda en mi proyecto? by @siedrix
gdljs
0
200
Agile Gamification by @chukitow
gdljs
0
69
Por qué hicimos nuestro propio NodeJS framework by @sgarza
gdljs
0
48
¿Cómo empezar a programar? by @amicavi
gdljs
0
110
Concurrencia y Paralelismo en Javascript by @eatcodetravel
gdljs
0
600
Caldo de Kafka para Node by @albertain
gdljs
0
87
Other Decks in Technology
See All in Technology
プラガブルで宣言的なソフトウェアファクトリーを支えるTypeScript
timakin
2
750
ポケモンバトルのAIエージェント
koji_kawamura
0
230
メディアアートを〈拡張〉する——器官学と個体化論を手がかりに
_kotobuki_
0
160
HTTP通信に使おうとすると実はめんどくさいfile_get_contents
maguroalternative
0
260
SBOM 生成ツールで 2026 Minimum Elements はどこまで満たせるのか
gokken
0
160
Metadata - Section 4 : MODS (Metadata Object Description Schema )
mohab1
0
110
[DBRE Summit 26] DBRE はデータベース運用をどう変えたのか
_awache
0
130
[関西Kaggler会 20261113] 続・コミュニティコンペのススメ
nejumi
0
200
お風呂場をサーバルームにしよう
yusuke427
0
400
Del vibe coding a un Desarrollo (agéntico) fiable
jcabot
0
220
Is the Website Dying?
miriamschwab
0
170
常時稼働エージェントの作り方(Claude公式ブログを資料化)
minorun365
PRO
20
29k
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Scaling GitHub
holman
464
140k
What's in a price? How to price your products and services
michaelherold
247
13k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
410
30 Presentation Tips
portentint
PRO
1
480
Web Performance Is a Journey [PerfNow 2026]
tammyeverts
2
150
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
470
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
580
Automating Front-end Workflow
addyosmani
1370
210k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k