Exclude empty text in utterances

This commit is contained in:
Hongbo Wu
2022-09-07 22:48:06 +08:00
parent 186f5c4df7
commit f927f879fd

View File

@ -300,7 +300,7 @@ export const htmlToSpeechFile = (
wordOffset,
node.nodeName === 'BLOCKQUOTE' ? options.secondaryVoice : undefined
)
utterances.push(utterance)
utterance.wordCount > 0 && utterances.push(utterance)
wordOffset += utterance.wordCount
}
}