From 7ad93af5d43a9d739f896ebf6a49554489d3b418 Mon Sep 17 00:00:00 2001 From: white <1293616053@qq.com> Date: Mon, 14 Oct 2024 13:28:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hybrid/html/ai.html | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/hybrid/html/ai.html b/hybrid/html/ai.html index fad4915..a8f48b1 100755 --- a/hybrid/html/ai.html +++ b/hybrid/html/ai.html @@ -136,31 +136,6 @@ // 如果没有找到 finish_reason 为 "stop" 的事件,则返回 null 或其他默认值 return stopEvent; - } - - // 筛选关键词 - function containsKeywordRegex(text) { - var index = Items.findIndex(item => text.includes(item)); - - if (index !== -1) { - return index - } else { - return 99999 - } - } - - // 语音所需时间 - function calculateSpeakingTime(text) { - // 假设平均每分钟说230个单词 - const wordsPerMinute = 230; - // 计算文字的长度 - const wordCount = text.trim().length; - // 计算所需时间(以分钟为单位) - const speakingTime = wordCount / wordsPerMinute; - // 转换为秒数 - const speakingTimeInSeconds = speakingTime * 60; - console.log(speakingTimeInSeconds, '说完需要多少秒') - return speakingTimeInSeconds; } @@ -300,7 +275,6 @@ if (result) { DetailDay(result.dataKey, result.date).then(res => { let TargetData = res.data.data; - var QSindex = containsKeywordRegex(params.msg); if (result.dataKey == 'ECGData') { TargetData.map(item => {