Spaces:
Sleeping
Sleeping
Update phonemizer.py
Browse files- phonemizer.py +5 -2
phonemizer.py
CHANGED
|
@@ -103,6 +103,7 @@ def process_sentence(sentence, tagger, pattern, punctuation):
|
|
| 103 |
phoneme_list.append(word)
|
| 104 |
else: # If it's a word, process normally
|
| 105 |
words = word.replace('_', ' ').split("\u200c")
|
|
|
|
| 106 |
for w in words:
|
| 107 |
phonemes = get_phonemes(w)
|
| 108 |
kaamel_phonemes = ambiguity_dict.get(w)
|
|
@@ -124,8 +125,10 @@ def process_sentence(sentence, tagger, pattern, punctuation):
|
|
| 124 |
phonemes += 'je'
|
| 125 |
else:
|
| 126 |
phonemes += 'e'
|
| 127 |
-
|
| 128 |
-
|
|
|
|
|
|
|
| 129 |
tag_index += 1 # Move to next tagged word
|
| 130 |
|
| 131 |
phoneme_text = ' '.join(phoneme_list)
|
|
|
|
| 103 |
phoneme_list.append(word)
|
| 104 |
else: # If it's a word, process normally
|
| 105 |
words = word.replace('_', ' ').split("\u200c")
|
| 106 |
+
phoneme_for_word_list = []
|
| 107 |
for w in words:
|
| 108 |
phonemes = get_phonemes(w)
|
| 109 |
kaamel_phonemes = ambiguity_dict.get(w)
|
|
|
|
| 125 |
phonemes += 'je'
|
| 126 |
else:
|
| 127 |
phonemes += 'e'
|
| 128 |
+
|
| 129 |
+
phoneme_for_word_list.append(phonemes)
|
| 130 |
+
phoneme_for_word = "".join(phoneme_for_word_list)
|
| 131 |
+
phoneme_list.append(phoneme_for_word)
|
| 132 |
tag_index += 1 # Move to next tagged word
|
| 133 |
|
| 134 |
phoneme_text = ' '.join(phoneme_list)
|