hyochan / hyochan/react-native-nitro-sound
How to get voice frequency while recording.
- Dominant language
- TypeScript
- Stars
- 962
- Forks
- 254
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 1
Description
const onStartRecord = async() => {
const path = Platform.select({
ios: 'hello.m4a',
android: 'sdcard/hello' + new Date().getMilliseconds() + '.mp4', // should give extra dir name in android. Won't grant permission to the first level of dir.
});
const audioSet = {
AudioEncoderAndroid: AudioEncoderAndroidType.AAC,
AudioSourceAndroid: AudioSourceAndroidType.MIC,
AVEncoderAudioQualityKeyIOS: AVEncoderAudioQualityIOSType.low,
AVNumberOfChannelsKeyIOS: 2,
AVFormatIDKeyIOS: AVEncodingOption.lpcm,
};
const meteringEnabled = true;
const result = await audioRecorderPlayer.startRecorder(path,audioSet,meteringEnabled);
audioRecorderPlayer.addRecordBackListener((e) => {
setrecordSecs(e.current_position),
setrecordTime(audioRecorderPlayer.mmssss(Math.floor(e.current_position)));
let meter = Math.floor(e.current_metering);
console.log("meter data is :"+meter)
return;
});
console.log("start record" + result);
};
Contributor guide
Research direction
Start from the provided startRecorder call and addRecordBackListener callback, then inspect how meteringEnabled and e.current_metering are exposed. Check the repository's recording and metering documentation or implementation to determine whether frequency data is supported. Done means the issue clearly documents or exposes the requested voice-frequency data while recording, with a verified usage example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- audio-video-rtc
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100