react-native-recording | React Native audio recording module used for DSP | Audio Utils library
kandi X-RAY | react-native-recording Summary
kandi X-RAY | react-native-recording Summary
React Native audio recording module used for DSP with Android + iOS
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initialize
- Loads the Flipper
- Get React native host
- Initializes the recorder
- Process recording
- Initializes the Fluopper plugin
- Stop recording
- Starts recording
- Create native modules
- Create view managers
react-native-recording Key Features
react-native-recording Examples and Code Snippets
import { PermissionsAndroid } from "react-native";
import Recording from "react-native-recording";
await PermissionsAndroid.requestMultiple([
PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,
]);
Recording.init({
bufferSize: 4096,
sampleRate: 4410
...
NSMicrophoneUsageDescription
This app uses the microphone to record the soundscape.
...
Community Discussions
Trending Discussions on react-native-recording
QUESTION
My goal is to reduce the audio data size generated by the react-native-recording.
The expected result: The audio file size should be between 5200 bytes to 5400 bytes per 1 seconds of audio / Opus Voice bit rate 5.17 KiB with sampling rate 8 kHz.
The actual result:
The audio file size is 3 times the expected result. For example recording this word A guest for Mr. Jerry
/ 1.6 seconds of audio will have a data size roughly 28,000 bytes.
I plan to write custom native module to achieve this goal. If you like, feel free to leave a link for me to read.
TL:DRMy end goal is to send the audio data through WebSocket. I deliberately remove the WebSocket.
Steps to reproduce:
- Add listener
ANSWER
Answered 2020-Dec-23 at 02:51Update:
I just did the calculations, with sampleRate of 8000, and mono channel with 16-bits (2-bytes) per sample, that's 16,0000 bytes per second, so 1.6 seconds of audio is 25,600 bytes, which is what you're getting.
To get 5200 to 5400 bytes per second, you have to work backwards. Select 8-bit (1-byte) per sample. So you only have 5200 to 5400 sampleRate to work with.
PCM data is raw audio samples. The only way to get higher quality audio into less bytes is by audio compression, into mp3 or aac or some other audio compression codec.
Original reply:
Looks like RNSaveAudio.saveWav has a fixed sampleRate of 44100:
QUESTION
I cannot update useState by its value, array in React Native
Background:I develop recording app, and I want to keep the last 5 seconds, and update every 2.5 seconds:
[old audio data] (5 seconds) and [new audio data] (2.5 seconds)
-> (crop the first 2.5 seconds of old audio data)
[old audio data] (last 2.5 seconds) + [new audio data] (2.5 seconds)
...ANSWER
Answered 2020-Oct-23 at 11:11You should use the previous state when updating.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-recording
You can use react-native-recording like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the react-native-recording component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page