Giter Site home page Giter Site logo

joaocnh / react-native-android-voice Goto Github PK

View Code? Open in Web Editor NEW
100.0 7.0 33.0 33 KB

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

License: MIT License

JavaScript 0.70% Java 99.30%
voice android speech-recognizer android-platform react react-native

react-native-android-voice's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-android-voice's Issues

app

i got this error when stop recording :

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.writeit, PID: 3567
java.lang.AbstractMethodError: abstract method "void com.facebook.react.bridge.ActivityEventListener.onActivityResult(android.app.Activity, int, int, android.content.Intent)"
at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:226)
at com.facebook.react.XReactInstanceManagerImpl.onActivityResult(XReactInstanceManagerImpl.java:620)
at com.facebook.react.ReactActivityDelegate.onActivityResult(ReactActivityDelegate.java:134)
at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:77)
at android.app.Activity.dispatchActivityResult(Activity.java:6463)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3738)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3785)
at android.app.ActivityThread.access$1400(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5525)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)

Unfortunately app has stopped working

whenever I tap on microphone and call the _buttonClick() function, it records voice for 2 seconds and then app gets crashed, giving error "unfortunately app has stopped working"
please help.

Generating APK

With the project done and compiled correctly in the react-native run-android, when trying to generate the apk, at 98% it appears the error below:

image

Versions:
"dependencies": {
"react": "16.8.3",
"react-native": "0.59.5",
"react-native-android-voice": "^0.6.0",
"react-native-tts": "^3.0.0"
},

Command for Generated APK:
./gradlew assembleRelease

[FEATURE] Add offline voice recognition

Goals:

  • To be able to include both the Online Google Voice Recognizer and my Offline Voice Recognizer;
  • Being able to have control over the Offline Voice Recognizer through events to enable a much better react-native experience;
...
    OfflineRecognizer.startCapture(); 
    OfflineRecognizer.isCapturing();
    OfflineRecognizer.stopCapture();
...

Name is not yet final. Any ideas and thoughts on how it all should be named (module, methods, etc.) please share.

Not Working

Thanks for writing this plugin , I am unable to install this , I am getting following error

TypeError: Cannot read property 'startSpeech' of undefined(…)

intent.resolveActivity(...) is null

The function startSpeech(...) doesn't perform anything for me.
I investigated and found out that the check for if (intent.resolveActivity(this.reactContext.getPackageManager()) != null) is always false for some reason.
What could I've missed?
RN version 0.39.2

SDK 26 is a problem

when I install package and linking in my project i cannot get build an app , and have this issue:

`FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':VoiceModule'.

The SDK Build Tools revision (23.0.2) is too low for project ':VoiceModule'. Minimum required is 25.0.0
`

My package.json:

 "dependencies": {
    "native-base": "^2.8.0",
    "react": "16.4.1",
    "react-native": "0.56.0",
    "react-native-android-voice": "^0.6.0",
    "react-native-cli": "^2.0.1",
    "react-native-splash-screen": "^3.1.1",
    "react-native-vector-icons": "^5.0.0",
    "react-navigation": "^2.12.1",
    "react-timer-mixin": "^0.13.4"
  },

My android/build.gradle:


buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

ext {
    buildToolsVersion = "26.0.3"
    minSdkVersion = 16
    compileSdkVersion = 26
    targetSdkVersion = 26
    supportLibVersion = "26.1.0"
}

onActivityResult gets invoked from other module

Hi,
I'm developing android app using react-native. In that I'm using current module for speech to text and to capture image or upload image I'm using ImagePickerManager, If I use them individually they are working fine, but if I integrate them then image capturing is not working and app gets crashed. I've enabled log and seen that after capturing or selecting an image this module was called, don't know why this module onActivityResult is called android should call image picker manager's onActivityResult. May be I'm thinking that, Is there any code that makes android to call only this modules onActivityResult. Could you tell me why It's getting invoking from other module.
Below is the error log image.
screenshot from 2016-05-12 15 11 04

Voice Recognition without Toasts

Is it possible to do voice recognition without displaying any Toasts or Dialogs?
Because I have to call startSpeech(prompt, locale) to initialize voice recognition which I take to mean that there is no option to call startSpeech with no prompt.
Maybe there's something I'm missing here... I do not want any Toasts, Dialogs or prompts unless it's just the 'ok google' sound.

Error buil app

A problem occurred evaluating project ':VoiceModule'.

Declaring custom 'clean' task when using the standard Gradle lifecycle plugins is not allowed.

"react": "16.0.0-alpha.6",
"react-native": "^0.44.0",
"react-native-android-voice": "^0.5.1"

Gradle 3.3

Build time: 2017-01-03 15:31:04 UTC
Revision: 075893a3d0798c0c1f322899b41ceca82e4e134b

Groovy: 2.4.7
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_131 (Oracle Corporation 25.131-b11)
OS: Linux 4.8.0-52-generic amd64

Build failing

Hi there,
I'm trying to use your awesome module. I followed the instructions in your readme but on build I am getting this:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':VoiceModule'.
> Could not resolve all dependencies for configuration ':VoiceModule:classpath'.
   > Could not download transform-api.jar (com.android.tools.build:transform-api:1.5.0)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/transform
-api/1.5.0/transform-api-1.5.0.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/transform-api/1
.5.0/transform-api-1.5.0.jar'. Received status code 500 from server: Internal Server Error

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get
 more log output.

BUILD FAILED

Total time: 6 mins 33.853 secs

Do you have any ideas?

Thanks

Trouble getting plugin installed

I have made all the necessary changes in the instructions section.
After making the changes, I am unable to get my project to compile.

The error I am receiving is:
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':VoiceModule'.

    failed to find Build Tools revision 23.0.2

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3.168 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

I would appreciate any help.

offline mode

Did React-native-android-voice is compatible with Google offline speech recognition?

APK

I made an application using this library. But I had a lot of problems generating apk. In search of the solution I found that the API level of this library is depreciated. It would be great if they updated to the new version that google requires, the API of level 26, according to react-native documentation.
facebook/react-native#17287

If possible, how do I contribute to the project? This lib is of great use.

Android Voice Modal

Is there a way to remove the modal from popping up?

My application would serve a better purpose if the user had direct control over the speech button and display, do you know if that is possible?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.