Skip to content

Commit e32b857

Browse files
committed
Merge branch 'dev'
2 parents c9fadf1 + 6c93bb0 commit e32b857

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='tts_preprocess_et',
5-
version='1.0.1',
5+
version='1.1.0',
66
packages=find_packages(),
77
license='MIT',
88
description='Preprocessing for Estonian text-to-speech applications',

tts_preprocess_et/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,12 +731,16 @@ def spell_if_needed(match):
731731
Most simplistic approach - any letter sequence that does not contain a vowel is unpronouncable
732732
All single letters and consonant sequences are spelled out (converted to their pronunciations)
733733
For example php -> pee-haa-pee
734+
Exceptions are filler words such as "hmm", "mm", etc.
734735
:param re.match
735736
:return: str
736737
"""
737738
seq = match.group()
738739
if re.search('[AEIOUÕÄÖÜaeiouõäöü]', seq) and (len(seq) > 1):
739740
return seq
741+
# if sequence contains only m and h, skip it
742+
elif re.match(r'^[MHmh]+$', seq):
743+
return seq
740744
else:
741745
pronunciation = ""
742746
for i, letter in enumerate(seq):

0 commit comments

Comments
 (0)