Fix filename
This commit is contained in:
17
README.md
17
README.md
@ -818,22 +818,7 @@ const standardDeviation = (arr, usePopulation = false) => {
|
|||||||
[⬆ back to top](#table-of-contents)
|
[⬆ back to top](#table-of-contents)
|
||||||
## Media
|
## Media
|
||||||
|
|
||||||
### Speech synthesis (experimental)
|
undefined
|
||||||
|
|
||||||
Use `SpeechSynthesisUtterance.voice` and `indow.speechSynthesis.getVoices()` to convert a message to speech.
|
|
||||||
Use `window.speechSynthesis.speak()` to play the message.
|
|
||||||
|
|
||||||
Learn more about the [SpeechSynthesisUtterance interface of the Web Speech API](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance).
|
|
||||||
|
|
||||||
```js
|
|
||||||
const speak = message => {
|
|
||||||
const msg = new SpeechSynthesisUtterance(message);
|
|
||||||
msg.voice = window.speechSynthesis.getVoices()[0];
|
|
||||||
window.speechSynthesis.speak(msg);
|
|
||||||
};
|
|
||||||
// speak('Hello, World') -> plays the message
|
|
||||||
```
|
|
||||||
|
|
||||||
[⬆ back to top](#table-of-contents)
|
[⬆ back to top](#table-of-contents)
|
||||||
## Object
|
## Object
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user