[tts.picovoice] Convert digits before replacing other substrings.

This commit is contained in:
Fabio Manganiello 2024-04-24 00:49:04 +02:00
parent 6b20c2083b
commit 71e32e4775
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 3 additions and 1 deletions

View File

@ -59,10 +59,12 @@ class TextConversionUtils:
@classmethod
def convert(cls, text: str) -> str:
text = cls._convert_digits(text)
for pattern, replacement in TextConversionUtils._conversions_map:
text = pattern.sub(replacement, text)
return cls._convert_digits(text)
return text
class TtsPicovoicePlugin(TtsPlugin):