Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ios non continuous recognition timers #48

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expo-speech-recognition",
"version": "0.2.24",
"version": "0.2.23",
"description": "Speech Recognition for React Native Expo projects",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
26 changes: 26 additions & 0 deletions src/ExpoSpeechRecognitionModule.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,32 @@ export type ExpoSpeechRecognitionOptions = {
*/
intervalMillis?: number;
};
/**
* Speech timer configuration options for non-continous recognition.
*/
timerOptions?: {
/**
* Default: 1000ms on iOS, unset on Android
*
* https://developer.android.com/reference/android/speech/RecognizerIntent#EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS
*
* The amount of time that it should take after the recognizer stops hearing speech to consider the input complete hence end the recognition session.
*
* Note that it is extremely rare you'd want to specify this value. Note also that certain values may cause undesired or unexpected results - use judiciously!
*/
completeSilenceLengthMillis: number;

/**
* Default: 2000ms on iOS, unset on Android
*
* https://developer.android.com/reference/android/speech/RecognizerIntent#EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS
*
* Optional integer to indicate the minimum length of the recognition session. The recognizer will not stop recognizing speech before this amount of time.
*
* Note that it is extremely rare you'd want to specify this value. Note also that certain values may cause undesired or unexpected results - use judiciously!
*/
minimumLengthMillis: number;
};
};

export type IOSTaskHintValue = (typeof TaskHintIOS)[keyof typeof TaskHintIOS];
Expand Down