From 609120f3da80d9622fc14803b05faf4bf476013a Mon Sep 17 00:00:00 2001 From: Nicolas Panel Date: Sun, 14 Oct 2018 13:48:59 +0200 Subject: [PATCH] [TrainingSpeech importer] stick to data/alphabet.txt aims to generate english-complatible dataset since no FR alphabet.txt for now see https://github.com/mozilla/DeepSpeech/pull/1599#issuecomment-426544379 for more info --- bin/import_ts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/import_ts.py b/bin/import_ts.py index a2d061ca..51d91153 100755 --- a/bin/import_ts.py +++ b/bin/import_ts.py @@ -11,6 +11,7 @@ import sys sys.path.insert(1, os.path.join(sys.path[0], '..')) import csv +import unidecode import zipfile from os import path @@ -96,7 +97,7 @@ def cleanup_transcript(text): text = text.replace('’', "'").replace('\u00A0', ' ') text = PUNCTUATIONS_REG.sub(' ', text) text = MULTIPLE_SPACES_REG.sub(' ', text) - return text.strip().lower() + return unidecode.unidecode(text).strip().lower() if __name__ == "__main__":