llfbandit / record

Audio recorder from microphone to a given file path. No external dependencies, MediaRecorder is used for Android an AVAudioRecorder for iOS.
https://pub.dev/packages/record
243 stars 204 forks source link

IOS 17.4.1 Recording False #309

Closed liugong86 closed 6 months ago

liugong86 commented 6 months ago

record 5.0.5

Environment

Describe the bug record can start, and there has no any error. but the audio file length only 28. Amplitude always the same value AudioPlayer the audio file also false;

The same code on android work well.

const config = RecordConfig( encoder: encoder, numChannels: 1, sampleRate: 8000, bitRate: 64 * 1024);

can somebody help me?

liugong86 commented 6 months ago

record 5.0.5

Environment

* OS: IOS 17.4.1

* flutter 3.19.4

* iphone 15

Describe the bug record can start, and there has no any error. but the audio file length only 28. Amplitude always the same value AudioPlayer the audio file also false;

The same code on android work well.

const config = RecordConfig( encoder: encoder, numChannels: 1, sampleRate: 8000, bitRate: 64 * 1024);

can somebody help me?

when delete the params sampleRate:8000, it work well. const config = RecordConfig( encoder: encoder, numChannels: 1, // sampleRate: 8000, bitRate: 64 * 1024);

llfbandit commented 6 months ago

If I remember well, iOS doesn't record below 16k...