Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
demo page fixes
  • Loading branch information
kripken committed Nov 3, 2011
1 parent d69ec50 commit 14dd87d
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions demo.html
Expand Up @@ -9,38 +9,29 @@
<body>
<h1>speak.js</h1>
<h2>Text-To-Speech on the Web</h2>
<form onsubmit="speak(text.value, { amplitude: amplitude.value, wordgap: workdgap.value, pitch: pitch.value, speed: speed.value /*, voice: language.value */ }); return false">
Text: <input type="text" name="text" size=50 value="Never gonna give, you, up."><br>
<!--Language: <select name="language">
<option value="en/en-us">English (US)</option>
<option value="fr">French</option>
</select><br>-->
Amplitude: <input type="text" name="amplitude" size=5 value="100"><br>
Pitch: <input type="text" name="pitch" size=5 value="50"><br>
Speed: <input type="text" name="speed" size=5 value="175"><br>
Word gap: <input type="text" name="workdgap" size=5 value="0"><br>
<form onsubmit="speak(text.value, { amplitude: amplitude.value, wordgap: workdgap.value, pitch: pitch.value, speed: speed.value }); return false">
Text: <input type="text" name="text" size=50 value="Never gonna give, you, up.">
Amplitude: <input type="text" name="amplitude" size=5 value="100">
Pitch: <input type="text" name="pitch" size=5 value="50">
Speed: <input type="text" name="speed" size=5 value="175">
Word gap: <input type="text" name="workdgap" size=5 value="0">
<input type="submit" value="Go!">
</form>
<hr>
<p>
This demo is 100% clientside JavaScript. It uses <a href="http://espeak.sourceforge.net/">eSpeak</a>, an open source
speech synthesizer, which was compiled from C++ to JavaScript using <a href="http://emscripten.org">Emscripten</a>.
Source code for this demo can be found <a href="https://github.com/kripken/speak.js">here</a>.
The project page and source code for this demo can be found <a href="https://github.com/kripken/speak.js">here</a>.
</p>

<p>
Browser requirements:
<ul>
<li><b>Typed arrays</b>. The eSpeak code is not portable to the extent that would be necessary to avoid using typed arrays.
(It should however be possible to rewrite small bits of eSpeak to fix that.)
This is present in Firefox and Chrome, but not IE, Safari or Opera.</li>
<li><b>Support for WAV audio in data URIs</b>. eSpeak's simplest form of output is a WAV file, and the easiest way to use
that is via a data URI. (It should however be possible to extract the raw audio directly by hacking eSpeak.)
This is present in Firefox, Safari and Opera, but not IE or Chrome.</li>
Typed arrays are present in Firefox and Chrome, but not IE, Safari or Opera.</li>
</ul>
So currently this demo will only work in Firefox. Help is welcome regarding the workarounds mentioned above
that will let it work elsewhere, we would like to develop this demo into a useful project for people to use around the web.
If you want that too, get in touch with us by any of the methods listed at the bottom of <a href="http://emscripten.org">this page</a>.
Note that recent versions of these browsers are needed in most cases.
</p>

<div id="audio"></div>
Expand Down

0 comments on commit 14dd87d

Please sign in to comment.