Skip to content

Commit

Permalink
chore: update docs for getSpeechRecognizerPermissionsAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
jamsch committed Nov 19, 2024
1 parent 8d40629 commit eef1cd0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,21 @@ ExpoSpeechRecognitionModule.getMicrophonePermissionsAsync().then((result) => {
> [!NOTE]
> This is only supported on iOS.
Checks the current permissions to use network-based recognition for [`SFSpeechRecognizer`](https://developer.apple.com/documentation/speech/sfspeechrecognizer) for iOS.

```ts
import { ExpoSpeechRecognitionModule } from "expo-speech-recognition";

ExpoSpeechRecognitionModule.getSpeechRecognizerPermissionsAsync().then(
(result) => {
console.log("Status:", result.status); // "granted" | "denied" | "not-determined"
console.log("Granted:", result.granted); // true | false
console.log("Can ask again:", result.canAskAgain); // true | false
console.log("Expires:", result.expires); // "never" | number
},
);
```

### `getStateAsync(): Promise<SpeechRecognitionState>`

Returns the current internal state of the speech recognizer.
Expand Down

0 comments on commit eef1cd0

Please sign in to comment.