feat:优化播放状态1

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

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

Loading…
Cancel
Save