Open History to see the last commit
1// This one is vibe-coded for a quick demo - use at your own risk :)
2interface SpeechRecognition extends EventTarget {
3 continuous: boolean
4 interimResults: boolean
5 lang: string
6 start: () => void
7 stop: () => void
8 abort: () => void
9 onaudiostart: ((this: SpeechRecognition, ev: Event) => any) | null
10 onaudioend: ((this: SpeechRecognition, ev: Event) => any) | null
11 onend: ((this: SpeechRecognition, ev: Event) => any) | null
12 onerror:
13 | ((this: SpeechRecognition, ev: SpeechRecognitionErrorEvent) => any)
14 | null
15 onnomatch:
16 | ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any)
17 | null
18 onresult:
19 | ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any)
20 | null
21 onsoundstart: ((this: SpeechRecognition, ev: Event) => any) | null
22 onsoundend: ((this: SpeechRecognition, ev: Event) => any) | null
23 onspeechend: ((this: SpeechRecognition, ev: Event) => any) | null
24 onstart: ((this: SpeechRecognition, ev: Event) => any) | null
25}
26
27interface SpeechRecognitionStatic {
28 new (): SpeechRecognition
29}
30
31interface SpeechRecognitionEvent extends Event {
32 resultIndex: number
33 results: SpeechRecognitionResultList
34}
35
36interface Window {
37 webkitSpeechRecognition?: SpeechRecognitionStatic
38 SpeechRecognition?: SpeechRecognitionStatic
39}