Skip to content

Commit

Permalink
bugfix T164917
Browse files Browse the repository at this point in the history
  • Loading branch information
Harald Berthelsen committed May 11, 2017
1 parent 6d80f4b commit 41eaf0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions wikispeech_mockup/adapters/marytts_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ def marytts_preproc(text, lang, tp_config, input_type="text"):
if input_type == "ssml":
text = mapSsmlTranscriptionsToMary(text, lang, tp_config)

#FIX FOR ISSUE T164917: 600-talet loses number
#Marytts uses ICU to expand numerals, but only numerals that are a full token.
#In cases like this the number is just dropped.
#The very simple fix is to insert space before the hyphen
text = re.sub(r"([0-9]+)-tal",r"\1 -tal", text)

payload = {
"INPUT_TYPE": mary_input_type,
#"OUTPUT_TYPE": "WORDS",
Expand Down

0 comments on commit 41eaf0a

Please sign in to comment.