Merge pull request #2505 from tilmankamp/fixtudaswc
Fix: ms per char minimum for SWC and TUDA importers
This commit is contained in:
commit
31b36c76b3
@ -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:
|
||||
|
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user