File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-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
13+ <break time="1s"/><prosody rate="slow"><lang xml:lang="es-ES">casa</lang></prosody><break time="1s"/>
14+ mean in English?
15+ </speak>
16+ ` ;
17+
18+ var b = `
19+ <speak>
20+ <p>
21+ <s>You have 4 new messages.</s>
22+ <s>The first is from Stephanie Williams and arrived at <break/> 3:45pm.
23+ </s>
24+ <s>
25+ The subject is <prosody rate="-20%">ski trip</prosody>
26+ </s>
27+ </p>
28+ </speak>
29+ `
30+
31+ var utterThis = new SpeechSynthesisUtterance ( a ) ;
32+ // utterThis.voice = window.speechSynthesis.getVoices()[0];
33+ document . getElementById ( "press-to-speak" ) . addEventListener ( "click" , ( ) => {
34+ window . speechSynthesis . speak ( utterThis ) ;
35+ } ) ;
36+
37+ </ script >
38+ </ body >
39+ </ html >
40+
You can’t perform that action at this time.
0 commit comments