File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
setup (
4
4
name = 'tts_preprocess_et' ,
5
- version = '1.0.1 ' ,
5
+ version = '1.1.0 ' ,
6
6
packages = find_packages (),
7
7
license = 'MIT' ,
8
8
description = 'Preprocessing for Estonian text-to-speech applications' ,
Original file line number Diff line number Diff line change @@ -731,12 +731,16 @@ def spell_if_needed(match):
731
731
Most simplistic approach - any letter sequence that does not contain a vowel is unpronouncable
732
732
All single letters and consonant sequences are spelled out (converted to their pronunciations)
733
733
For example php -> pee-haa-pee
734
+ Exceptions are filler words such as "hmm", "mm", etc.
734
735
:param re.match
735
736
:return: str
736
737
"""
737
738
seq = match .group ()
738
739
if re .search ('[AEIOUÕÄÖÜaeiouõäöü]' , seq ) and (len (seq ) > 1 ):
739
740
return seq
741
+ # if sequence contains only m and h, skip it
742
+ elif re .match (r'^[MHmh]+$' , seq ):
743
+ return seq
740
744
else :
741
745
pronunciation = ""
742
746
for i , letter in enumerate (seq ):
You can’t perform that action at this time.
0 commit comments