File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE HTML>
2+ < html >
3+ < head >
4+ </ head >
5+ < body >
6+
7+ < button id ="press-to-speak "> Press to speak</ button >
8+
9+ < script >
10+ var a = `
11+ <speak>
12+ What does the Spanish word <lang xml:lang="es-US">casa</lang> mean in English?
13+ </speak>
14+ ` ;
15+
16+ var b = `
17+ <speak>
18+ <p>
19+ <s>You have 4 new messages.</s>
20+ <s>The first is from Stephanie Williams and arrived at <break/> 3:45pm.
21+ </s>
22+ <s>
23+ The subject is <prosody rate="-20%">ski trip</prosody>
24+ </s>
25+ </p>
26+ </speak>
27+ `
28+
29+ var utterThis = new SpeechSynthesisUtterance ( a ) ;
30+ // utterThis.voice = window.speechSynthesis.getVoices()[0];
31+ document . getElementById ( "press-to-speak" ) . addEventListener ( "click" , ( ) => {
32+ window . speechSynthesis . speak ( utterThis ) ;
33+ } ) ;
34+
35+ </ script >
36+ </ body >
37+ </ html >
38+
You can’t perform that action at this time.
0 commit comments