Merge pull request #1137 from omnivore-app/fix/synthesize-self-closing-tag

Do not throw error if failed to synthesize self-closing tags elements
This commit is contained in:
Hongbo Wu 2022-08-25 18:58:57 +08:00 committed by GitHub
commit 7cbb37e486
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -189,10 +189,10 @@ export const synthesizeTextToSpeech = async (
})
logger.debug(`synthesizing ${ssml}`)
const result = await speakSsmlAsyncPromise(ssml)
if (result.reason === ResultReason.Canceled) {
synthesizer.close()
throw new Error(result.errorDetails)
}
// if (result.reason === ResultReason.Canceled) {
// synthesizer.close()
// throw new Error(result.errorDetails)
// }
timeOffset = timeOffset + result.audioDuration
// characterOffset = characterOffset + htmlElement.innerText.length
}