expo-speech-recognition 3.1.0 → 3.1.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # expo-speech-recognition
2
2
 
3
+ ## 3.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 356a4d7: (iOS) Fixed a crash on audio route changes when the audio input node isn't ready
8
+
3
9
  ## 3.1.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # 🎙️ expo-speech-recognition
2
2
 
3
- ![NPM Version](https://img.shields.io/npm/v/expo-speech-recognition)
3
+ [![NPM Version](https://img.shields.io/npm/v/expo-speech-recognition)](https://www.npmjs.com/package/expo-speech-recognition)
4
4
 
5
5
  expo-speech-recognition implements the iOS [`SFSpeechRecognizer`](https://developer.apple.com/documentation/speech/sfspeechrecognizer), Android [`SpeechRecognizer`](https://developer.android.com/reference/android/speech/SpeechRecognizer) and Web [`SpeechRecognition`](https://wicg.github.io/speech-api/) for React Native projects with the goal of code reuse across web and mobile.
6
6
 
@@ -782,6 +782,11 @@ actor ExpoSpeechRecognizer: ObservableObject {
782
782
  let newEngine = AVAudioEngine()
783
783
  let inputNode = newEngine.inputNode
784
784
  let audioFormat = Self.getAudioFormat(forEngine: newEngine)
785
+
786
+ guard !Self.audioInputIsBusy(audioFormat) else {
787
+ return false
788
+ }
789
+
785
790
  let mixerNode = AVAudioMixerNode()
786
791
  newEngine.attach(mixerNode)
787
792
  newEngine.connect(inputNode, to: mixerNode, format: audioFormat)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-speech-recognition",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "Speech Recognition for React Native Expo projects",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",