diff --git a/modules/talkinghead.mjs b/modules/talkinghead.mjs index 58f95f9..47c74d5 100755 --- a/modules/talkinghead.mjs +++ b/modules/talkinghead.mjs @@ -2026,7 +2026,7 @@ class TalkingHead { // Classifiers const dividersSentence = /[!\.\?\n\p{Extended_Pictographic}]/ug; const dividersWord = /[ ]/ug; - const speakables = /[\p{L}\p{N},\.'!€\$\+\-–—%&\?]/ug; + const speakables = /[\p{L}\p{N},\.'!€\$\+\p{Dash_Punctuation}%&\?]/ug; const emojis = /[\p{Extended_Pictographic}]/ug; const lipsyncLang = opt.lipsyncLang || this.avatar.lipsyncLang || this.opt.lipsyncLang; @@ -2474,7 +2474,8 @@ class TalkingHead { .replaceAll('<','<') .replaceAll('>','>') .replaceAll('"','"') - .replaceAll('\'','''); + .replaceAll('\'',''') + .replace(/^\p{Dash_Punctuation}$/ug,''); }); ssml += "";