asahi417 commited on
Commit
c8c2430
·
1 Parent(s): e7cdb68
Files changed (2) hide show
  1. attach_speaker_embedding_s2s.py +2 -1
  2. main_s2s.sh +1 -1
attach_speaker_embedding_s2s.py CHANGED
@@ -15,6 +15,7 @@ dataset = load_dataset(f"{hf_org}/{hf_dataset}", f"subset_{dataset_id}", split="
15
  audio_loader = Audio()
16
  se_model = os.getenv("SE_MODEL", "metavoice")
17
  max_seq_length = 10000000
 
18
 
19
  if se_model == "metavoice":
20
  from speaker_embedding_metavoice import MetaVoiceSE
@@ -39,7 +40,7 @@ def error_file(example):
39
  for side in sides:
40
  try:
41
  wav = audio_loader.decode_example(example[f"{side}.audio"])
42
- if len(wav["array"]) == 0 or len(wav["array"]) > max_seq_length:
43
  return False
44
  except ValueError:
45
  return False
 
15
  audio_loader = Audio()
16
  se_model = os.getenv("SE_MODEL", "metavoice")
17
  max_seq_length = 10000000
18
+ min_seq_length = 50000
19
 
20
  if se_model == "metavoice":
21
  from speaker_embedding_metavoice import MetaVoiceSE
 
40
  for side in sides:
41
  try:
42
  wav = audio_loader.decode_example(example[f"{side}.audio"])
43
+ if len(wav["array"]) < min_seq_length or len(wav["array"]) > max_seq_length:
44
  return False
45
  except ValueError:
46
  return False
main_s2s.sh CHANGED
@@ -410,7 +410,7 @@ export DIRECTION="enA-zhA"
410
  python attach_speaker_embedding_s2s.py
411
 
412
  export SE_MODEL="w2vbert-600m" # running
413
- export DATASET_ID=165
414
  export DIRECTION="enA-zhA"
415
  python attach_speaker_embedding_s2s.py
416
 
 
410
  python attach_speaker_embedding_s2s.py
411
 
412
  export SE_MODEL="w2vbert-600m" # running
413
+ export DATASET_ID=167
414
  export DIRECTION="enA-zhA"
415
  python attach_speaker_embedding_s2s.py
416