Skip to content

Commit

Permalink
FLUID-5935: update configuration of voice to match finalized API w/er…
Browse files Browse the repository at this point in the history
…rata
  • Loading branch information
waharnum committed Jul 26, 2016
1 parent c0c9d09 commit 8fe2d0c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/documents/TextToSpeechAPI.md
Expand Up @@ -457,15 +457,14 @@ fluid.textToSpeech({
</tbody>
</table>

### voiceURI ###

### voice ###
<!-- See the errata at https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi-errata.html - SpeechSynthesisUtterance must be passed a SpeechSynthesisVoice object to configure the voice under the latest API -->
<table>
<tbody>
<tr>
<th>Description</th>
<td>
The <code>voiceURI</code> attribute is a string that specifies the speech synthesis voice and the location of the speech synthesis service that the web application wishes to use. Calling the <a href="#getvoices">getVoices</a> method returns an array of all available voices, from which you can get the value of the <code>voiceURI</code> attribute.<br />
<strong>Note</strong>: In Chrome and Safari, the <code>voiceURI</code> attribute is named <code>voice</code> instead.
The <code>voice</code> attribute must be a <a href="https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechsynthesisvoice">`SpeechSynthesisVoice`</a> object that specifies the speech synthesis voice that the web application wishes to use. Calling the <a href="#getvoices">getVoices</a> method returns an array of all available voices, from which you can select a valid `SpeechSynthesisVoice`.
</td>
</tr>
<tr>
Expand All @@ -479,10 +478,15 @@ fluid.textToSpeech({
<td>
<pre>
<code>

// Assuming an existing textToSpeech component
var availableVoices = textToSpeech.getVoices();
var voiceToUse = availableVoices[0];

fluid.textToSpeech({
model: {
utteranceOpts: {
voiceURI: "Google UK English Male"
voice: voiceToUse
}
}
});
Expand Down

0 comments on commit 8fe2d0c

Please sign in to comment.