File tree 1 file changed +14
-19
lines changed
1 file changed +14
-19
lines changed Original file line number Diff line number Diff line change @@ -104,26 +104,21 @@ function App() {
104
104
});
105
105
106
106
const handleStart = async () => {
107
- try {
108
- const result =
109
- await ExpoSpeechRecognitionModule .requestPermissionsAsync ();
110
- if (! result .granted ) {
111
- console .warn (" Permissions not granted" , result );
112
- return ;
113
- }
114
- // Start speech recognition
115
- await ExpoSpeechRecognitionModule .start ({
116
- lang: " en-US" ,
117
- interimResults: true ,
118
- maxAlternatives: 1 ,
119
- continuous: false ,
120
- requiresOnDeviceRecognition: false ,
121
- addsPunctuation: false ,
122
- contextualStrings: [" Carlsen" , " Nepomniachtchi" , " Praggnanandhaa" ],
123
- });
124
- } catch (error ) {
125
- console .error (" Error starting speech recognition:" , error );
107
+ const result = await ExpoSpeechRecognitionModule .requestPermissionsAsync ();
108
+ if (! result .granted ) {
109
+ console .warn (" Permissions not granted" , result );
110
+ return ;
126
111
}
112
+ // Start speech recognition
113
+ ExpoSpeechRecognitionModule .start ({
114
+ lang: " en-US" ,
115
+ interimResults: true ,
116
+ maxAlternatives: 1 ,
117
+ continuous: false ,
118
+ requiresOnDeviceRecognition: false ,
119
+ addsPunctuation: false ,
120
+ contextualStrings: [" Carlsen" , " Nepomniachtchi" , " Praggnanandhaa" ],
121
+ });
127
122
};
128
123
129
124
return (
You can’t perform that action at this time.
0 commit comments