[6.8.2] change the voice
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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 临时添加,后面宏宇统一在数据中心处理
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -464,7 +464,7 @@ enum class EventTypeEnumNew(
|
||||
"通过公交站",
|
||||
poiTypeSrcVr = R.drawable.icon_v2x_bus_station_driver,
|
||||
content = "前方%s米有公交站",
|
||||
tts = "前方%s米有公交站,${SkinResources.getInstance().getString(R.string.operation_platform_name)}提醒您小心右侧行人及来车"
|
||||
tts = "${SkinResources.getInstance().getString(R.string.operation_platform_name)}发现前方公交站,提醒您注意右侧行人及来车"
|
||||
),
|
||||
TYPE_ATTENTION_CONFLUENCE(
|
||||
44.toString(),
|
||||
@@ -517,8 +517,8 @@ enum class EventTypeEnumNew(
|
||||
"100062",
|
||||
"他车倒车/逆行",
|
||||
poiTypeSrcVr = R.drawable.icon_v2x_other_retrograde_vehicle_driver,
|
||||
content = "前方%s米有车辆异常倒车或逆行",
|
||||
tts = "前方%s米有车辆异常倒车或逆行,${SkinResources.getInstance().getString(R.string.operation_platform_name)}提醒您注意观察小心通过"
|
||||
content = "前方%s米有他车倒车或逆行",
|
||||
tts = "${SkinResources.getInstance().getString(R.string.operation_platform_name)}发现前方有异常车辆,提醒您注意观察 小心通过"
|
||||
),
|
||||
TYPE_SOCKET_ROAD_GREE_WAVE(
|
||||
"100063",
|
||||
@@ -532,7 +532,7 @@ enum class EventTypeEnumNew(
|
||||
"行人横穿",
|
||||
poiTypeSrcVr = View.NO_ID,
|
||||
content = "前方%s米有行人/非机动车横穿",
|
||||
tts = "前方%s米有行人/非机动车横穿,${SkinResources.getInstance().getString(R.string.operation_platform_name)}提醒您提前减速,注意观察,小心通过"
|
||||
tts = "${SkinResources.getInstance().getString(R.string.operation_platform_name)}发现前方有行人或非机动车横穿,提醒您注意观察,小心通过"
|
||||
),
|
||||
TYPE_ERROR(
|
||||
0.toString(),
|
||||
|
||||
@@ -25,7 +25,7 @@ interface IMoGoHmiProvider :IProvider{
|
||||
/**
|
||||
* 不展示顶部弹窗,其它保留
|
||||
*/
|
||||
fun warningV2X(v2xType: String, alertContent: CharSequence?, ttsContent: String?, listener: IMoGoWarningStatusListener?, direction: WarningDirectionEnum, expireTime: Long, isFromObu: Boolean)
|
||||
fun warningV2X(v2xType: String, alertContent: CharSequence?, ttsContent: String?, listener: IMoGoWarningStatusListener?, direction: WarningDirectionEnum, expireTime: Long, newLevel: Int, isFromObu:Boolean)
|
||||
|
||||
/**
|
||||
* 展示指定方位上的红框预警
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.biz.dispatch.DispatchAdasAutoPilotLocReceiverBean
|
||||
import com.mogo.eagle.core.data.biz.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.biz.notice.NoticeTrafficStylePushData
|
||||
@@ -50,7 +51,8 @@ object CallerHmiManager {
|
||||
listenerIMoGo: IMoGoWarningStatusListener? = null,
|
||||
direction: WarningDirectionEnum = ALERT_WARNING_NON,
|
||||
expireTime: Long = 5000L,
|
||||
isFromObu: Boolean,
|
||||
newLevel: Int = AIAssist.LEVEL2,
|
||||
isFromObu :Boolean = false
|
||||
) {
|
||||
hmiProviderApi?.warningV2X(
|
||||
v2xType,
|
||||
@@ -59,6 +61,7 @@ object CallerHmiManager {
|
||||
listenerIMoGo,
|
||||
direction,
|
||||
expireTime,
|
||||
newLevel,
|
||||
isFromObu
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user