joaocnh / react-native-android-voice Goto Github PK
View Code? Open in Web Editor NEWreact-native-android-voice is a speech-to-text library for React Native for the Android Platform.
License: MIT License
react-native-android-voice is a speech-to-text library for React Native for the Android Platform.
License: MIT License
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)
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.
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:
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
Congrats Team for greate work.
Would like to know any further plan on this project?
...
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.
Thanks for writing this plugin , I am unable to install this , I am getting following error
TypeError: Cannot read property 'startSpeech' of undefined(…)
Reason: react-native breaking change:
ScreenRecording not working if this package is used
@JoaoCnh Please update the version in package.json and upload it to npm registery
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
@JoaoCnh :
Hi, it would be possible to add the possibility to request permission to run it, it would be runtime type permission.
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.
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"
}
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.
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.
A problem occurred evaluating project ':VoiceModule'.
Declaring custom 'clean' task when using the standard Gradle lifecycle plugins is not allowed.
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
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
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.
Did React-native-android-voice is compatible with Google offline speech recognition?
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.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.