feat: 先关闭语音

This commit is contained in:
2026-05-14 17:47:44 +08:00
parent 11c1a3401d
commit c777a0122e

View File

@@ -76,6 +76,7 @@
<!-- #ifdef APP-PLUS -->
<yao-asdRealSpeech
v-if="isSpeechRecognitionSupported"
ref="appSpeechRef"
:options="appSpeechOptions"
@result="handleAppSpeechResult"
@@ -97,6 +98,7 @@ import { appSpeechRecognitionOptions } from "@/constant/speech";
let manager = null;
let speechProvider = "";
const isSpeechRecognitionEnabled = ref(false);
const isSpeechRecognitionSupported = ref(false);
const appSpeechOptions = appSpeechRecognitionOptions;
@@ -104,13 +106,13 @@ const appSpeechOptions = appSpeechRecognitionOptions;
// #ifdef MP-WEIXIN
const plugin = requirePlugin("WechatSI");
manager = plugin.getRecordRecognitionManager();
isSpeechRecognitionSupported.value = !!manager;
isSpeechRecognitionSupported.value = isSpeechRecognitionEnabled.value && !!manager;
speechProvider = manager ? "wechat" : "";
// #endif
// App 端使用 yao-asdRealSpeechapikey 请在 src/constant/speech.js 中配置。
// #ifdef APP-PLUS
isSpeechRecognitionSupported.value = true;
isSpeechRecognitionSupported.value = isSpeechRecognitionEnabled.value;
speechProvider = "app";
// #endif