forked from rescript-lang/experimental-rescript-webapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpeechSynthesis.res
More file actions
35 lines (29 loc) · 890 Bytes
/
SpeechSynthesis.res
File metadata and controls
35 lines (29 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
open WebSpeechAPI
include EventTarget.Impl({
type t = speechSynthesis
})
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis/speak)
*/
@send
external speak: (speechSynthesis, speechSynthesisUtterance) => unit = "speak"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis/cancel)
*/
@send
external cancel: speechSynthesis => unit = "cancel"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis/pause)
*/
@send
external pause: speechSynthesis => unit = "pause"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis/resume)
*/
@send
external resume: speechSynthesis => unit = "resume"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis/getVoices)
*/
@send
external getVoices: speechSynthesis => array<speechSynthesisVoice> = "getVoices"