asahi417 commited on
Commit
10da330
·
1 Parent(s): fdfc0ef

add streamable seamlessm4t

Browse files
Files changed (2) hide show
  1. fetch_dataset_s2s.py +5 -1
  2. main_s2s.sh +128 -87
fetch_dataset_s2s.py CHANGED
@@ -49,7 +49,11 @@ min_seq_length = 50000
49
 
50
  def wget(url: str, output_file: Optional[str] = None):
51
  os.makedirs(os.path.dirname(output_file), exist_ok=True)
52
- subprocess.run(["wget", url, "-O", output_file, "--tries", wget_max_retry, "--timeout", wget_timeout])
 
 
 
 
53
  if not os.path.exists(output_file):
54
  return False
55
  if output_file.endswith('.tar.gz') or output_file.endswith('.tgz') or output_file.endswith('.tar'):
 
49
 
50
  def wget(url: str, output_file: Optional[str] = None):
51
  os.makedirs(os.path.dirname(output_file), exist_ok=True)
52
+ subprocess.check_output(
53
+ ["wget", url, "-O", output_file, "--tries", wget_max_retry, "--timeout", wget_timeout],
54
+ stderr=subprocess.STDOUT,
55
+ timeout=int(60 * 5) # seconds (if it takes more than 5 min, skip it)
56
+ )
57
  if not os.path.exists(output_file):
58
  return False
59
  if output_file.endswith('.tar.gz') or output_file.endswith('.tgz') or output_file.endswith('.tar'):
main_s2s.sh CHANGED
@@ -8,7 +8,7 @@ export LINE_NO_START=0
8
  export LINE_NO_END=10
9
  python fetch_dataset_s2s.py
10
  # main
11
- for i in $(seq 115 200);
12
  do
13
  export N_POOL=15
14
  export DATASET_ID=${i}
@@ -18,7 +18,7 @@ do
18
  echo ${LINE_NO_START}
19
  python fetch_dataset_s2s.py
20
  done
21
- for i in $(seq 519 550);
22
  do
23
  export N_POOL=15
24
  export DATASET_ID=${i}
@@ -28,7 +28,7 @@ do
28
  echo ${LINE_NO_START}
29
  python fetch_dataset_s2s.py
30
  done
31
- for i in $(seq 551 600);
32
  do
33
  export N_POOL=15
34
  export DATASET_ID=${i}
@@ -38,18 +38,7 @@ do
38
  echo ${LINE_NO_START}
39
  python fetch_dataset_s2s.py
40
  done
41
- # tokenize
42
- for i in $(seq 61 145);
43
- do
44
- export N_POOL=15
45
- export DATASET_ID=${i}
46
- export DIRECTION="enA-frA"
47
- export LINE_NO_START=$(((DATASET_ID-1) * 2500))
48
- export LINE_NO_END=$((DATASET_ID * 2500))
49
- echo ${LINE_NO_START}
50
- python tokenize_dataset_s2s.py
51
- done
52
- for i in $(seq 200 299);
53
  do
54
  export N_POOL=15
55
  export DATASET_ID=${i}
@@ -57,19 +46,10 @@ do
57
  export LINE_NO_START=$(((DATASET_ID-1) * 2500))
58
  export LINE_NO_END=$((DATASET_ID * 2500))
59
  echo ${LINE_NO_START}
60
- python tokenize_dataset_s2s.py
61
- done
62
- for i in $(seq 426 450);
63
- do
64
- export N_POOL=15
65
- export DATASET_ID=${i}
66
- export DIRECTION="enA-frA"
67
- export LINE_NO_START=$(((DATASET_ID-1) * 2500))
68
- export LINE_NO_END=$((DATASET_ID * 2500))
69
- echo ${LINE_NO_START}
70
- python tokenize_dataset_s2s.py
71
  done
72
- for i in $(seq 500 530);
 
73
  do
74
  export N_POOL=15
75
  export DATASET_ID=${i}
@@ -81,34 +61,10 @@ do
81
  done
82
  # speaker embedding
83
  export SE_MODEL="metavoice"
