[6.8.2] change the voice

This commit is contained in:
zhongchao
2024-12-05 17:53:29 +08:00
parent 961e8953e8
commit 6313be710e
12 changed files with 26 additions and 22 deletions

View File

@@ -180,10 +180,7 @@ object PassBusStationEventManager : IMoGoChassisLocationWGS84Listener {
it.notifyDistance
),
isDriverScreen,
String.format(
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ROAD_BUS_STATION.poiType),
it.notifyDistance
),
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ROAD_BUS_STATION.poiType),
UriUtils.res2Uri(
EventTypeEnumNew.getPoiTypeBg(
EventTypeEnumNew.TYPE_USECASE_ROAD_BUS_STATION.poiType,

View File

@@ -212,7 +212,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
)
)
)
CallerHmiManager.warningV2X(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.content, EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.tts, isFromObu = false)
CallerHmiManager.warningV2X(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.content, EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.tts)
}
}
@@ -242,7 +242,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
)
)
)
CallerHmiManager.warningV2X(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, content, tts, isFromObu = false)
CallerHmiManager.warningV2X(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, content, tts)
}
}

View File

@@ -69,6 +69,7 @@ import mogo.v2x.MogoV2X
import java.nio.charset.Charset
import java.util.concurrent.CopyOnWriteArrayList
import java.util.concurrent.CopyOnWriteArraySet
import java.util.concurrent.TimeUnit
import java.util.concurrent.atomic.AtomicBoolean
object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
@@ -250,7 +251,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
tts,
null,
ALERT_WARNING_TOP,
isFromObu = false
TimeUnit.SECONDS.toMillis(5)
)
}
}

View File

@@ -159,8 +159,9 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
}
}
}
val content = "发现前方${distance.toInt()}${ if (poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType) "车道施工" else "车道事故" }"
val tts = "$content, ${SkinResources.getInstance().getString(R.string.operation_platform_name)}提醒您小心行人及来车"
val contentType = if (poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType) "道路施工" else "道路事故"
val content = "前方${distance.toInt()}米有$contentType"
val tts = "${SkinResources.getInstance().getString(R.string.operation_platform_name)}发现前方$contentType, 提醒您注意行人及来车"
V2XBizTrace.onAck(TAG, "绘制poi事件:$poiType")
saveMsgBox(
MsgBoxBean(
@@ -237,7 +238,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
}
// 弹事件框
val alertContent = String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), distance.toInt())
val alertTts = String.format(EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), distance.toInt())
val alertTts = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType)
CallerRoadV2NEventWindowListenerManager.showLiveVideo(
newEventId,
event.timestamp,
@@ -363,7 +364,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
}
// 弹事件框
val alertContent = String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), distance.toInt())
val alertTts = String.format(EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), distance.toInt())
val alertTts = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType)
CallerRoadV2NEventWindowListenerManager.showLiveVideo(
data.eventId,
data.timestamp,

View File

@@ -1,5 +1,6 @@
package com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.road;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.enums.CommunicationType;
import com.mogo.eagle.core.data.enums.DataSourceType;
import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
@@ -133,7 +134,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
);
CallerHmiManager.INSTANCE.warningV2X(poiType, alarmText,
ttsText, this,WarningDirectionEnum.ALERT_WARNING_TOP,
TimeUnit.SECONDS.toMillis(5), false);
TimeUnit.SECONDS.toMillis(5), AIAssist.LEVEL2, false);
//消息埋点
V2XEventAnalyticsManager.INSTANCE.triggerV2XEvent(poiType,alarmText,ttsText, DataSourceType.AICLOUD, CommunicationType.V2N);
}

View File

@@ -9,6 +9,7 @@ import android.text.style.ForegroundColorSpan;
import android.util.Log;
import androidx.annotation.Nullable;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.enums.CommunicationType;
import com.mogo.eagle.core.data.enums.DataSourceType;
import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
@@ -87,7 +88,7 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoChas
CallerHmiManager.INSTANCE.warningV2X(v2xType + "",
getAlertContentForFrontWarning(mMarkerEntity), mMarkerEntity.getTts(),
this,getDirection(),
TimeUnit.SECONDS.toMillis(5), false);
TimeUnit.SECONDS.toMillis(5), AIAssist.LEVEL2, false);
//消息埋点
V2XEventAnalyticsManager.INSTANCE.triggerV2XEvent(v2xType,getAlertContentForFrontWarning(mMarkerEntity).toString(),
mMarkerEntity.getTts(), DataSourceType.AICLOUD, CommunicationType.V2N);

View File

@@ -271,7 +271,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(MsgBoxType.V2X, V2XMsg(v2xType, alertContent.toString(), ttsContent,CommunicationType.V2N.name))
)
CallerHmiManager.warningV2X(v2xType, alertContent, ttsContent, isFromObu = false)
CallerHmiManager.warningV2X(v2xType, alertContent, ttsContent)
V2XEventAnalyticsManager.triggerV2XEvent(v2xType, alertContent.toString(),
ttsContent,DataSourceType.AICLOUD,CommunicationType.V2N)
}

View File

@@ -151,7 +151,7 @@ class MoGoHmiProvider : IMoGoHmiProvider {
* 不展示顶部弹窗,其它保留
*/
@Synchronized
override fun warningV2X(v2xType: String, alertContent: CharSequence?, ttsContent: String?, listener: IMoGoWarningStatusListener?, direction: WarningDirectionEnum, expireTime: Long, isFromObu: Boolean) {
override fun warningV2X(v2xType: String, alertContent: CharSequence?, ttsContent: String?, listener: IMoGoWarningStatusListener?, direction: WarningDirectionEnum, expireTime: Long, newLevel: Int, isFromObu:Boolean) {
if (isFromObu) {
// 修改: 只有来自obu的事件这样处理
//30秒内同一个事件只出现一次 TODO 临时添加,后面宏宇统一在数据中心处理

View File

@@ -237,7 +237,7 @@ class RoadCrossRoamView @JvmOverloads constructor(
SkinResources.getInstance().getString(R.string.operation_platform_name)
}为您提供路口全息影像助力出行"
}
AIAssist.getInstance(context).speakTTSVoice(disStr)
AIAssist.getInstance(context).speakTTSVoiceWithLevel(disStr, AIAssist.NEW_LEVEL_2)
}
CallerHmiViewControlListenerManager.invokeV2XEvent(View.VISIBLE, TAG)
CallerServicesEventManager.updateServicesNum(CallerServicesEventManager.ServiceType.ROAD)