expo-speech-recognition 57.1.0 → 58.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/android/src/main/java/expo/modules/speechrecognition/ExpoSpeechRecognitionModule.kt +10 -2
- package/android/src/main/java/expo/modules/speechrecognition/ExpoSpeechService.kt +12 -2
- package/build/ExpoSpeechRecognitionModule.web.d.ts +1 -1
- package/build/ExpoSpeechRecognitionModule.web.d.ts.map +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -64,6 +64,8 @@ expo-speech-recognition implements the iOS [`SFSpeechRecognizer`](https://develo
|
|
|
64
64
|
npm install expo-speech-recognition
|
|
65
65
|
|
|
66
66
|
# Or for older SDKs:
|
|
67
|
+
npm install expo-speech-recognition@^57.0.0 # Expo SDK 57
|
|
68
|
+
npm install expo-speech-recognition@^56.0.0 # Expo SDK 56
|
|
67
69
|
npm install expo-speech-recognition@sdk-54
|
|
68
70
|
npm install expo-speech-recognition@sdk-53
|
|
69
71
|
```
|
|
@@ -458,7 +458,11 @@ class ExpoSpeechRecognitionModule : Module() {
|
|
|
458
458
|
"installedLocales" to installedLocales,
|
|
459
459
|
),
|
|
460
460
|
)
|
|
461
|
-
|
|
461
|
+
try {
|
|
462
|
+
recognizer.destroy()
|
|
463
|
+
} catch (e: Throwable) {
|
|
464
|
+
// Ignore Android framework bug where unbindService throws IllegalArgumentException
|
|
465
|
+
}
|
|
462
466
|
}
|
|
463
467
|
|
|
464
468
|
override fun onError(error: Int) {
|
|
@@ -477,7 +481,11 @@ class ExpoSpeechRecognitionModule : Module() {
|
|
|
477
481
|
)
|
|
478
482
|
}, 50)
|
|
479
483
|
|
|
480
|
-
|
|
484
|
+
try {
|
|
485
|
+
recognizer.destroy()
|
|
486
|
+
} catch (e: Throwable) {
|
|
487
|
+
// Ignore Android framework bug where unbindService throws IllegalArgumentException
|
|
488
|
+
}
|
|
481
489
|
}
|
|
482
490
|
},
|
|
483
491
|
)
|
|
@@ -119,7 +119,12 @@ class ExpoSpeechService(
|
|
|
119
119
|
log("Start recognition.")
|
|
120
120
|
|
|
121
121
|
// Destroy any previous SpeechRecognizer / audio recorder
|
|
122
|
-
|
|
122
|
+
try {
|
|
123
|
+
speech?.destroy()
|
|
124
|
+
} catch (e: Throwable) {
|
|
125
|
+
// Ignore Android framework bug where unbindService throws IllegalArgumentException
|
|
126
|
+
}
|
|
127
|
+
speech = null
|
|
123
128
|
audioRecorder?.stop()
|
|
124
129
|
audioRecorder = null
|
|
125
130
|
delayedFileStreamer?.close()
|
|
@@ -241,7 +246,12 @@ class ExpoSpeechService(
|
|
|
241
246
|
} catch (e: Exception) {
|
|
242
247
|
// do nothing
|
|
243
248
|
}
|
|
244
|
-
|
|
249
|
+
try {
|
|
250
|
+
speech?.destroy()
|
|
251
|
+
} catch (e: Throwable) {
|
|
252
|
+
// Ignore Android framework bug where unbindService throws IllegalArgumentException
|
|
253
|
+
}
|
|
254
|
+
speech = null
|
|
245
255
|
stopRecording()
|
|
246
256
|
soundState = SoundState.INACTIVE
|
|
247
257
|
sendEvent("end", null)
|
|
@@ -44,6 +44,6 @@ declare class ExpoSpeechRecognitionModuleWeb extends NativeModule<ExpoSpeechReco
|
|
|
44
44
|
setAudioSessionActiveIOS(): void;
|
|
45
45
|
isRecognitionAvailable(): boolean;
|
|
46
46
|
}
|
|
47
|
-
export declare const ExpoSpeechRecognitionModule:
|
|
47
|
+
export declare const ExpoSpeechRecognitionModule: ExpoSpeechRecognitionModuleWeb;
|
|
48
48
|
export {};
|
|
49
49
|
//# sourceMappingURL=ExpoSpeechRecognitionModule.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoSpeechRecognitionModule.web.d.ts","sourceRoot":"","sources":["../src/ExpoSpeechRecognitionModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;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mBAAmB;;;IAMnB,2BAA2B;IAI3B,iBAAiB;IAIjB,kCAAkC;;;;IAUlC,cAAc;IAId,oCAAoC;;;;;IAWpC,wBAAwB;IAIxB,sBAAsB;CAOvB;AAoGD,eAAO,MAAM,2BAA2B,gCAGvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-speech-recognition",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "58.0.0",
|
|
4
4
|
"description": "Speech Recognition for React Native Expo projects",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -43,10 +43,12 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@changesets/cli": "^2.31.0",
|
|
45
45
|
"@types/dom-speech-recognition": "^0.0.11",
|
|
46
|
-
"@types/react": "~19.
|
|
47
|
-
"expo": "~
|
|
46
|
+
"@types/react": "~19.3.0",
|
|
47
|
+
"expo": "~58.0.11",
|
|
48
48
|
"expo-module-scripts": "^56.0.3",
|
|
49
49
|
"globals": "17.6.0",
|
|
50
|
+
"react": "^19.3.0",
|
|
51
|
+
"react-native": "^0.88.0",
|
|
50
52
|
"typescript": "~6.0.3",
|
|
51
53
|
"typescript-eslint": "8.59.0"
|
|
52
54
|
},
|