Merge pull request #1818 from MycroftAI/feature/mimic2-phoenetic-spelling
Use the phonetic_spellings.txt in Mimic2pull/1013/merge
commit
b9c4f2d10e
|
@ -2,3 +2,4 @@ jalepeno: hallipeenyo
|
|||
ai: A.I.
|
||||
mycroftai: mycroft A.I.
|
||||
spotify: spot-ify
|
||||
corgi: core-gee
|
||||
|
|
|
@ -279,6 +279,14 @@ class Mimic2(TTS):
|
|||
create_signal("isSpeaking")
|
||||
|
||||
sentence = self._normalized_numbers(sentence)
|
||||
|
||||
# Use the phonetic_spelling mechanism from the TTS base class
|
||||
if self.phonetic_spelling:
|
||||
for word in re.findall(r"[\w']+", sentence):
|
||||
if word.lower() in self.spellings:
|
||||
sentence = sentence.replace(word,
|
||||
self.spellings[word.lower()])
|
||||
|
||||
chunks = sentence_chunker(sentence, self.chunk_size)
|
||||
for idx, req in enumerate(self._requests(chunks)):
|
||||
results = req.result().json()
|
||||
|
|
Loading…
Reference in New Issue