[6.6.0]
[b1 b2 tts 策略变更]
This commit is contained in:
@@ -1058,7 +1058,7 @@ public class OrderModel {
|
||||
OCHSocketMessageManager.INSTANCE.pushAppOperationalMsgBox(
|
||||
DateTimeUtil.getCurrentTimeStamp(),
|
||||
tips,OCHSocketMessageManager.OPERATION_SYSTEM);
|
||||
BusVoiceManager.INSTANCE.leafTime(tips);
|
||||
BusVoiceManager.INSTANCE.showLeafTime(tips);
|
||||
}
|
||||
|
||||
Runnable tip1Runnable = () -> {
|
||||
|
||||
@@ -290,12 +290,6 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
@Override
|
||||
public void playPassenger(WriteOffPassenger passenger) {
|
||||
int passengerNum = passenger.passengerSize;
|
||||
if (passengerNum > 1) { //多人播报 "x人" ---》x人核验通过
|
||||
OrderModel.getInstance().sendWriteOffNumToClient(passengerNum + "人核验通过");
|
||||
} else { //是 1 播放 "滴" 2022.11.09 改为: "核验通过"
|
||||
// mView.playDI();
|
||||
OrderModel.getInstance().sendWriteOffNumToClient("核验通过");
|
||||
}
|
||||
BusVoiceManager.INSTANCE.writeOffCount(passengerNum);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@ import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.och.bus.R
|
||||
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.tts.base.LangTtsEntity
|
||||
import com.mogo.tts.base.LanguageType
|
||||
@@ -12,14 +15,6 @@ import java.util.ArrayList
|
||||
|
||||
object BusVoiceManager {
|
||||
|
||||
fun writeOffCount(successNum:Int){
|
||||
if(successNum<=1){
|
||||
VoiceNotice.showNotice("核验通过", AIAssist.LEVEL3);
|
||||
}else{
|
||||
VoiceNotice.showNotice("$successNum 人核验通过", AIAssist.LEVEL3);
|
||||
}
|
||||
}
|
||||
|
||||
fun arrivedStationBus(siteNameCN: String?, siteNameKR: String?) {
|
||||
val context = AbsMogoApplication.getApp()
|
||||
val list: MutableList<LangTtsEntity> = ArrayList()
|
||||
@@ -33,15 +28,31 @@ object BusVoiceManager {
|
||||
LanguageType.ENGLISH
|
||||
)
|
||||
val koreanTTS = LangTtsEntity(
|
||||
context.getString(R.string.bus_arrived_station_korean_tip, siteNameKR?:it),
|
||||
context.getString(R.string.bus_arrived_station_korean_tip, siteNameKR ?: it),
|
||||
LanguageType.KOREAN
|
||||
)
|
||||
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?) {
|
||||
@@ -63,26 +74,89 @@ object BusVoiceManager {
|
||||
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() {
|
||||
val context = AbsMogoApplication.getApp()
|
||||
val list: MutableList<LangTtsEntity> = ArrayList()
|
||||
val chineseTTS = LangTtsEntity(context.getString(R.string.bus_end_task_tip), LanguageType.CHINESE)
|
||||
val engTTS = LangTtsEntity(context.getString(R.string.bus_end_task_english_tip), LanguageType.ENGLISH)
|
||||
val koreanTTS = LangTtsEntity(context.getString(R.string.bus_end_task_korean_tip), LanguageType.KOREAN)
|
||||
val chineseTTS =
|
||||
LangTtsEntity(context.getString(R.string.bus_end_task_tip), LanguageType.CHINESE)
|
||||
val engTTS = LangTtsEntity(
|
||||
context.getString(R.string.bus_end_task_english_tip),
|
||||
LanguageType.ENGLISH
|
||||
)
|
||||
val koreanTTS =
|
||||
LangTtsEntity(context.getString(R.string.bus_end_task_korean_tip), LanguageType.KOREAN)
|
||||
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()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun leafTime(tips: String) {
|
||||
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)
|
||||
//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) {
|
||||
//语音提示
|
||||
VoiceNotice.showNotice(tips);
|
||||
VoiceNotice.showNotice(tips)
|
||||
}
|
||||
|
||||
fun writeOffFaile(reaseon: String) {
|
||||
VoiceNotice.showNotice(reaseon, AIAssist.LEVEL3)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user