|
|
@ -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 {
|
|
|
|