Merge pull request #2505 from tilmankamp/fixtudaswc

Fix: ms per char minimum for SWC and TUDA importers
This commit is contained in:
Tilman Kamp 2019-11-06 13:29:20 +01:00 committed by GitHub
commit 31b36c76b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -214,7 +214,7 @@ def collect_samples(base_dir, language):
elif duration > CLI_ARGS.max_duration > 0 and CLI_ARGS.ignore_too_long:
skip = True
p_reason = 'exceeded duration'
elif int(duration / 20) < len(text):
elif int(duration / 30) < len(text):
skip = True
p_reason = 'too short to decode'
elif duration / len(text) < 10:

View File

@ -76,7 +76,7 @@ def check_wav_file(wav_path, sentence): # pylint: disable=too-many-return-state
return False, 'wrong number of channels'
if sample_width != SAMPLE_WIDTH:
return False, 'wrong sample width'
if milliseconds / len(sentence) < 20:
if milliseconds / len(sentence) < 30:
return False, 'too short'
if milliseconds > CLI_ARGS.max_duration > 0:
return False, 'too long'