Skip to content

Commit e06bdc6

Browse files
committed
Minor Changes
1 parent 5726d82 commit e06bdc6

File tree

3 files changed

+53
-45
lines changed

3 files changed

+53
-45
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# synth-me
1+
# NLP TTS System in Hindi
22

3-
Synth-me is a concatenative text-to-speech engine implemented in Python.
3+
This is a concatenative text-to-speech engine implemented in Python.
44

55
I started this project in January 2015 because I was intrigued by text-to-speech software and wanted to learn more about how it worked.
66

synthme.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# t = "भेजना चाहते हैं हिंदी में मैसेज लेकिन नहीं"
1414
# for i in t:
1515
# print(i)
16-
ज़ू
16+
# ज़ू
1717

1818

1919
tts.text_to_speech(message, debug=True, use_pronunciation_dict=True)

synthme/convertphonemes.py

Lines changed: 50 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -55,44 +55,44 @@ def phoneme_scan(word):
5555
word = replace_with_phoneme(word, r'th', (phonemes.CONS_TH,))
5656
word = replace_with_phoneme(word, r'ck', (phonemes.CONS_K,))
5757

58-
# Default letters
59-
60-
61-
62-
63-
64-
65-
66-
67-
68-
69-
70-
71-
72-
73-
74-
75-
76-
77-
78-
79-
80-
81-
82-
83-
84-
85-
86-
87-
88-
89-
90-
91-
92-
93-
94-
95-
58+
# # Default letters
59+
#
60+
#
61+
#
62+
#
63+
#
64+
#
65+
#
66+
#
67+
#
68+
#
69+
#
70+
#
71+
#
72+
#
73+
#
74+
#
75+
#
76+
#
77+
#
78+
#
79+
#
80+
#
81+
#
82+
#
83+
#
84+
#
85+
#
86+
#
87+
#
88+
#
89+
#
90+
#
91+
#
92+
#
93+
#
94+
#
95+
#
9696

9797
word = replace_with_phoneme(word, "आ", (phonemes.VOWEL_A,))
9898
word = replace_with_phoneme(word, "ा", (phonemes.VOWEL_A,))
@@ -102,8 +102,18 @@ def phoneme_scan(word):
102102
word = replace_with_phoneme(word, "ग", (phonemes.CONS_G,))
103103
word = replace_with_phoneme(word, "घ", (phonemes.CONS_G,))
104104
word = replace_with_phoneme(word, "ङ", (phonemes.CONS_D,))
105+
106+
word = replace_with_phoneme(word, "च", (phonemes.CONS_CH,))
107+
word = replace_with_phoneme(word, "छ", (phonemes.CONS_JJ,))
108+
word = replace_with_phoneme(word, "ज", (phonemes.CONS_J,))
109+
word = replace_with_phoneme(word, "झ", (phonemes.CONS_JJ,))
110+
111+
112+
word = replace_with_phoneme(word, "ट", (phonemes.CONS_T,))
113+
word = replace_with_phoneme(word, "ठ", (phonemes.CONS_TH,))
114+
word = replace_with_phoneme(word, "द", (phonemes.CONS_TH2,))
115+
word = replace_with_phoneme(word, "ध", (phonemes.CONS_TH,))
105116

106-
word = replace_with_phoneme(word, "ङ", (phonemes.CONS_D,))
107117

108118
word = replace_with_phoneme(word, "ड", (phonemes.CONS_D,))
109119
word = replace_with_phoneme(word, "ढ", (phonemes.CONS_D,))
@@ -117,7 +127,6 @@ def phoneme_scan(word):
117127
word = replace_with_phoneme(word, "इ", (phonemes.VOWEL_I,))
118128
word = replace_with_phoneme(word, "ि", (phonemes.VOWEL_I,))
119129

120-
word = replace_with_phoneme(word, "ज", (phonemes.CONS_J,))
121130
word = replace_with_phoneme(word, "ल", (phonemes.CONS_L,))
122131
word = replace_with_phoneme(word, "म", (phonemes.CONS_M,))
123132
word = replace_with_phoneme(word, "न", (phonemes.CONS_N,))
@@ -131,7 +140,6 @@ def phoneme_scan(word):
131140
word = replace_with_phoneme(word, "र", (phonemes.CONS_R,))
132141

133142
word = replace_with_phoneme(word, "स", (phonemes.CONS_S,))
134-
word = replace_with_phoneme(word, "ट", (phonemes.CONS_T,))
135143
word = replace_with_phoneme(word, "अ", (phonemes.VOWEL_U,))
136144
word = replace_with_phoneme(word, "व", (phonemes.CONS_V,))
137145
# word = replace_with_phoneme(word, "w", (phonemes.CONS_W,))
@@ -142,7 +150,7 @@ def phoneme_scan(word):
142150
word = replace_with_phoneme(word, ",", (phonemes.PUNC_COMMA,))
143151
word = replace_with_phoneme(word, ";", (phonemes.PUNC_COMMA,))
144152
word = replace_with_phoneme(word, "!", (phonemes.PUNC_EXCLAIM,))
145-
return word
153+
return word
146154

147155
def replace_with_phoneme(word, letters, phoneme_ids):
148156
result = ""

0 commit comments

Comments
 (0)