Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
react-native-android-voice-persian
Advanced tools
A React Native Voice Recognition Module With Persian Locale support
react-native-android-voice is a speech-to-text library for React Native for the Android Platform with Persian locale support.
##Any Feedback and Ideas are welcome! please use the Issues section above
npm install --save react-native-android-voice-persian
yarn add react-native-android-voice-persian
android/settings.gradle
...
include ':VoiceModule', ':app'
project(':VoiceModule').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-voice-persian')
android/app/build.gradle
...
dependencies {
...
compile project(':VoiceModule')
}
import com.wmjmc.reactspeech.VoicePackage; // <--- import
public class MainApplication extends Application implements ReactApplication {
...
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new VoicePackage()); // <--- added here
}
}
import SpeechAndroid from 'react-native-android-voice-persian';
...
async _buttonClick(){
try{
//More Locales will be available upon release.
var spokenText = await SpeechAndroid.startSpeech("Speak yo", SpeechAndroid.GERMAN);
ToastAndroid.show(spokenText , ToastAndroid.LONG);
}catch(error){
switch(error){
case SpeechAndroid.E_VOICE_CANCELLED:
ToastAndroid.show("Voice Recognizer cancelled" , ToastAndroid.LONG);
break;
case SpeechAndroid.E_NO_MATCH:
ToastAndroid.show("No match for what you said" , ToastAndroid.LONG);
break;
case SpeechAndroid.E_SERVER_ERROR:
ToastAndroid.show("Google Server Error" , ToastAndroid.LONG);
break;
/*And more errors that will be documented on Docs upon release*/
}
}
}
...
This will automatically start recognizing and adjusting for the German Language. On release I'll update these docs with every single Locale available.
Initializes the voice recognition activity and returns what you spoke in text.
Arguments
SpeechAndroid.DEFAULT
This will set the SpeechRecognizer to the default locale of your Android smartphone.
SpeechAndroid.PT /*or*/ SpeechAndroid.PORTUGUESE
SpeechAndroid.BR /*or*/ SpeechAndroid.PORTUGUESE_BRAZIL
SpeechAndroid.BULGARIAN
SpeechAndroid.CANADA
SpeechAndroid.CANADA_FRENCH
SpeechAndroid.CZECH
SpeechAndroid.CROATIAN
SpeechAndroid.CHINA /*or*/ SpeechAndroid.CHINESE /*or*/
SpeechAndroid.SIMPLIFIED_CHINESE /*or*/ SpeechAndroid.TRADITIONAL_CHINESE
SpeechAndroid.DUTCH
SpeechAndroid.DUTCH_BELGIUM
SpeechAndroid.ENGLISH
SpeechAndroid.UK
SpeechAndroid.US
SpeechAndroid.AUSTRALIA
SpeechAndroid.NEW_ZEALAND
SpeechAndroid.SINGAPORE
SpeechAndroid.ENGLISH_INDIA
SpeechAndroid.ENGLISH_IRELAND
SpeechAndroid.ENGLISH_ZIMBABWE
SpeechAndroid.ARABIC_EGYPT
SpeechAndroid.ARABIC_ISRAEL
SpeechAndroid.FRANCE /*or*/ SpeechAndroid.FRENCH
SpeechAndroid.FRENCH_BELGIUM
SpeechAndroid.FRENCH_SWITZERLAND
SpeechAndroid.FINNISH
SpeechAndroid.DANISH
SpeechAndroid.GERMANY /*or*/ SpeechAndroid.GERMAN
SpeechAndroid.GERMAN_SWITZERLAND
SpeechAndroid.GREEK
SpeechAndroid.HEBREW
SpeechAndroid.HINDI
SpeechAndroid.HUNGARIAN
SpeechAndroid.ITALY /*or*/ SpeechAndroid.ITALIAN
SpeechAndroid.ITALIAN_SWITZERLAND
SpeechAndroid.INDONESIAN
SpeechAndroid.LATVIAN
SpeechAndroid.LITHUANIAN
SpeechAndroid.NORWEGIAN
SpeechAndroid.JAPAN /*or*/ SpeechAndroid.JAPANESE
SpeechAndroid.POLISH
SpeechAndroid.PERSIAN
SpeechAndroid.RUSSIAN
SpeechAndroid.ROMANIAN
SpeechAndroid.SPANISH
SpeechAndroid.CATALAN
SpeechAndroid.SPANISH_US
SpeechAndroid.SERBIAN
SpeechAndroid.SLOVAK
SpeechAndroid.SLOVENIAN
SpeechAndroid.SWEDISH
SpeechAndroid.KOREA /*or*/ SpeechAndroid.KOREAN
SpeechAndroid.TAIWAN
SpeechAndroid.TAGALOG_PHILIPPINES
SpeechAndroid.THAI
SpeechAndroid.TURKISH
SpeechAndroid.UKRAINIAN
SpeechAndroid.VIETNAMESE
SpeechAndroid.E_ACTIVITY_DOES_NOT_EXIST
Generic error on current Activity not existing.
SpeechAndroid.E_VOICE_CANCELLED
Voice Recognizer was cancelled
SpeechAndroid.E_FAILED_TO_SHOW_VOICE
Voice Recognizer failed to initialize
SpeechAndroid.E_AUDIO_ERROR
Voice Recognizer encountered some error with the Audio received
SpeechAndroid.E_NETWORK_ERROR
Network error while attempting connection with Google's Servers
SpeechAndroid.E_NO_MATCH
Voice Recognizer did not find any match
SpeechAndroid.E_SERVER_ERROR
Google's Servers encountered an error while processing the request
FAQs
A React Native Voice Recognition Module With Persian Locale support
The npm package react-native-android-voice-persian receives a total of 6 weekly downloads. As such, react-native-android-voice-persian popularity was classified as not popular.
We found that react-native-android-voice-persian demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.