feat:优化播放状态1

main
@0Melon0 12 months ago
parent 66524cf5df
commit c707e324b0

@ -207,10 +207,10 @@ export default {
this.showPopup = true;
this.playNum++;
if (this.synth) {
const utterance = new SpeechSynthesisUtterance([this.popupMsgList[0]].join(''));
utterance.rate = 0.4;
const utterance = new SpeechSynthesisUtterance(this.popupMsgList[0].replace(/#/g, ''));
utterance.rate = 0.6;
const voices = this.synth.getVoices();
const selectedVoice = voices.find(voice => voice.lang === 'zh-TW');
const selectedVoice = voices.find(voice => voice.lang === 'zh-CN');
if (selectedVoice) {
utterance.voice = selectedVoice;
} else {

Loading…
Cancel
Save