initial commit
This commit is contained in:
22
types/react-speech-recognition.d.ts
vendored
Normal file
22
types/react-speech-recognition.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
declare module 'react-speech-recognition' {
|
||||
export interface SpeechRecognitionOptions {
|
||||
continuous?: boolean
|
||||
language?: string
|
||||
}
|
||||
|
||||
export interface UseSpeechRecognitionReturn {
|
||||
transcript: string
|
||||
listening: boolean
|
||||
resetTranscript: () => void
|
||||
browserSupportsSpeechRecognition: boolean
|
||||
isMicrophoneAvailable: boolean
|
||||
}
|
||||
|
||||
export function useSpeechRecognition(): UseSpeechRecognitionReturn
|
||||
|
||||
export default class SpeechRecognition {
|
||||
static startListening(options?: SpeechRecognitionOptions): void
|
||||
static stopListening(): void
|
||||
static abortListening(): void
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user