From 1b6b40849eb48f42f4115fddfc8bf6bf508d58a7 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Thu, 14 May 2026 13:55:00 +0700 Subject: [PATCH] Throttle voice progress updates --- lib/screens/mapflow_shell.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/screens/mapflow_shell.dart b/lib/screens/mapflow_shell.dart index e636594..d835e1f 100644 --- a/lib/screens/mapflow_shell.dart +++ b/lib/screens/mapflow_shell.dart @@ -711,6 +711,7 @@ class AddExperienceFlow extends ConsumerStatefulWidget { class _AddExperienceFlowState extends ConsumerState { static const _minimumInformationUnits = 16.0; static const _nearbyPlaceRadiusMeters = 200; + static const _amplitudeInterval = Duration(milliseconds: 140); static const _recordConfig = record.RecordConfig( encoder: record.AudioEncoder.wav, numChannels: 1, @@ -780,7 +781,7 @@ class _AddExperienceFlowState extends ConsumerState { ..start(); _lastInformationAt = DateTime.now(); _amplitudeSub = _audioRecorder - .onAmplitudeChanged(const Duration(milliseconds: 45)) + .onAmplitudeChanged(_amplitudeInterval) .listen(_handleAmplitude); setState(() {