Do not throw error if failed to synthesize self-closing tags elements

This commit is contained in:
Hongbo Wu 2022-08-25 18:52:10 +08:00
parent a00116621e
commit b337735c9d

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
}