Spaces:
Sleeping
Sleeping
Download src/types/speech.d.ts from viraj-421/InterviewAI: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/spaces/viraj-421/InterviewAI/resolve/main/src/types/speech.d.ts
- Command line
-
hf download hf://spaces/viraj-421/InterviewAI/src/types/speech.d.ts
-
curl -L -o speech.d.ts https://huggingface.co/spaces/viraj-421/InterviewAI/resolve/main/src/types/speech.d.ts
1.12 kB
| // Web Speech API types for TypeScript | |
| interface SpeechRecognitionEvent extends Event { | |
| results: SpeechRecognitionResultList; | |
| resultIndex: number; | |
| } | |
| interface SpeechRecognitionResultList { | |
| length: number; | |
| item(index: number): SpeechRecognitionResult; | |
| [index: number]: SpeechRecognitionResult; | |
| } | |
| interface SpeechRecognitionResult { | |
| isFinal: boolean; | |
| length: number; | |
| item(index: number): SpeechRecognitionAlternative; | |
| [index: number]: SpeechRecognitionAlternative; | |
| } | |
| interface SpeechRecognitionAlternative { | |
| transcript: string; | |
| confidence: number; | |
| } | |
| interface SpeechRecognition extends EventTarget { | |
| continuous: boolean; | |
| interimResults: boolean; | |
| lang: string; | |
| onresult: ((event: SpeechRecognitionEvent) => void) | null; | |
| onerror: ((event: Event) => void) | null; | |
| onend: (() => void) | null; | |
| start(): void; | |
| stop(): void; | |
| abort(): void; | |
| } | |
| interface SpeechRecognitionConstructor { | |
| new (): SpeechRecognition; | |
| } | |
| declare global { | |
| interface Window { | |
| SpeechRecognition?: SpeechRecognitionConstructor; | |
| webkitSpeechRecognition?: SpeechRecognitionConstructor; | |
| } | |
| } | |
| export {}; | |