quivr/frontend/lib/helpers/isSpeechRecognitionSupported.ts

10 lines
213 B
TypeScript
Raw Normal View History

export function isSpeechRecognitionSupported() {
if (
typeof window !== "undefined" &&
("SpeechRecognition" in window || "webkitSpeechRecognition" in window)
) {
return true;
}
return false;
}