Merge pull request #1748 from MycroftAI/bugfix/mimic2_tts_normalized_numbers
restrict str.replace from doing a global string replacementpull/1753/head
commit
90d3d7494c
|
@ -246,7 +246,7 @@ class Mimic2(TTS):
|
|||
for num in numbers
|
||||
]
|
||||
for num, norm_num in normalized_num:
|
||||
sentence = sentence.replace(num, norm_num)
|
||||
sentence = sentence.replace(num, norm_num, 1)
|
||||
except TypeError:
|
||||
LOG.exception("type error in mimic2_tts.py _normalized_numbers()")
|
||||
return sentence
|
||||
|
|
Loading…
Reference in New Issue