react-native-rn-speech-to-text 0.1.2 → 0.1.3
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 +16 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,20 @@ react-native-rn-speech-to-text is a React Native library that enables real-time
|
|
|
8
8
|
npm install react-native-rn-speech-to-text
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## For Lower Android Versions (Below Android 12)
|
|
12
|
+
|
|
13
|
+
Add the following inside your AndroidManifest.xml:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
<manifest ...>
|
|
17
|
+
<queries>
|
|
18
|
+
<intent>
|
|
19
|
+
<action android:name="android.speech.RecognitionService" />
|
|
20
|
+
</intent>
|
|
21
|
+
</queries>
|
|
22
|
+
</manifest>
|
|
23
|
+
```
|
|
24
|
+
|
|
11
25
|
## Usage
|
|
12
26
|
|
|
13
27
|
```js
|
|
@@ -30,8 +44,8 @@ import {
|
|
|
30
44
|
} from 'react-native-rn-speech-to-text';
|
|
31
45
|
|
|
32
46
|
export default function App() {
|
|
33
|
-
const [text, setText] = useState
|
|
34
|
-
const [status, setStatus] = useState
|
|
47
|
+
const [text, setText] = useState('');
|
|
48
|
+
const [status, setStatus] = useState('Idle');
|
|
35
49
|
|
|
36
50
|
// 🔐 Request Microphone Permission
|
|
37
51
|
const requestMicPermission = async (): Promise<boolean> => {
|