预警模拟数据tts播报

This commit is contained in:
liujing
2021-03-29 11:44:35 +08:00
parent 18767208cc
commit 471c45f68d
3 changed files with 73 additions and 11 deletions

View File

@@ -8,12 +8,15 @@ import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.mogo.commons.voice.AIAssist;
import com.mogo.commons.voice.VoicePreemptType;
import com.mogo.module.common.entity.V2XWarningEntity;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.v2x.listener.V2XWindowStatusListener;
import com.mogo.module.v2x.scenario.scene.V2XBasWindow;
import com.mogo.module.v2x.scenario.view.IV2XWindow;
import com.mogo.module.v2x.utils.V2XUtils;
import com.mogo.utils.logger.Logger;
/**
@@ -59,7 +62,9 @@ public class V2XWarningWindow extends V2XBasWindow implements IV2XWindow {
public void show(Object entity) {
if (entity != null) {
mV2XWarningEntity = (V2XWarningEntity) entity;
distance.setText(String.valueOf(mV2XWarningEntity.getDistance())+"");
distance.setText(String.valueOf(mV2XWarningEntity.getDistance()) + "");
warningTextView.setText(mV2XWarningEntity.getTipContent());
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice(mV2XWarningEntity.getTts());
}
if (runnableV2XEvent == null) {
runnableV2XEvent = () -> {