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

This commit is contained in:
Fabio Manganiello 2024-04-24 00:49:04 +02:00
parent 4734909912
commit 1192782729

View file

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