asahi417 commited on
Commit
6c57588
1 Parent(s): ea2d517
Files changed (2) hide show
  1. fetch_dataset_s2t.py +1 -2
  2. main_s2t.sh +13 -1
fetch_dataset_s2t.py CHANGED
@@ -81,8 +81,7 @@ def get_metadata():
81
  df = pd.read_csv(meta_data_path.replace(".gz", ""), sep=r'[\t\s]', header=None)
82
  df = df[[0, 2, 3, 4, 9, 10, 11, 12]]
83
  df.columns = ["id", "url", "duration_start", "duration_end", "laser_score", "direction", "side", "line_no"]
84
- if direction == "enA-jpn":
85
- df = df[df["side"] == "enA"]
86
  assert len(df["direction"].unique()) == 1
87
  df.pop("direction")
88
  return df.sort_values(by=["line_no", "side"])
 
81
  df = pd.read_csv(meta_data_path.replace(".gz", ""), sep=r'[\t\s]', header=None)
82
  df = df[[0, 2, 3, 4, 9, 10, 11, 12]]
83
  df.columns = ["id", "url", "duration_start", "duration_end", "laser_score", "direction", "side", "line_no"]
84
+ df = df[df["side"] == "enA"]
 
85
  assert len(df["direction"].unique()) == 1
86
  df.pop("direction")
87
  return df.sort_values(by=["line_no", "side"])
main_s2t.sh CHANGED
@@ -35,6 +35,18 @@ do
35
  cat seamless.dataset.metadata.public.${DIRECTION_SPEECH}-${DIRECTION_TEXT}.withduration.reordered.batch_${i}.tsv | egrep ^crawl-data | tr '\t' ' ' | wet_lines | tee metadata.${DIRECTION_SPEECH}-${DIRECTION_TEXT}.batch_${i}.tsv &
36
  done
37
  python format_text.py
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
 
40
  ######################
@@ -51,7 +63,7 @@ do
51
  done
52
  python format_text.py
53
  # audio
54
- for i in $(seq 140 294);
55
  do
56
  export N_POOL=15
57
  export DATASET_ID=${i}
 
35
  cat seamless.dataset.metadata.public.${DIRECTION_SPEECH}-${DIRECTION_TEXT}.withduration.reordered.batch_${i}.tsv | egrep ^crawl-data | tr '\t' ' ' | wet_lines | tee metadata.${DIRECTION_SPEECH}-${DIRECTION_TEXT}.batch_${i}.tsv &
36
  done
37
  python format_text.py
38
+ # audio
39
+ for i in $(seq 1 300);
40
+ do
41
+ export N_POOL=15
42
+ export DATASET_ID=${i}
43
+ export DIRECTION_SPEECH="enA"
44
+ export DIRECTION_TEXT="est"
45
+ export LINE_NO_START=$(((DATASET_ID-1) * 2500))
46
+ export LINE_NO_END=$((DATASET_ID * 2500))
47
+ echo ${LINE_NO_START}
48
+ python fetch_dataset_s2t.py
49
+ done
50
 
51
 
52
  ######################
 
63
  done
64
  python format_text.py
65
  # audio
66
+ for i in $(seq 1 294);
67
  do
68
  export N_POOL=15
69
  export DATASET_ID=${i}