OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Chrome TTS Demo</title> |
| 5 <style> |
| 6 body { |
| 7 font-family: arial, helvetica, sans-serif; |
| 8 } |
| 9 .banner { |
| 10 width: 100%; |
| 11 float: left; |
| 12 } |
| 13 .banner_left { |
| 14 padding: 8px; |
| 15 float: left; |
| 16 } |
| 17 .banner_right { |
| 18 padding: 8px; |
| 19 } |
| 20 .body_wrapper { |
| 21 width: 100%; |
| 22 float: left; |
| 23 } |
| 24 .body_left { |
| 25 border: 0; |
| 26 padding: 0; |
| 27 margin: 0; |
| 28 width: 50%; |
| 29 float: left; |
| 30 } |
| 31 .body_right { |
| 32 border: 0; |
| 33 padding: 0; |
| 34 margin: 0; |
| 35 width: 46%; |
| 36 float: left; |
| 37 } |
| 38 .body_inner { |
| 39 padding: 0 32px; |
| 40 } |
| 41 #srctext { |
| 42 width: 100%; |
| 43 font-size: 133%; |
| 44 } |
| 45 .large_button { |
| 46 font-size: 166%; |
| 47 padding: 6pt 12pt 6pt 12pt; |
| 48 } |
| 49 .box { |
| 50 margin: 10px; |
| 51 padding: 10px; |
| 52 border: 1px solid #999; |
| 53 } |
| 54 .tabbable { |
| 55 padding: 10px; |
| 56 border: 1px solid #00C; |
| 57 } |
| 58 table { |
| 59 margin-left: auto; |
| 60 margin-right: auto; |
| 61 } |
| 62 #help { |
| 63 text-align: left; |
| 64 } |
| 65 #voiceInfo { |
| 66 text-align: left; |
| 67 padding: 4px; |
| 68 border: 1px solid #aaa; |
| 69 width: 100%; |
| 70 min-height: 100px; |
| 71 overflow: auto; |
| 72 } |
| 73 </style> |
| 74 <script src="ttsdemo.js"></script> |
| 75 </head> |
| 76 |
| 77 <body onload="load()"> |
| 78 |
| 79 <div class="banner"> |
| 80 <div class="banner_left"> |
| 81 <img src="128.png" class="logo" alt=""> |
| 82 </div> |
| 83 <div class="banner_right"> |
| 84 <h1>Chrome Text-to-Speech Demo</h1> |
| 85 <p> |
| 86 Use this application to try out all of the text-to-speech voices in Chrome
, or |
| 87 <a href="https://chrome.google.com/webstore/search?q=tts">Search the Chrom
e Web Store</a> |
| 88 for more TTS voices. |
| 89 </p> |
| 90 </div> |
| 91 </div> |
| 92 |
| 93 <div class="body_wrapper"> |
| 94 <div class="body_left"> |
| 95 <div class="body_inner"> |
| 96 |
| 97 Enter text here: |
| 98 <textarea id="srctext" rows="6" cols="40">This is a demo of text-to-speech
in Chrome.</textarea> |
| 99 |
| 100 <p> |
| 101 <button class="large_button" onclick="speakUserText()">Speak</button> |
| 102 <button class="large_button" onclick="stop()">Stop</button> |
| 103 </p> |
| 104 |
| 105 <div class="box" id="ttsStatusBox"> |
| 106 TTS status: <b><span id="ttsStatus"></span></b> |
| 107 </div> |
| 108 |
| 109 <p> |
| 110 |
| 111 Click on or tab to these boxes: |
| 112 |
| 113 <p> |
| 114 |
| 115 <span tabindex="0" class="tabbable" onfocus='speak("Alpha");'>Alpha</span> |
| 116 <span tabindex="0" class="tabbable" onfocus='speak("Bravo");'>Bravo</span> |
| 117 <span tabindex="0" class="tabbable" onfocus='speak("Charlie");'>Charlie</s
pan> |
| 118 <span tabindex="0" class="tabbable" onfocus='speak("Delta");'>Delta</span> |
| 119 <span tabindex="0" class="tabbable" onfocus='speak("Echo");'>Echo</span> |
| 120 <span tabindex="0" class="tabbable" onfocus='speak("Foxtrot");'>Foxtrot</s
pan> |
| 121 |
| 122 </div> |
| 123 </div> |
| 124 <div class="body_right"> |
| 125 <div class="body_inner"> |
| 126 |
| 127 <table border="0"> |
| 128 <tr> |
| 129 <td>Voice:</td> |
| 130 <td><select id="voices"> |
| 131 <option value="">Unspecified</option> |
| 132 </select></td> |
| 133 </td> |
| 134 </tr> |
| 135 <tr> |
| 136 <td>Lang:</td> |
| 137 <td><select id="lang"> |
| 138 <option value="">Unspecified</option> |
| 139 <option value="de">de (German)</option> |
| 140 <option value="en-GB">en-GB (British English)</option> |
| 141 <option value="en-US" selected>en-US (American English)</option> |
| 142 <option value="es">es (Spanish)</option> |
| 143 <option value="fr">fr (French)</option> |
| 144 <option value="it">it (Italian)</option> |
| 145 </select></td></tr> |
| 146 <tr> |
| 147 <td>Queuing mode:</td> |
| 148 <td><select id="enqueue"> |
| 149 <option value="">Interrupt</option> |
| 150 <option value="true">Enqueue</option> |
| 151 </select></td></tr> |
| 152 <tr> |
| 153 <td>Rate:</td> |
| 154 <td><input id="rate" type="range" min="0.5" max="4.0" value="1.0" step="
0.1"> |
| 155 </td></tr> |
| 156 <tr> |
| 157 <td>Pitch:</td> |
| 158 <td><input id="pitch" type="range" min="0.0" max="2.0" value="1.0" step=
"0.2"> |
| 159 </td></tr> |
| 160 <tr> |
| 161 <td>Volume:</td> |
| 162 <td><input id="volume" type="range" min="0.0" max="1.0" value="1.0" step
="0.1"> |
| 163 </td></tr> |
| 164 </table> |
| 165 |
| 166 <pre id="voiceInfo"></pre> |
| 167 </div> |
| 168 </div> |
| 169 </div> |
| 170 |
| 171 </body> |
| 172 </html> |
OLD | NEW |