javascripthtmltext-to-speechvoicespeech

Synthesize speech from text in web app


How can one synthesize speech in a web app?

Is there a way using the HTML5 Web Speech API?

For example, if I wanted to synthesize the sentence 'A quick brown fox jumps over the lazy dog', how could I do that without playing a pre-recorded file of someone reading exactly that sentence


Solution

  • As it is right now, the SpeechSynthesis features which are part of the Web Speech API Specification have not been implemented in any browser yet.

    However, you can have a look at this Chrome extension.

    EDIT:

    It seems that the lastest Chrome Canary build might include the feature, however it only specifies that the feature has been started (http://www.chromestatus.com/features) and I was unable to find any more substantive information about it.

    EDIT2:

    As mentionned in the comments by @cdf, it seems that you can now play around with that feature by launching chrome with the --enable-speech-synthesis flag. Please see this post.

    EDIT3:

    This appears to be in Webkit now, but not on iOS at the moment. Not even in Chrome on iOS. Demo @BrandonAaskov