From 04e05c8afebe12168c7a0242cf66ce7ef968b340 Mon Sep 17 00:00:00 2001 From: lxm <1274844347@qq.com> Date: Mon, 18 Aug 2025 19:00:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(translation):=20=E6=B7=BB=E5=8A=A0=E8=AF=AD?= =?UTF-8?q?=E9=9F=B3=E8=AF=86=E5=88=AB=E9=94=99=E8=AF=AF=E7=9A=84=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在语音识别错误时,除了记录日志外,现在会通过 snackbar 向用户显示错误信息 --- lib/modules/translation/controllers/translation_controller.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/modules/translation/controllers/translation_controller.dart b/lib/modules/translation/controllers/translation_controller.dart index f769e7a87..fa6461d28 100644 --- a/lib/modules/translation/controllers/translation_controller.dart +++ b/lib/modules/translation/controllers/translation_controller.dart @@ -612,6 +612,7 @@ class TranslationController extends GetxController { latestRecognitionText.value = event.text; print("处理麦:${event.text}"); } else if (event.type == RecognitionEventType.error) { + Get.snackbar('error'.tr, event.error); isRecognizing.value = false; Logger.error('语音识别错误: ${event.error}'); } else if (event.type == RecognitionEventType.canceled) {