84
- export SE_MODEL="hubert-xl" # running
85
- export SE_MODEL="xlsr-2b" # running
86
- export SE_MODEL="w2vbert-600m" # running
87
- for i in $(seq 1 140);
88
- do
89
- export DATASET_ID=${i}
90
- export DIRECTION="enA-frA"
91
- python attach_speaker_embedding_s2s.py
92
- done
93
- for i in $(seq 200 240);
94
- do
95
- export DATASET_ID=${i}
96
- export DIRECTION="enA-frA"
97
- python attach_speaker_embedding_s2s.py
98
- done
99
- for i in $(seq 300 380);
100
- do
101
- export DATASET_ID=${i}
102
- export DIRECTION="enA-frA"
103
- python attach_speaker_embedding_s2s.py
104
- done
105
- for i in $(seq 400 460);
106
- do
107
- export DATASET_ID=${i}
108
- export DIRECTION="enA-frA"
109
- python attach_speaker_embedding_s2s.py
110
- done
111
- for i in $(seq 500 570);
112
  do
113
  export DATASET_ID=${i}
114
  export DIRECTION="enA-frA"
@@ -126,14 +82,7 @@ export LINE_NO_START=0
126
  export LINE_NO_END=10
127
  python fetch_dataset_s2s.py
128
  # main
129
- export N_POOL=15
130
- export DATASET_ID=54
131
- export DIRECTION="enA-esA"
132
- export LINE_NO_START=$(((DATASET_ID-1) * 2500))
133
- export LINE_NO_END=$((DATASET_ID * 2500))
134
- echo ${LINE_NO_START}
135
- python fetch_dataset_s2s.py
136
- for i in $(seq 210 219);
137
  do
138
  export N_POOL=15
139
  export DATASET_ID=${i}
@@ -143,7 +92,7 @@ do
143
  echo ${LINE_NO_START}
144
  python fetch_dataset_s2s.py
145
  done
146
- for i in $(seq 245 250);
147
  do
148
  export N_POOL=15
149
  export DATASET_ID=${i}
@@ -153,7 +102,7 @@ do
153
  echo ${LINE_NO_START}
154
  python fetch_dataset_s2s.py
155
  done
156
- for i in $(seq 345 390);
157
  do
158
  export N_POOL=15
159
  export DATASET_ID=${i}
@@ -163,7 +112,7 @@ do
163
  echo ${LINE_NO_START}
164
  python fetch_dataset_s2s.py
165
  done
166
- for i in $(seq 390 420);
167
  do
168
  export N_POOL=15
169
  export DATASET_ID=${i}
@@ -216,7 +165,7 @@ export LINE_NO_START=0
216
  export LINE_NO_END=10
217
  python fetch_dataset_s2s.py
218
  # main
219
- for i in $(seq 201 394);
220
  do
221
  export N_POOL=15
222
  export DATASET_ID=${i}
@@ -226,6 +175,7 @@ do
226
  echo ${LINE_NO_START}
227
  python fetch_dataset_s2s.py
228
  done
 
229
  for i in $(seq 321 353);
230
  do
231
  export N_POOL=15
@@ -234,39 +184,124 @@ do
234
  export LINE_NO_START=$(((DATASET_ID-1) * 2500))
235
  export LINE_NO_END=$((DATASET_ID * 2500))
236
  echo ${LINE_NO_START}
237
- python fetch_dataset_s2s.py
238
  done
239
- # tokenize
240
- for i in $(seq 195 200);
 
241
  do
242
- export N_POOL=15
243
  export DATASET_ID=${i}
244
  export DIRECTION="deA-enA"
245
- export LINE_NO_START=$(((DATASET_ID-1) * 2500))
246
- export LINE_NO_END=$((DATASET_ID * 2500))
247
- echo ${LINE_NO_START}
248
- python tokenize_dataset_s2s.py
249
  done
250
- for i in $(seq 73 91);
 
 
 
 
 
 
251
  do
252
- export N_POOL=15
253
  export DATASET_ID=${i}
254
- export DIRECTION="deA-enA"
255
- export LINE_NO_START=$(((DATASET_ID-1) * 2500))
256
- export LINE_NO_END=$((DATASET_ID * 2500))
257
- echo ${LINE_NO_START}
258
- python tokenize_dataset_s2s.py
259
  done
260
- # speaker embedding
261
- for i in $(seq 28 104);
262
  do
263
  export DATASET_ID=${i}
