kripken / speak.js

Text-to-Speech in JavaScript using eSpeak
GNU General Public License v3.0
1.29k stars 293 forks source link

Processing A Lot Of Text Causes JS to Restart Speech Multiple Times #24

Open ccsnet opened 12 years ago

ccsnet commented 12 years ago

Hi - I'd be happy to provide a private url of the app I have written for this.

Scenario:

Large text var sent to speak ( or speak.play using the other branch ) .... takes time to process...

speak.js: worker processing took 11686.00 ms speakClient.js:128 speak.js: wav processing took 1793.00 ms speakClient.js:115 speak.js: worker processing took 20646.00 ms speakClient.js:128 speak.js: wav processing took 1814.00 ms speakClient.js:115 speak.js: worker processing took 28872.00 ms speakClient.js:128 speak.js: wav processing took 1787.00 ms

Each time the above console error was logged the speech was restarted from the start again. Ideally it needs to be fully loading the speech var and then only process once - even better if some of the processing can go on in the background while speaking to save delays. ( How ever i'm guessing thats what the worker is for ? ).

Terran