ARNO*

Geek dilettante habitant une belle et grande propriété sur la Côte d’améthyste

  • Lecture du moment: Talking Web Pages and the Speech Synthesis API
    http://www.sitepoint.com/talking-web-pages-and-the-speech-synthesis-api

    The first object we need to learn about is the SpeechSynthesisUtterance object. It represents the utterance (i.e. the text) that will be spoken by the synthesizer. This object is pretty flexible, and can be customized in several ways. Apart from the text, we can set the language used to pronounce the text, the speed rate, and even the pitch. The following is a list of its properties:

    – text – A string that specifies the utterance (text) to be synthesized.
    – lang – A string representing the language of the speech synthesis for the utterance (for example “en-GB” or “it-IT”).
    – voiceURI – A string that specifies the speech synthesis voice and the location of the speech synthesis service that the web application wishes to use.
    – volume – A number representing the volume for the text. It ranges from 0 (minimum) to 1 (maximum) inclusive, and the default value is 1.
    – rate – A number representing the speaking rate for the utterance. It is relative to the default rate for the voice. The default value is 1. A value of 2 means that the utterance will be spoken at twice the default speed. Values below 0.1 or above 10 are disallowed.
    – pitch – A number representing the speaking pitch for the utterance. It ranges from 0 (minimum) to 2 (maximum) inclusive. The default value is 1.