|
@@ -3,6 +3,17 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
+import Speech from 'speak-tts';
|
|
|
+import http from '@/api';
|
|
|
+const { proxy } = getCurrentInstance() as any;
|
|
|
+let speech = new Speech();
|
|
|
+if (speech.hasBrowserSupport()) {
|
|
|
+ proxy?.$modal.msgWarning(`不支持TTS`);
|
|
|
+ http?.common.baiduToken({}).then((res: any) => {
|
|
|
+ let tok = res.token;
|
|
|
+ localStorage.setItem('tok', tok);
|
|
|
+ });
|
|
|
+}
|
|
|
// import { useWebSocket } from '@/utils/handWs';
|
|
|
// const { handWs, startDevice, startHand, stateHand } = useWebSocket();
|
|
|
|