Merge branch 'dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0' into dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0
This commit is contained in:
@@ -20,6 +20,7 @@ import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.module.status.StatusDescriptor;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
@@ -67,6 +68,8 @@ import com.mogo.och.common.module.utils.NumberFormatUtil;
|
||||
import com.mogo.och.common.module.utils.PinYinUtil;
|
||||
import com.mogo.och.common.module.utils.ToastUtilsOch;
|
||||
import com.mogo.och.common.module.voice.VoiceNotice;
|
||||
import com.mogo.tts.base.LangTtsEntity;
|
||||
import com.mogo.tts.base.LanguageType;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -714,9 +717,28 @@ public class OrderModel {
|
||||
, isLastStop);
|
||||
}
|
||||
|
||||
VoiceNotice.showNotice(String.format(mContext
|
||||
// VoiceNotice.showNotice(String.format(mContext
|
||||
// .getString(R.string.bus_arrived_station_tip),
|
||||
// arriveStation));
|
||||
|
||||
ttsArrivedStation(arriveStation);
|
||||
}
|
||||
|
||||
private void ttsArrivedStation(String arriveStation){
|
||||
List<LangTtsEntity> list = new ArrayList<>();
|
||||
LangTtsEntity chineseTTS = new LangTtsEntity(String.format(mContext
|
||||
.getString(R.string.bus_arrived_station_tip),
|
||||
arriveStation));
|
||||
arriveStation), LanguageType.CHINESE);
|
||||
LangTtsEntity engTTS = new LangTtsEntity(String.format(mContext
|
||||
.getString(R.string.bus_arrived_station_english_tip),
|
||||
arriveStation), LanguageType.ENGLISH);
|
||||
LangTtsEntity koreanTTS = new LangTtsEntity(String.format(mContext
|
||||
.getString(R.string.bus_arrived_station_korean_tip),
|
||||
arriveStation), LanguageType.KOREAN);
|
||||
list.add(chineseTTS);
|
||||
list.add(engTTS);
|
||||
list.add(koreanTTS);
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -768,9 +790,30 @@ public class OrderModel {
|
||||
|
||||
//车站10s后播报
|
||||
private void leaveTTSTips(String nextStation) {
|
||||
VoiceNotice.showNotice(String.format(mContext
|
||||
.getString(R.string.bus_leave_station_tip),
|
||||
nextStation), DELAY_10S);
|
||||
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<LangTtsEntity> list = new ArrayList<>();
|
||||
LangTtsEntity chineseTTS = new LangTtsEntity(String.format(mContext
|
||||
.getString(R.string.bus_leave_station_tip),
|
||||
nextStation), LanguageType.CHINESE);
|
||||
LangTtsEntity engTTS = new LangTtsEntity(String.format(mContext
|
||||
.getString(R.string.bus_leave_station_english_tip),
|
||||
nextStation), LanguageType.ENGLISH);
|
||||
LangTtsEntity koreanTTS = new LangTtsEntity(String.format(mContext
|
||||
.getString(R.string.bus_leave_station_korean_tip),
|
||||
nextStation), LanguageType.KOREAN);
|
||||
list.add(chineseTTS);
|
||||
list.add(engTTS);
|
||||
list.add(koreanTTS);
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL0);
|
||||
}
|
||||
},DELAY_10S);
|
||||
|
||||
// VoiceNotice.showNotice(String.format(mContext
|
||||
// .getString(R.string.bus_leave_station_tip),
|
||||
// nextStation), DELAY_10S);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1014,7 +1057,7 @@ public class OrderModel {
|
||||
queryBusRoutes();// 重新获取任务
|
||||
removeTipRunnables();
|
||||
// startOrStopQueryPassengerWriteOff(false);
|
||||
VoiceNotice.showNotice(mContext.getString(R.string.bus_end_task_tip));
|
||||
ttsEndTask();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1038,6 +1081,21 @@ public class OrderModel {
|
||||
});
|
||||
}
|
||||
|
||||
private void ttsEndTask() {
|
||||
// VoiceNotice.showNotice(mContext.getString(R.string.bus_end_task_tip));
|
||||
List<LangTtsEntity> list = new ArrayList<>();
|
||||
LangTtsEntity chineseTTS = new LangTtsEntity(mContext
|
||||
.getString(R.string.bus_end_task_tip), LanguageType.CHINESE);
|
||||
LangTtsEntity engTTS = new LangTtsEntity(mContext
|
||||
.getString(R.string.bus_end_task_english_tip), LanguageType.ENGLISH);
|
||||
LangTtsEntity koreanTTS = new LangTtsEntity(mContext
|
||||
.getString(R.string.bus_end_task_korean_tip), LanguageType.KOREAN);
|
||||
list.add(chineseTTS);
|
||||
list.add(engTTS);
|
||||
list.add(koreanTTS);
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 到站
|
||||
*
|
||||
|
||||
@@ -43,8 +43,16 @@
|
||||
|
||||
<!-- region tts -->
|
||||
<string name="bus_arrived_station_tip">已到达%1$s,带好随身物品,下车请注意安全。</string>
|
||||
<string name="bus_arrived_station_english_tip">We are arriving at %1$s ,get off with your belongings</string>
|
||||
<string name="bus_arrived_station_korean_tip">%1$s 역에 도착했습니다 , 소지품 챙겨서 내리세요</string>
|
||||
|
||||
<string name="bus_leave_station_tip">车辆起步,请扶稳坐好,前方到站是%1$s,请下车的乘客做好准备。</string>
|
||||
<string name="bus_leave_station_english_tip">The next station is %1$s ,please get ready for your arrival</string>
|
||||
<string name="bus_leave_station_korean_tip">전방에서 역에 도착하는 %1$s ,차에서 내리는 승객은 준비하세요</string>
|
||||
|
||||
<string name="bus_end_task_tip">感谢您体验\'蘑菇车联\'自动驾驶小巴车,我们下次再见。</string>
|
||||
<string name="bus_end_task_english_tip">Thank you for experiencing the self-driving minibus. See you next time</string>
|
||||
<string name="bus_end_task_korean_tip">자율주행 버스를 체험해 주셔서 감사합니다. 다음에 또 뵙겠습니다</string>
|
||||
<!-- endregion -->
|
||||
|
||||
<string name="bus_before_tips_s">距离发车时间还有%1$s分钟</string>
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.mogo.och.common.module.voice
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.tts.base.LangTtsEntity
|
||||
import com.mogo.tts.base.MultiLangTtsEntity
|
||||
|
||||
object VoiceNotice {
|
||||
@JvmStatic
|
||||
@@ -46,4 +48,9 @@ object VoiceNotice {
|
||||
AIAssist.getInstance(AbsMogoApplication.getApp()).stopTts()
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun showNotice(listTTS: MutableList<LangTtsEntity>, level: Int) {
|
||||
AIAssist.getInstance(AbsMogoApplication.getApp())
|
||||
.speakMultiLangTTSWithLevel(MultiLangTtsEntity(listTTS), level,null) }
|
||||
}
|
||||
@@ -481,6 +481,8 @@ Object readFileToJson(env){
|
||||
def variantName() {
|
||||
if(gradle.startParameter.taskNames.size()>0) {
|
||||
def taskName = gradle.startParameter.taskNames[0]
|
||||
taskName = taskName.replace("Debug","")
|
||||
taskName = taskName.replace("Release","")
|
||||
if (taskName.endsWith("Qa")) {
|
||||
return "qa"
|
||||
} else if (taskName.endsWith("Online")) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"socket_tech_url": ""
|
||||
},
|
||||
"online": {
|
||||
"och_url": "http://tech-dev.zhidaohulian.com",
|
||||
"och_url": "http://tech.zhidaohulian.com",
|
||||
"shuttle_url": "https://och-driver.zhidaozhixing.com",
|
||||
"passport_url": "",
|
||||
"socket_base_url": "",
|
||||
|
||||
Reference in New Issue
Block a user