diff --git a/apps/readest-app/src/services/tts/TTSController.ts b/apps/readest-app/src/services/tts/TTSController.ts index 854fb1a3..4a9d876b 100644 --- a/apps/readest-app/src/services/tts/TTSController.ts +++ b/apps/readest-app/src/services/tts/TTSController.ts @@ -27,7 +27,7 @@ export class TTSController extends EventTarget { if (!ssml) { this.#nossmlCnt++; // FIXME: in case we are at the end of the book, need a better way to handle this - if (this.#nossmlCnt < 100) { + if (this.#nossmlCnt < 10) { await this.view.next(1); this.forward(); } @@ -47,8 +47,6 @@ export class TTSController extends EventTarget { if (lastCode === 'end') { this.forward(); - } else { - this.state = 'paused'; } } diff --git a/apps/readest-app/src/services/tts/WebSpeechClient.ts b/apps/readest-app/src/services/tts/WebSpeechClient.ts index 21e06cab..6c47dc2d 100644 --- a/apps/readest-app/src/services/tts/WebSpeechClient.ts +++ b/apps/readest-app/src/services/tts/WebSpeechClient.ts @@ -72,7 +72,8 @@ function findMark(charIndex: number, marks: TTSMark[]) { async function* speakWithBoundary(ssml: string) { const lang = getXmlLang(ssml); const { plainText, marks } = parseSSMLMarks(ssml); - // console.log('text', ssml, plainText, marks); + // console.log('ssml', ssml, marks); + // console.log('text', plainText); const synth = window.speechSynthesis; const utterance = new SpeechSynthesisUtterance(plainText);