Skip to content

Commit

Permalink
Merge pull request mozilla#2505 from tilmankamp/fixtudaswc
Browse files Browse the repository at this point in the history
Fix: ms per char minimum for SWC and TUDA importers
  • Loading branch information
tilmankamp authored Nov 6, 2019
2 parents 80493c8 + 343d071 commit 31b36c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/import_swc.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def add_sample(p_wav_path, p_speaker, p_start, p_end, p_text, p_reason='complete
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:
Expand Down
2 changes: 1 addition & 1 deletion bin/import_tuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 31b36c7

Please sign in to comment.