You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, you need open the React Native xCode project and add two new keys into `Info.plist`
24
+
Just right click on `Info.plist` -> `Open As` -> `Source Code` and paste these strings somewhere into root `<dict>` tag
25
+
26
+
```xml
27
+
<key>NSSpeechRecognitionUsageDescription</key>
28
+
<string>Your usage description here</string>
29
+
<key>NSMicrophoneUsageDescription</key>
30
+
<string>Your usage description here</string>
31
+
```
32
+
33
+
Application will crash if you don't do this.
21
34
22
35
## Usage
23
36
Import ApiAi:
@@ -48,8 +61,14 @@ Start listening with integrated speech recognition:
48
61
}}
49
62
/>
50
63
```
64
+
In iOS only you have to call `finishListening()`. Android detects the end of your speech automatically. That's the reason why we didn't implement the finish method in Android.
65
+
```javascript
66
+
// only for iOS
67
+
ApiAi.finishListening();
68
+
// after this call your callbacks from the startListening will be executed.
69
+
```
51
70
52
-
Usage of `onListeningStarted`, `onListeningCanceled`, `onListeningFinished` and `onAudioLevel`:
71
+
Only in Android we have four additional methods: `onListeningStarted`, `onListeningCanceled`, `onListeningFinished` and `onAudioLevel`. In iOS they will be never called:
0 commit comments