| | |
| | | import androidx.work.WorkManager; |
| | | |
| | | import com.anyun.exam.lib.MyLog; |
| | | import com.anyun.exam.lib.util.Speaker; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Random; |
| | |
| | | private int examplatformStatus =1;//1-未连接(tcp连接不上) 3-未注册(设备没有注册) 5-未登录(鉴权未通过) |
| | | |
| | | private String id;//身份证 |
| | | |
| | | private Speaker speaker = null; |
| | | |
| | | private String ip; |
| | | private int port; |
| | |
| | | |
| | | return examPlatformStrs.get(work_platform); |
| | | } |
| | | |
| | | public Speaker getTTS(){ |
| | | if (speaker == null){ |
| | | throw new RuntimeException("请先初始化TTS,先调用initTTS"); |
| | | }else |
| | | return speaker; |
| | | } |
| | | |
| | | /** |
| | | * 初始化tts |
| | | * @param context |
| | | */ |
| | | public void initTTS(Context context){ |
| | | if (speaker == null){ |
| | | |
| | | speaker = new Speaker(context); |
| | | } |
| | | } |
| | | } |