264
- export DIRECTION="deA-enA"
265
  python attach_speaker_embedding_s2s.py
266
  done
267
- # speaker embedding
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  export SE_MODEL="w2vbert-600m"
269
- for i in $(seq 1 320);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  do
271
  export DATASET_ID=${i}
272
  export DIRECTION="deA-enA"
@@ -278,6 +313,12 @@ done
278
 
279
 
280
 
 
 
 
 
 
 
281
  ####################
282
  # enA-koA: 511_358 #
283
  ####################
 
8
  export LINE_NO_END=10
9
  python fetch_dataset_s2s.py
10
  # main
11
+ for i in $(seq 181 200);
12
  do
13
  export N_POOL=15
14
  export DATASET_ID=${i}
 
18
  echo ${LINE_NO_START}
19
  python fetch_dataset_s2s.py
20
  done
21
+ for i in $(seq 256 280);
22
  do
23
  export N_POOL=15
24
  export DATASET_ID=${i}
 
28
  echo ${LINE_NO_START}
29
  python fetch_dataset_s2s.py
30
  done
31
+ for i in $(seq 281 299);
32
  do
33
  export N_POOL=15
34
  export DATASET_ID=${i}
 
38
  echo ${LINE_NO_START}
39
  python fetch_dataset_s2s.py
40
  done
41
+ for i in $(seq 1 600);
 
 
 
 
 
 
 
 
 
 
 
42
  do
43
  export N_POOL=15
44
  export DATASET_ID=${i}
 
46
  export LINE_NO_START=$(((DATASET_ID-1) * 2500))
47
  export LINE_NO_END=$((DATASET_ID * 2500))
48
  echo ${LINE_NO_START}
49
+ python fetch_dataset_s2s.py
 
 
 
 
 
 
 
 
 
 
50
  done
51
+ # tokenize
52
+ for i in $(seq 1 600);
53
  do
54
  export N_POOL=15
55
  export DATASET_ID=${i}
 
61
  done
62
  # speaker embedding
63
  export SE_MODEL="metavoice"
64
+ export SE_MODEL="hubert-xl"
65
+ export SE_MODEL="xlsr-2b"
66
+ export SE_MODEL="w2vbert-600m"
67
+ for i in $(seq 1 600);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  do
69
  export DATASET_ID=${i}
70
  export DIRECTION="enA-frA"
 
82
  export LINE_NO_END=10
83
  python fetch_dataset_s2s.py
84
  # main
85
+ for i in $(seq 345 420);
 
 
 
 
 
 
 
86
  do
87
  export N_POOL=15
88
  export DATASET_ID=${i}
 
92
  echo ${LINE_NO_START}
93
  python fetch_dataset_s2s.py
94
  done
95
+ for i in $(seq 390 420);
96
  do
97
  export N_POOL=15
98
  export DATASET_ID=${i}
 
102
  echo ${LINE_NO_START}
103
  python fetch_dataset_s2s.py
104
  done
105
+ for i in $(seq 451 500);
106
  do
107
  export N_POOL=15
108
  export DATASET_ID=${i}
 
112
  echo ${LINE_NO_START}
113
  python fetch_dataset_s2s.py
114
  done
115
+ for i in $(seq 500 532);
116
  do
117
  export N_POOL=15
118
  export DATASET_ID=${i}
 
165
  export LINE_NO_END=10
166
  python fetch_dataset_s2s.py
167
  # main
168
+ for i in $(seq 1 394);
169
  do
170
  export N_POOL=15
171
  export DATASET_ID=${i}
 
175
  echo ${LINE_NO_START}
176
  python fetch_dataset_s2s.py
177
  done
178
+ # tokenize
179
  for i in $(seq 321 353);
180
  do
181
  export N_POOL=15
 
184
  export LINE_NO_START=$(((DATASET_ID-1) * 2500))
185
  export LINE_NO_END=$((DATASET_ID * 2500))
186
  echo ${LINE_NO_START}
187
+ python tokenize_dataset_s2s.py
188
  done
189
+
190
+ # speaker embedding
191
+ for i in $(seq 28 104);
192
  do
 
193
  export DATASET_ID=${i}
194
  export DIRECTION="deA-enA"
195
+ python attach_speaker_embedding_s2s.py
 
 
 
196
  done
