Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EddyVerbruggen/13b7406db9b61afdf7b92bc8f1c720fc to your computer and use it in GitHub Desktop.
Save EddyVerbruggen/13b7406db9b61afdf7b92bc8f1c720fc to your computer and use it in GitHub Desktop.
Speech Recognition in NativeScript (availability check)
// import the plugin
import { SpeechRecognition } from "nativescript-speech-recognition";
class SpeechRecognition {
// instantiate the plugin
private speechRecognition = new SpeechRecognition();
public checkAvailability(): void {
this.speechRecognition.available().then(
(available: boolean) => console.log(available ? "YES!" : "NO"),
(err: string) => console.log(err)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment