chore: Downgrade record

This commit is contained in:
krille-chan 2023-10-29 13:04:45 +01:00
commit fd22b4330e
No known key found for this signature in database
5 changed files with 22 additions and 35 deletions

View file

@ -621,7 +621,7 @@ class ChatController extends State<ChatPageWithRoom> {
}
}
if (await AudioRecorder().hasPermission() == false) return;
if (await Record().hasPermission() == false) return;
final result = await showDialog<RecordingResult>(
context: context,
barrierDismissible: false,

View file

@ -28,7 +28,7 @@ class RecordingDialogState extends State<RecordingDialog> {
bool error = false;
String? _recordedPath;
final _audioRecorder = AudioRecorder();
final _audioRecorder = Record();
final List<double> amplitudeTimeline = [];
static const int bitRate = 16000;
@ -47,12 +47,7 @@ class RecordingDialogState extends State<RecordingDialog> {
await WakelockPlus.enable();
await _audioRecorder.start(
const RecordConfig(
autoGain: true,
noiseSuppress: true,
echoCancel: true,
bitRate: bitRate,
),
bitRate: bitRate,
path: path,
);
setState(() => _duration = Duration.zero);