[6.5.0] refactor: 通用弹框增加tts 文案设置;

This commit is contained in:
aibingbing
2024-07-10 09:53:01 +08:00
parent f95c7b4bd4
commit 1ca1a97aff
5 changed files with 21 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.v2n
import android.content.Context
import android.graphics.Color
import android.text.TextUtils
import android.util.AttributeSet
import android.util.TypedValue
import android.view.LayoutInflater
@@ -283,7 +284,7 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
tvV2XHintContent.text = dataBean.hintStr
tvV2XTimeStr.text =
"更新时间:${DateTimeUtils.getTimeText(dataBean.timestamp, DateTimeUtils.HH_mm_ss)}"
if (dataBean.isNeedTTS) {
if (dataBean.isNeedTTS && !TextUtils.isEmpty(dataBean.ttsStr)) {
AIAssist.getInstance(context)
.speakTTSVoiceWithLevel(dataBean.hintStr, AIAssist.LEVEL0)
}