Skip to content

Commit 34d782b

Browse files
committed
feat: add timerOptions
1 parent 2282648 commit 34d782b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/ExpoSpeechRecognitionModule.types.ts

+26
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,32 @@ export type ExpoSpeechRecognitionOptions = {
264264
*/
265265
intervalMillis?: number;
266266
};
267+
/**
268+
* Speech timer configuration options for non-continous recognition.
269+
*/
270+
timerOptions?: {
271+
/**
272+
* Default: 1000ms on iOS, unset on Android
273+
*
274+
* https://developer.android.com/reference/android/speech/RecognizerIntent#EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS
275+
*
276+
* The amount of time that it should take after the recognizer stops hearing speech to consider the input complete hence end the recognition session.
277+
*
278+
* 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!
279+
*/
280+
completeSilenceLengthMillis: number;
281+
282+
/**
283+
* Default: 2000ms on iOS, unset on Android
284+
*
285+
* https://developer.android.com/reference/android/speech/RecognizerIntent#EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS
286+
*
287+
* Optional integer to indicate the minimum length of the recognition session. The recognizer will not stop recognizing speech before this amount of time.
288+
*
289+
* 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!
290+
*/
291+
minimumLengthMillis: number;
292+
};
267293
};
268294

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

0 commit comments

Comments
 (0)