Closed montaserfzy closed 5 years ago
I am trying to create audio recorder on android i faced this error
const options = { sampleRate: 16000, channels: 1, bitsPerSample: 16, audioSource: 6, wavFile: 'test.wav' } AudioRecord.init(options); AudioRecord.start();
const options = { sampleRate: 16000, channels: 1, bitsPerSample: 16, audioSource: 6, wavFile: 'test.wav' }
AudioRecord.init(options); AudioRecord.start();
React-native --v: 57.8
@montaserfzy you need to get microphone permission before init. Take a look at example app.
init
if(recorder.getState() != AudioRecord.STATE_INITIALIZED){ return; //avoid crash }
I am trying to create audio recorder on android i faced this error
const options = { sampleRate: 16000, channels: 1, bitsPerSample: 16, audioSource: 6, wavFile: 'test.wav' }
AudioRecord.init(options); AudioRecord.start();