All Projects → JoaoCnh → react-native-android-voice

JoaoCnh / react-native-android-voice

Licence: MIT license
react-native-android-voice is a speech-to-text library for React Native for the Android Platform.

Programming Languages

java
68154 projects - #9 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-android-voice

africastalking.Net
Africa's Talking API Wrapper for C#
Stars: ✭ 16 (-84%)
Mutual labels:  voice
SignDetect
This application is developed to help speechless people interact with others with ease. It detects voice and converts the input speech into a sign language based video.
Stars: ✭ 21 (-79%)
Mutual labels:  voice
mattermost-plugin-voice
Mattermost plugin for voice messaging. 🎤 🔉
Stars: ✭ 64 (-36%)
Mutual labels:  voice
mumble-discord-bridge
A simple voice bridge between Mumble and Discord.
Stars: ✭ 123 (+23%)
Mutual labels:  voice
JustAnotherVoiceChat
TeamSpeak 3 plugin to control 3D voice communication in games
Stars: ✭ 21 (-79%)
Mutual labels:  voice
opensource-voice-tools
A repo listing known open source voice tools, ordered by where they sit in the voice stack
Stars: ✭ 21 (-79%)
Mutual labels:  voice
flutter chat
A full-featured (simple message, voice, video) flutter chat application by SignalR and WebRTC
Stars: ✭ 52 (-48%)
Mutual labels:  voice
React.ai
It recognize your speech and trained AI Bot will respond(i.e Customer Service, Personal Assistant) using Machine Learning API (DialogFlow, apiai), Speech Recognition, GraphQL, Next.js, React, redux
Stars: ✭ 38 (-62%)
Mutual labels:  speech-recognizer
cursorless-vscode
Don't let the cursor slow you down
Stars: ✭ 536 (+436%)
Mutual labels:  voice
picovoice
The end-to-end platform for building voice products at scale
Stars: ✭ 316 (+216%)
Mutual labels:  voice
useful-twilio-functions
A set of useful Twilio Functions.
Stars: ✭ 53 (-47%)
Mutual labels:  voice
tgcalls
Voice chats, private incoming and outgoing calls in Telegram for Developers
Stars: ✭ 408 (+308%)
Mutual labels:  voice
spafe
🔉 spafe: Simplified Python Audio Features Extraction
Stars: ✭ 310 (+210%)
Mutual labels:  voice
africastalking-node.js
Official Node.js SDK for Africa's Talking
Stars: ✭ 113 (+13%)
Mutual labels:  voice
tappay-android-example
TapPay SDK example code for Android Platform
Stars: ✭ 17 (-83%)
Mutual labels:  android-platform
EnglishStu
英语学习软件,集成有道翻译、科大讯飞,有翻译、朗读示例、阅读评测功能
Stars: ✭ 27 (-73%)
Mutual labels:  voice
awesome-rhasspy
Carefully curated list of projects and resources for the voice assistant Rhasspy
Stars: ✭ 50 (-50%)
Mutual labels:  voice
lessampler
lessampler is a Singing Voice Synthesizer
Stars: ✭ 59 (-41%)
Mutual labels:  voice
JHSoundWaveView
音波图,声波图
Stars: ✭ 22 (-78%)
Mutual labels:  voice
brasiltts
Brasil TTS é um conjunto de sintetizadores de voz, em português do Brasil, que lê telas para portadores de deficiência visual. Transforma texto em áudio, permitindo que pessoas cegas ou com baixa visão tenham acesso ao conteúdo exibido na tela. Embora o principal público-alvo de sistemas de conversão texto-fala – como o Brasil TTS – seja formado…
Stars: ✭ 34 (-66%)
Mutual labels:  voice

react-native-android-voice

DUB npm version

react-native-android-voice is a speech-to-text library for React Native for the Android Platform.

##Any Feedback and Ideas are welcome! please use the Issues section above

Documentation

Install

npm install --save react-native-android-voice

Usage

Linking the Library

Add it to your android project

  • In android/settings.gradle
...
include ':VoiceModule', ':app'
project(':VoiceModule').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-voice')
  • In android/app/build.gradle
...
dependencies {
    ...
    compile project(':VoiceModule')
}
  • Register Module (in MainApplication.java)
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
    }
}

Example

import SpeechAndroid from 'react-native-android-voice';

...
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.

Methods

startSpeech(prompt, locale)

Initializes the voice recognition activity and returns what you spoke in text.

Arguments

  • prompt: String for the text to be displayed by the SpeechRecognizer dialog;
  • locale: String for the SpeechRecognizer to set itself for the given Locale; (Accessible through constants. see below available locales)

Locales:

DEFAULT

SpeechAndroid.DEFAULT

This will set the SpeechRecognizer to the default locale of your Android smartphone.


Portugal / Portuguese

SpeechAndroid.PT /*or*/ SpeechAndroid.PORTUGUESE

