From b337735c9d7197cedbb3ffc95ce16c3510c1a264 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Thu, 25 Aug 2022 18:52:10 +0800 Subject: [PATCH] Do not throw error if failed to synthesize self-closing tags elements --- packages/api/src/utils/textToSpeech.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/api/src/utils/textToSpeech.ts b/packages/api/src/utils/textToSpeech.ts index b75265743..c0327ab63 100644 --- a/packages/api/src/utils/textToSpeech.ts +++ b/packages/api/src/utils/textToSpeech.ts @@ -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 }