Comments (5)
Android
To save the voice, you would need to capture the raw audio signal, that would require a very simple pull request actually!
According to a quick stack overflow search:
https://stackoverflow.com/a/16340756
"You can use the "buffer received" callback..."
This can be updated for the Android API in the following steps:
- Visit this method in the source code
- Convert the
byte[] buffer
passed fromonBufferReceived(byte[] buffer)
to a readable React Native buffer as a local variable - Add the buffer to the
WritableMap
objectevent
. This would be similar to theerror
objectevent.putBoolean("error", false);
, except you would addevent.put<Insert Type Here>("buffer", buffer);
. - Test it with the example app by reflecting your use case using the
Voice.onSpeechRecognized
event listener. Every callback concatenate the receivedevent.bytes
with a global array variable and then finally writing the contents to a file (This might require another library to write to a file similar to nodefs
). - You can possibly interface with other libraries such as react-native-audio-toolkit to read the file after you saved it.
Good Luck! I would love to see this implemented :)
from voice.
For iOS, it seems that there is no port we can access the low buffer of PCM. I'll give it a try when I have some time.
from voice.
@ohtangza I recognized your fork is ahead of the main repo, I cherry-picked some of your commits and am planning on merging them so you can stay up-to date as well as everyone else.
I am keeping some of the extra changes you made with tracking break-points in sentences, I think that adds some value to most apps with no performance disadvantages.
Another note is that I added a configuration option for Android clients for the RecognizerIntent on start.
from voice.
@ohtangza is that okay? I will credit you as well as give you full access repository.
from voice.
@wenkesj Oh, I think it's okay for you to cherry-pick our changes. Although we are using it for our app now, I'm not sure this satisfies the level of public use for distribution.
I think you can add a remote repo from your side and apply conditional cherry pick commits if you want. If I am not right, please let me know. Ah, one more thing, regarding getting buffer from Recognizer, we tried but it seems that the recent version of Android does not guarantee the callback to be fired, so we stopped there. Please let us updated if you make a another process on this issue.
@ghsdh3409 Put you in the loop because you also work on our forked repo.
from voice.
Related Issues (20)
- Customizing for offline iOS recognition. HOT 1
- Document on-device file transcription api for iOS and note no corresponding android api
- React native issues warning about NativeEventEmitter HOT 5
- `react-native-voice` Compatibility Issue with Android 13 ColorOS ROM ("13/Didn't understand, please try again.") HOT 3
- patata
- Remove background noise HOT 1
- "Cannot make recognizer for sq-AL. Supported locale identifiers are..." HOT 3
- Error with Android 13 (Code 9, Code 12) HOT 6
- Your JavaScript code tried to access a native module that doesn't exist. HOT 1
- Word Period Issue
- Repeated kAFAssistantErrorDomain error 1107 HOT 2
- Any plan to support contextualStrings on iOS and Android?
- Expo Android: Could not find method compile() for arguments HOT 3
- React Native Screen Recorder and Voice Recogniser does not work together
- Is there any way to ignore speaker output? HOT 3
- Single letter or Alphabet only not recognize
- Bluetooth recognition crash
- Error in Android Build Process: Deprecated Configurations and Implicit Dependencies in @react-native-voice_voice Module HOT 4
- Cannot update listeners while Voice is recording.
- intergrate with WebRTC
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from voice.