Skip to content

Commit 9b265f4

Browse files
committed
Made the brackets and parentheses fixes from the last commit global rather than English-only
1 parent 08213c2 commit 9b265f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

addon/synthDrivers/ibmeci.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
re.compile(br"([a-z]+)\s+(\(s\))", re.I): br"\1\2",
6868
#Removes spaces if a string is followed by a punctuation mark, since ViaVoice doesn't tolerate that.
6969
re.compile(br"([a-z]+|\d+|\W+)\s+([:.!;,?](?![a-z]|\d))", re.I): br"\1\2",
70+
#Remove the two spaces separator between strings containing left and right brackets and parentheses, to reduce the verbosity in IBMTTS.
71+
re.compile(br'([\(\[]+) (.)'): br'\1\2',
72+
re.compile(br'(.) ([\)\]]+)'): br'\1\2',
7073
}
7174
english_ibm_fixes = {
7275
#Mostly duplicates english_fixes, but removes unneded replacements.
@@ -97,9 +100,6 @@
97100
re.compile(br'\b(\d{1,3}),(000),(\d{1,3}),(\d{1,3})\b'): br'\1\2\3\4',
98101
re.compile(br'\b(\d{1,3}),(000),(\d{1,3}),(\d{1,3}),(\d{1,3})\b'): br'\1\2\3\4\5',
99102
re.compile(br'\b(\d{1,3}),(000),(\d{1,3}),(\d{1,3}),(\d{1,3}),(\d{1,3})\b'): br'\1\2\3\4\5\6',
100-
#Remove the two spaces separator between strings containing left and right brackets and parentheses, to reduce the verbosity in IBMTTS.
101-
re.compile(br'([\(\[]+) (.)'): br'\1\2',
102-
re.compile(br'(.) ([\)\]]+)'): br'\1\2',
103103
}
104104
spanish_fixes = {
105105
# Euros

0 commit comments

Comments
 (0)