A wrapper to uplift any TextInput in react native, providing speech-to-text support in more than 20 languages
Use // @ts-ignore
when importing SpeechtoTextWrapper
-
pnpm i @agrigate/speech-to-text-wrapper
oryarn add @agrigate/speech-to-text-wrapper
ornpm i @agrigate/speech-to-text-wrapper
-
Make sure to add required permissions in
AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
import SpeechtoTextWrapper from "@agrigate/speech-to-text-wrapper";
<SpeechtoTextWrapper locale="en-IN">
# <TextInput style={{ borderWidth: 1, }} value={text} onChangeText={v => settext(v)} /> [ANY TEXT INPUT]
</SpeechtoTextWrapper>
locale | [optional, default is "en-US"] | give your desired lang locale & it'll render in that |
Language Name | Code |
---|---|
English (US) | en-US |
English (India) | en-IN |
Hindi (India) | hi-IN |
Bengali (India) | bn-IN |
Tamil (India) | ta-IN |
Telugu (India) | te-IN |
Kannada (India) | kn-IN |
Marathi (India) | mr-IN |
Gujarati (India) | gu-IN |
Malayalam (India) | ml-IN |
Punjabi (India) | pa-IN |
Urdu (India) | ur-IN |
French | fr-FR |
German | de-DE |
Spanish (Spain) | es-ES |
Spanish (Mexico) | es-MX |
Arabic (UAE) | ar-AE |
Chinese (Mandarin, China) | zh-CN |
Japanese | ja-JP |
Korean | ko-KR |
Feel free to checkout what we do here