Brazil / Portuguese

SpeechAndroid.BR /*or*/ SpeechAndroid.PORTUGUESE_BRAZIL

Bulgarian

SpeechAndroid.BULGARIAN

Canada / English

SpeechAndroid.CANADA

Canada / French

SpeechAndroid.CANADA_FRENCH

Czech

SpeechAndroid.CZECH

Croatian

SpeechAndroid.CROATIAN

Chinese

SpeechAndroid.CHINA /*or*/ SpeechAndroid.CHINESE /*or*/
SpeechAndroid.SIMPLIFIED_CHINESE /*or*/ SpeechAndroid.TRADITIONAL_CHINESE

Netherlands / Dutch

SpeechAndroid.DUTCH

Belgium / Dutch

SpeechAndroid.DUTCH_BELGIUM

English

SpeechAndroid.ENGLISH

UK / English

SpeechAndroid.UK

US / English

SpeechAndroid.US

Australia / English

SpeechAndroid.AUSTRALIA

New Zealand / English

SpeechAndroid.NEW_ZEALAND

Singapore / English

SpeechAndroid.SINGAPORE

India / English

SpeechAndroid.ENGLISH_INDIA

Ireland / English

SpeechAndroid.ENGLISH_IRELAND

Zimbabwe / English

SpeechAndroid.ENGLISH_ZIMBABWE

Egypt / Arabic

SpeechAndroid.ARABIC_EGYPT

Israel / Arabic

SpeechAndroid.ARABIC_ISRAEL

France / French

SpeechAndroid.FRANCE /*or*/ SpeechAndroid.FRENCH

Belgium / French

SpeechAndroid.FRENCH_BELGIUM

Switzerland / French

SpeechAndroid.FRENCH_SWITZERLAND

Finnish

SpeechAndroid.FINNISH

Danish

SpeechAndroid.DANISH

Germany / German

SpeechAndroid.GERMANY /*or*/ SpeechAndroid.GERMAN

Switzerland / German

SpeechAndroid.GERMAN_SWITZERLAND

Greek

SpeechAndroid.GREEK

Hebrew

SpeechAndroid.HEBREW

Hindi

SpeechAndroid.HINDI

Hungarian

SpeechAndroid.HUNGARIAN

Italy / Italian

SpeechAndroid.ITALY /*or*/ SpeechAndroid.ITALIAN

Switzerland / Italian

SpeechAndroid.ITALIAN_SWITZERLAND

Indonesian

SpeechAndroid.INDONESIAN

Latvian

SpeechAndroid.LATVIAN

Lithuanian

SpeechAndroid.LITHUANIAN

Norwegian

SpeechAndroid.NORWEGIAN

Japan

SpeechAndroid.JAPAN /*or*/ SpeechAndroid.JAPANESE

Polish

SpeechAndroid.POLISH

Russian

SpeechAndroid.RUSSIAN

Romanian

SpeechAndroid.ROMANIAN

Spanish

SpeechAndroid.SPANISH

Catalan

SpeechAndroid.CATALAN

US / Spanish

SpeechAndroid.SPANISH_US

Serbian

SpeechAndroid.SERBIAN

Slovak

SpeechAndroid.SLOVAK

Slovenian

SpeechAndroid.SLOVENIAN

Swedish

SpeechAndroid.SWEDISH

Korea

SpeechAndroid.KOREA /*or*/ SpeechAndroid.KOREAN

Taiwan

SpeechAndroid.TAIWAN

Philippines / Tagalog

SpeechAndroid.TAGALOG_PHILIPPINES

Thai

SpeechAndroid.THAI

Turkish

SpeechAndroid.TURKISH

Ukrainian

SpeechAndroid.UKRAINIAN

Vietnamese

SpeechAndroid.VIETNAMESE

Errors

E_ACTIVITY_DOES_NOT_EXIST

SpeechAndroid.E_ACTIVITY_DOES_NOT_EXIST

Generic error on current Activity not existing.


E_VOICE_CANCELLED

SpeechAndroid.E_VOICE_CANCELLED

Voice Recognizer was cancelled


E_FAILED_TO_SHOW_VOICE

SpeechAndroid.E_FAILED_TO_SHOW_VOICE

Voice Recognizer failed to initialize


E_AUDIO_ERROR

SpeechAndroid.E_AUDIO_ERROR

Voice Recognizer encountered some error with the Audio received


E_NETWORK_ERROR

SpeechAndroid.E_NETWORK_ERROR

Network error while attempting connection with Google's Servers


E_NO_MATCH

SpeechAndroid.E_NO_MATCH

Voice Recognizer did not find any match


E_SERVER_ERROR

SpeechAndroid.E_SERVER_ERROR

Google's Servers encountered an error while processing the request


License

The MIT License (MIT)

Copyright © 2015 João Cunha

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].