[6.6.0]
[b1 b2 tts 策略变更]
This commit is contained in:
@@ -537,8 +537,6 @@ public class OrderModel {
|
||||
|
||||
leaveTTSTips(nextStation,nextStationKr);
|
||||
|
||||
sendStartStationToClient(nextStation);
|
||||
|
||||
if (busRoutesResult != null) {
|
||||
boolean isLastStop = false;
|
||||
if (leaveIndex + 1 == stationList.size() - 1) {
|
||||
@@ -738,8 +736,6 @@ public class OrderModel {
|
||||
|
||||
ShuttleVoiceManager.INSTANCE.arrivedStationBus(arriveStation,arriveStationKr);
|
||||
|
||||
sendArrivedStationToClient(arriveStation);
|
||||
|
||||
reBuildCacheRouteData(arrivedStationIndex, BusConst.STATION_STATUS_STOPPED,false,writeVersion);
|
||||
}
|
||||
|
||||
@@ -759,28 +755,6 @@ public class OrderModel {
|
||||
GsonUtils.toJson(data));
|
||||
}
|
||||
|
||||
private void sendArrivedStationToClient(String arriveStation) {
|
||||
AppConnectMsg arrivedMsg = new AppConnectMsg(false,true,String.format(mContext
|
||||
.getString(R.string.bus_arrived_station_tip),
|
||||
arriveStation),-1);
|
||||
LanSocketManager.sendMsgToClient(arrivedMsg);
|
||||
}
|
||||
|
||||
private void sendStartStationToClient(String nextStation) {
|
||||
AppConnectMsg startMsg = new AppConnectMsg(false,true,String.format(mContext
|
||||
.getString(R.string.bus_leave_station_tip),
|
||||
nextStation),-1);
|
||||
|
||||
UiThreadHandler.postDelayed(()-> LanSocketManager.sendMsgToClient(startMsg), BusConst.DELAY_10S);
|
||||
}
|
||||
|
||||
private void sendEndTaskToClient() {
|
||||
AppConnectMsg endMsg = new AppConnectMsg(false,true,mContext
|
||||
.getString(R.string.bus_end_task_tip),-1);
|
||||
LanSocketManager.sendMsgToClient(endMsg);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 离站上报
|
||||
*/
|
||||
@@ -1086,7 +1060,6 @@ public class OrderModel {
|
||||
queryBusRoutes();// 重新获取任务
|
||||
removeTipRunnables();
|
||||
ShuttleVoiceManager.INSTANCE.endOrderBus();
|
||||
sendEndTaskToClient();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -202,11 +202,6 @@ object TicketModel : IReceivedMsgListener, IOchOnMessageListener<WriteOffPasseng
|
||||
|
||||
private fun playPassenger(ticketSize: Int,phone:String,ticketName:String,orderNo:String) {
|
||||
|
||||
if (ticketSize > 1) { //多人播报 "x人" ---》x人核验通过
|
||||
ShuttleVoiceManager.sendWriteOffNumToClient(ticketSize.toString() + "人核验通过")
|
||||
} else { //是 1 播放 "滴" 2022.11.09 改为: "核验通过"
|
||||
ShuttleVoiceManager.sendWriteOffNumToClient("核验通过")
|
||||
}
|
||||
ShuttleVoiceManager.writeOffCount(ticketSize)
|
||||
|
||||
var tempPhone = phone
|
||||
|
||||
@@ -2,8 +2,11 @@ package com.mogo.och.shuttle.util
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.och.common.module.manager.socket.lan.LanSocketManager.sendMsgToClient
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.och.common.module.manager.socket.lan.LanSocketManager
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.AppConnectMsg
|
||||
import com.mogo.och.common.module.utils.ResourcesUtils
|
||||
import com.mogo.och.common.module.voice.VoiceNotice
|
||||
import com.mogo.och.shuttle.R
|
||||
import com.mogo.tts.base.LangTtsEntity
|
||||
@@ -11,12 +14,6 @@ import com.mogo.tts.base.LanguageType
|
||||
|
||||
object ShuttleVoiceManager {
|
||||
|
||||
fun sendWriteOffNumToClient(msg: String?) {
|
||||
val passengerMsg = AppConnectMsg(false, true, msg!!, -1)
|
||||
sendMsgToClient(passengerMsg)
|
||||
}
|
||||
|
||||
|
||||
fun arrivedStationBus(siteNameCN: String?, siteNameKR: String?) {
|
||||
val context = AbsMogoApplication.getApp()
|
||||
val list: MutableList<LangTtsEntity> = ArrayList()
|
||||
@@ -36,9 +33,25 @@ object ShuttleVoiceManager {
|
||||
list.add(chineseTTS)
|
||||
list.add(engTTS)
|
||||
list.add(koreanTTS)
|
||||
|
||||
}
|
||||
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL1,null)
|
||||
if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode)) {
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL1,null)
|
||||
} else if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode)) {
|
||||
siteNameCN?.let {
|
||||
sendArrivedStationToClient(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun sendArrivedStationToClient(arriveStation: String) {
|
||||
val arrivedMsg = AppConnectMsg(
|
||||
isViewShow = false,
|
||||
isPlay = true,
|
||||
msg = ResourcesUtils.getString(R.string.bus_arrived_station_tip,arriveStation),
|
||||
)
|
||||
LanSocketManager.sendMsgToClient(arrivedMsg)
|
||||
}
|
||||
|
||||
fun leaveStationBus(siteNameCN: String?, siteNameKR: String?) {
|
||||
@@ -60,9 +73,26 @@ object ShuttleVoiceManager {
|
||||
context.getString(R.string.bus_leave_station_korean_tip, siteNameKR ?: it),
|
||||
LanguageType.KOREAN
|
||||
)
|
||||
|
||||
list.add(koreanTTS)
|
||||
}
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL1,null)
|
||||
|
||||
if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode)) {
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL1,null)
|
||||
} else if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode)) {
|
||||
siteNameCN?.let {
|
||||
sendStartStationToClient(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun sendStartStationToClient(nextStation: String) {
|
||||
val startMsg = AppConnectMsg(
|
||||
isViewShow = false,
|
||||
isPlay = true,
|
||||
msg = ResourcesUtils.getString(R.string.bus_leave_station_tip,nextStation),
|
||||
)
|
||||
LanSocketManager.sendMsgToClient(startMsg)
|
||||
}
|
||||
|
||||
fun endOrderBus() {
|
||||
@@ -74,17 +104,45 @@ object ShuttleVoiceManager {
|
||||
list.add(chineseTTS)
|
||||
list.add(engTTS)
|
||||
list.add(koreanTTS)
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL0,null)
|
||||
|
||||
if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode)) {
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL0,null)
|
||||
} else if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode)) {
|
||||
sendEndTaskToClient()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun sendEndTaskToClient() {
|
||||
val endMsg = AppConnectMsg(
|
||||
isViewShow = false,
|
||||
isPlay = true,
|
||||
msg = ResourcesUtils.getString(R.string.bus_end_task_tip),
|
||||
)
|
||||
LanSocketManager.sendMsgToClient(endMsg)
|
||||
}
|
||||
|
||||
|
||||
fun writeOffCount(successNum:Int){
|
||||
if(successNum<=1){
|
||||
VoiceNotice.showNotice("核验通过", AIAssist.LEVEL3);
|
||||
VoiceNotice.showNotice("核验通过", AIAssist.LEVEL3)
|
||||
//sendWriteOffNumToClient("核验通过")
|
||||
}else{
|
||||
VoiceNotice.showNotice("$successNum 人核验通过", AIAssist.LEVEL3)
|
||||
//sendWriteOffNumToClient("$successNum 人核验通过")
|
||||
}
|
||||
}
|
||||
|
||||
private fun sendWriteOffNumToClient(msg: String?) {
|
||||
val passengerMsg = AppConnectMsg(
|
||||
isViewShow = false,
|
||||
isPlay = true,
|
||||
msg = msg!!,
|
||||
)
|
||||
LanSocketManager.sendMsgToClient(passengerMsg)
|
||||
}
|
||||
|
||||
|
||||
// 距离发车还有1分钟
|
||||
fun showLeafTime(tips: String) {
|
||||
//语音提示
|
||||
|
||||
Reference in New Issue
Block a user