197
+ # speaker embedding
198
+
199
+
200
+ # running on kotoba_2
201
+ #TODO1
202
+ export SE_MODEL="xlsr-2b"
203
+ for i in 1 2 4 5 6 10 41 50 55 340 377 379;
204
  do
 
205
  export DATASET_ID=${i}
206
+ export DIRECTION="enA-frA"
207
+ python attach_speaker_embedding_s2s.py
 
 
 
208
  done
209
+ for i in $(seq 73 299);
 
210
  do
211
  export DATASET_ID=${i}
212
+ export DIRECTION="enA-frA"
213
  python attach_speaker_embedding_s2s.py
214
  done
215
+ for i in $(seq 381 600);
216
+ do
217
+ export DATASET_ID=${i}
218
+ export DIRECTION="enA-frA"
219
+ python attach_speaker_embedding_s2s.py
220
+ done
221
+ #TODO2
222
+ export SE_MODEL="hubert-xl"
223
+ for i in 318 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361;
224
+ do
225
+ export DATASET_ID=${i}
226
+ export DIRECTION="enA-esA"
227
+ python attach_speaker_embedding_s2s.py
228
+ done
229
+ #TODO3
230
  export SE_MODEL="w2vbert-600m"
231
+ for i in $(seq 40 600);
232
+ do
233
+ export DATASET_ID=${i}
234
+ export DIRECTION="enA-frA"
235
+ python attach_speaker_embedding_s2s.py
236
+ done
237
+ #TODO4
238
+ export SE_MODEL="w2vbert-600m"
239
+ for i in $(seq 467 470);
240
+ do
241
+ export DATASET_ID=${i}
242
+ export DIRECTION="enA-esA"
243
+ python attach_speaker_embedding_s2s.py
244
+ done
245
+ export SE_MODEL="xlsr-2b"
246
+ for i in $(seq 453 470);
247
+ do
248
+ export DATASET_ID=${i}
249
+ export DIRECTION="enA-esA"
250
+ python attach_speaker_embedding_s2s.py
251
+ done
252
+ export SE_MODEL="metavoice"
253
+ for i in $(seq 453 459);
254
+ do
255
+ export DATASET_ID=${i}
256
+ export DIRECTION="enA-esA"
257
+ python attach_speaker_embedding_s2s.py
258
+ done
259
+
260
+
261
+ # running on kotoba_1
262
+ #TODO1
263
+ export SE_MODEL="hubert-xl"
264
+ for i in $(seq 1 394);
265
+ do
266
+ export DATASET_ID=${i}
267
+ export DIRECTION="deA-enA"
268
+ python attach_speaker_embedding_s2s.py
269
+ done
270
+ #TODO2
271
+ export SE_MODEL="hubert-xl"
272
+ for i in $(seq 38 600);
273
+ do
274
+ export DATASET_ID=${i}
275
+ export DIRECTION="enA-frA"
276
+ python attach_speaker_embedding_s2s.py
277
+ done
278
+ #TODO3
279
+ export SE_MODEL="metavoice"
280
+ for i in $(seq 50 299);
281
+ do
282
+ export DATASET_ID=${i}
283
+ export DIRECTION="enA-frA"
284
+ python attach_speaker_embedding_s2s.py
285
+ done
286
+ for i in $(seq 331 398);
287
+ do
288
+ export DATASET_ID=${i}
289
+ export DIRECTION="enA-frA"
290
+ python attach_speaker_embedding_s2s.py
291
+ done
292
+ for i in $(seq 426 600);
293
+ do
294
+ export DATASET_ID=${i}
295
+ export DIRECTION="enA-frA"
296
+ python attach_speaker_embedding_s2s.py
297
+ done
298
+ #TODO4
299
+ export SE_MODEL="xlsr-2b"
300
+ export DATASET_ID=213
301
+ export DIRECTION="deA-enA"
302
+ python attach_speaker_embedding_s2s.py
303
+ export SE_MODEL="hubert-xl"
304
+ for i in 117 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284;
305
  do
306
  export DATASET_ID=${i}
307
  export DIRECTION="deA-enA"
 
313
 
314
 
315
 
316
+
317
+
318
+
319
+
320
+
321
+
322
  ####################
323
  # enA-koA: 511_358 #
324
  ####################