asahi417 commited on
Commit
85389e6
1 Parent(s): 00f97de
Files changed (3) hide show
  1. attach_speaker_embedding_s2s.py +1 -1
  2. main_s2s.sh +67 -52
  3. main_s2t.sh +1 -1
attach_speaker_embedding_s2s.py CHANGED
@@ -71,6 +71,6 @@ dataset = dataset.map(
71
  desc="attach speaker embedding dataset"
72
  )
73
  DatasetDict({"train": dataset}).push_to_hub(f"{hf_org}/{hf_dataset}.speaker-embedding.{se_model}", config_name=f"subset_{dataset_id}")
74
- cache_dir = f"{expanduser('~')}/.cache/huggingface/datasets/{hf_org}___{hf_dataset}/subset_{dataset_id}"
75
  if os.path.exists(cache_dir):
76
  shutil.rmtree(cache_dir)
 
71
  desc="attach speaker embedding dataset"
72
  )
73
  DatasetDict({"train": dataset}).push_to_hub(f"{hf_org}/{hf_dataset}.speaker-embedding.{se_model}", config_name=f"subset_{dataset_id}")
74
+ cache_dir = f"{expanduser('~')}/.cache/huggingface/datasets/{hf_org}___{hf_dataset.replace('A', '_a')}/subset_{dataset_id}"
75
  if os.path.exists(cache_dir):
76
  shutil.rmtree(cache_dir)
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 34 50);
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 73 100);
22
  do
23
  export N_POOL=15
24
  export DATASET_ID=${i}
@@ -73,7 +73,7 @@ export LINE_NO_START=0
73
  export LINE_NO_END=10
74
  python fetch_dataset_s2s.py
75
  # main
76
- for i in $(seq 106 200);
77
  do
78
  export N_POOL=15
79
  export DATASET_ID=${i}
@@ -83,7 +83,7 @@ do
83
  echo ${LINE_NO_START}
84
  python fetch_dataset_s2s.py
85
  done
86
- for i in $(seq 201 300);
87
  do
88
  export N_POOL=15
89
  export DATASET_ID=${i}
@@ -93,7 +93,7 @@ do
93
  echo ${LINE_NO_START}
94
  python fetch_dataset_s2s.py
95
  done
96
- for i in $(seq 427 500);
97
  do
98
  export N_POOL=15
99
  export DATASET_ID=${i}
@@ -103,7 +103,7 @@ do
103
  echo ${LINE_NO_START}
104
  python fetch_dataset_s2s.py
105
  done
106
- for i in $(seq 500 600);
107
  do
108
  export N_POOL=15
109
  export DATASET_ID=${i}
@@ -161,7 +161,7 @@ export LINE_NO_START=0
161
  export LINE_NO_END=10
162
  python fetch_dataset_s2s.py
163
  # main
164
- for i in $(seq 1 200);
165
  do
166
  export N_POOL=15
167
  export DATASET_ID=${i}
@@ -171,6 +171,7 @@ do
171
  echo ${LINE_NO_START}
172
  python fetch_dataset_s2s.py
173
  done
 
174
  for i in $(seq 201 394);
175
  do
176
  export N_POOL=15
@@ -226,7 +227,7 @@ export LINE_NO_START=0
226
  export LINE_NO_END=10
227
  python fetch_dataset_s2s.py
228
  # main
229
- for i in $(seq 54 125);
230
  do
231
  export N_POOL=15
232
  export DATASET_ID=${i}
@@ -236,7 +237,7 @@ do
236
  echo ${LINE_NO_START}
237
  python fetch_dataset_s2s.py
238
  done
239
- for i in $(seq 126 250);
240
  do
241
  export N_POOL=15
242
  export DATASET_ID=${i}
@@ -246,7 +247,7 @@ do
246
  echo ${LINE_NO_START}
247
  python fetch_dataset_s2s.py
248
  done
249
- for i in $(seq 320 420);
250
  do
251
  export N_POOL=15
252
  export DATASET_ID=${i}
@@ -256,7 +257,7 @@ do
256
  echo ${LINE_NO_START}
257
  python fetch_dataset_s2s.py
258
  done
259
- for i in $(seq 421 532);
260
  do
261
  export N_POOL=15
262
  export DATASET_ID=${i}
@@ -305,152 +306,166 @@ done
305
 
306
 
307
 
308
- ######################
309
- # enA-zhA: 1_289_192 #
310
- ######################
 
311
  # test
312
  export DATASET_ID=test
313
- export DIRECTION="enA-zhA"
314
  export LINE_NO_START=0
315
  export LINE_NO_END=10
316
  python fetch_dataset_s2s.py
317
  # main
318
- for i in $(seq 1 258);
319
  do
320
  export N_POOL=15
321
  export DATASET_ID=${i}
322
- export DIRECTION="enA-zhA"
323
  export LINE_NO_START=$(((DATASET_ID-1) * 2500))
324
  export LINE_NO_END=$((DATASET_ID * 2500))
325
  echo ${LINE_NO_START}
326
  python fetch_dataset_s2s.py
327
  done
328
  # tokenize
329
- for i in $(seq 1 258);
330
  do
331
- export N_POOL=15
332
  export DATASET_ID=${i}
333
- export DIRECTION="enA-zhA"
334
- export LINE_NO_START=$(((DATASET_ID-1) * 2500))
335
- export LINE_NO_END=$((DATASET_ID * 2500))
336
- echo ${LINE_NO_START}
337
  python tokenize_dataset_s2s.py
338
  done
339
  # speaker embedding
340
  export SE_MODEL="metavoice"
341
  export SE_MODEL="w2vbert-600m"
342
- for i in $(seq 1 258);
 
 
343
  do
344
  export DATASET_ID=${i}
345
- export DIRECTION="enA-zhA"
346
  python attach_speaker_embedding_s2s.py
347
  done
348
  ####################
349
- # enA-jaA: 718_606 #
350
  ####################
351
  # test
352
  export DATASET_ID=test
353
- export DIRECTION="enA-jaA"
354
  export LINE_NO_START=0
355
  export LINE_NO_END=10
356
  python fetch_dataset_s2s.py
357
  # main
358
- for i in $(seq 1 144);
359
  do
360
  export N_POOL=15
361
  export DATASET_ID=${i}
362
- export DIRECTION="enA-jaA"
363
  export LINE_NO_START=$(((DATASET_ID-1) * 2500))
364
  export LINE_NO_END=$((DATASET_ID * 2500))
365
  echo ${LINE_NO_START}
366
  python fetch_dataset_s2s.py
367
  done
368
  # tokenize
369
- for i in $(seq 1 144);
370
  do
371
  export DATASET_ID=${i}
372
- export DIRECTION="enA-jaA"
373
  python tokenize_dataset_s2s.py
374
  done
375
  # speaker embedding
376
  export SE_MODEL="metavoice"
377
  export SE_MODEL="w2vbert-600m"
378
- for i in $(seq 1 144);
 
 
379
  do
380
  export DATASET_ID=${i}
381
- export DIRECTION="enA-jaA"
382
  python attach_speaker_embedding_s2s.py
383
  done
384
 
385
- ####################
386
- # enA-hiA: 454_942 #
387
- ####################
 
 
388
  # test
389
  export DATASET_ID=test
390
- export DIRECTION="enA-hiA"
391
  export LINE_NO_START=0
392
  export LINE_NO_END=10
393
  python fetch_dataset_s2s.py
394
  # main
395
- for i in $(seq 1 91);
396
  do
397
  export N_POOL=15
398
  export DATASET_ID=${i}
399
- export DIRECTION="enA-hiA"
400
  export LINE_NO_START=$(((DATASET_ID-1) * 2500))
401
  export LINE_NO_END=$((DATASET_ID * 2500))
402
  echo ${LINE_NO_START}
403
  python fetch_dataset_s2s.py
404
  done
405
  # tokenize
406
- for i in $(seq 1 91);
407
  do
 
408
  export DATASET_ID=${i}
409
- export DIRECTION="enA-hiA"
 
 
 
410
  python tokenize_dataset_s2s.py
411
  done
412
  # speaker embedding
413
  export SE_MODEL="metavoice"
 
 
414
  export SE_MODEL="w2vbert-600m"
415
- for i in $(seq 1 91);
416
  do
417
  export DATASET_ID=${i}
418
- export DIRECTION="enA-hiA"
419
  python attach_speaker_embedding_s2s.py
420
  done
 
 
421
  ####################
422
- # enA-viA: 740_598 #
423
  ####################
424
  # test
425
  export DATASET_ID=test
426
- export DIRECTION="enA-viA"
427
  export LINE_NO_START=0
428
  export LINE_NO_END=10
429
  python fetch_dataset_s2s.py
430
  # main
431
- for i in $(seq 1 149);
432
  do
433
  export N_POOL=15
434
  export DATASET_ID=${i}
435
- export DIRECTION="enA-viA"
436
  export LINE_NO_START=$(((DATASET_ID-1) * 2500))
437
  export LINE_NO_END=$((DATASET_ID * 2500))
438
  echo ${LINE_NO_START}
439
  python fetch_dataset_s2s.py
440
  done
441
  # tokenize
442
- for i in $(seq 1 149);
443
  do
444
  export DATASET_ID=${i}
445
- export DIRECTION="enA-viA"
446
  python tokenize_dataset_s2s.py
447
  done
448
  # speaker embedding
449
  export SE_MODEL="metavoice"
450
  export SE_MODEL="w2vbert-600m"
451
- for i in $(seq 1 149);
 
 
452
  do
453
  export DATASET_ID=${i}
454
- export DIRECTION="enA-viA"
455
  python attach_speaker_embedding_s2s.py
456
- done
 
 
8
  export LINE_NO_END=10
9
  python fetch_dataset_s2s.py
10
  # main
11
+ for i in $(seq 49 50);
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 87 100);
22
  do
23
  export N_POOL=15
24
  export DATASET_ID=${i}
 
73
  export LINE_NO_END=10
74
  python fetch_dataset_s2s.py
75
  # main
76
+ for i in $(seq 115 200);
77
  do
78
  export N_POOL=15
79
  export DATASET_ID=${i}
 
83
  echo ${LINE_NO_START}
84
  python fetch_dataset_s2s.py
85
  done
86
+ for i in $(seq 209 300);
87
  do
88
  export N_POOL=15
89
  export DATASET_ID=${i}
 
93
  echo ${LINE_NO_START}
94
  python fetch_dataset_s2s.py
95
  done
96
+ for i in $(seq 440 500);
97
  do
98
  export N_POOL=15
99
  export DATASET_ID=${i}
 
103
  echo ${LINE_NO_START}
104
  python fetch_dataset_s2s.py
105
  done
106
+ for i in $(seq 515 600);
107
  do
108
  export N_POOL=15
109
  export DATASET_ID=${i}
 
161
  export LINE_NO_END=10
162
  python fetch_dataset_s2s.py
163
  # main
164
+ for i in $(seq 136 200);
165
  do
166
  export N_POOL=15
167
  export DATASET_ID=${i}
 
171
  echo ${LINE_NO_START}
172
  python fetch_dataset_s2s.py
173
  done
174
+
175
  for i in $(seq 201 394);
176
  do
177
  export N_POOL=15
 
227
  export LINE_NO_END=10
228
  python fetch_dataset_s2s.py
229
  # main
230
+ for i in $(seq 98 125);
231
  do
232
  export N_POOL=15
233
  export DATASET_ID=${i}
 
237
  echo ${LINE_NO_START}
238
  python fetch_dataset_s2s.py
239
  done
240
+ for i in $(seq 165 250);
241
  do
242
  export N_POOL=15
243
  export DATASET_ID=${i}
 
247
  echo ${LINE_NO_START}
248
  python fetch_dataset_s2s.py
249
  done
250
+ for i in $(seq 333 420);
251
  do
252
  export N_POOL=15
253
  export DATASET_ID=${i}
 
257
  echo ${LINE_NO_START}
258
  python fetch_dataset_s2s.py
259
  done
260
+ for i in $(seq 434 532);
261
  do
262
  export N_POOL=15
263
  export DATASET_ID=${i}
 
306
 
307
 
308
 
309
+
310
+ ####################
311
+ # enA-hiA: 454_942 #
312
+ ####################
313
  # test
314
  export DATASET_ID=test
315
+ export DIRECTION="enA-hiA"
316
  export LINE_NO_START=0
317
  export LINE_NO_END=10
318
  python fetch_dataset_s2s.py
319
  # main
320
+ for i in $(seq 1 91);
321
  do
322
  export N_POOL=15
323
  export DATASET_ID=${i}
324
+ export DIRECTION="enA-hiA"
325
  export LINE_NO_START=$(((DATASET_ID-1) * 2500))
326
  export LINE_NO_END=$((DATASET_ID * 2500))
327
  echo ${LINE_NO_START}
328
  python fetch_dataset_s2s.py
329
  done
330
  # tokenize
331
+ for i in $(seq 1 91);
332
  do
 
333
  export DATASET_ID=${i}
334
+ export DIRECTION="enA-hiA"
 
 
 
335
  python tokenize_dataset_s2s.py
336
  done
337
  # speaker embedding
338
  export SE_MODEL="metavoice"
339
  export SE_MODEL="w2vbert-600m"
340
+ export SE_MODEL="hubert-xl"
341
+ export SE_MODEL="xlsr-2b"
342
+ for i in $(seq 1 91);
343
  do
344
  export DATASET_ID=${i}
345
+ export DIRECTION="enA-hiA"
346
  python attach_speaker_embedding_s2s.py
347
  done
348
  ####################
349
+ # enA-viA: 740_598 #
350
  ####################
351
  # test
352
  export DATASET_ID=test
353
+ export DIRECTION="enA-viA"
354
  export LINE_NO_START=0
355
  export LINE_NO_END=10
356
  python fetch_dataset_s2s.py
357
  # main
358
+ for i in $(seq 1 149);
359
  do
360
  export N_POOL=15
361
  export DATASET_ID=${i}
362
+ export DIRECTION="enA-viA"
363
  export LINE_NO_START=$(((DATASET_ID-1) * 2500))
364
  export LINE_NO_END=$((DATASET_ID * 2500))
365
  echo ${LINE_NO_START}
366
  python fetch_dataset_s2s.py
367
  done
368
  # tokenize
369
+ for i in $(seq 1 149);
370
  do
371
  export DATASET_ID=${i}
372
+ export DIRECTION="enA-viA"
373
  python tokenize_dataset_s2s.py
374
  done
375
  # speaker embedding
376
  export SE_MODEL="metavoice"
377
  export SE_MODEL="w2vbert-600m"
378
+ export SE_MODEL="hubert-xl"
379
+ export SE_MODEL="xlsr-2b"
380
+ for i in $(seq 1 149);
381
  do
382
  export DATASET_ID=${i}
383
+ export DIRECTION="enA-viA"
384
  python attach_speaker_embedding_s2s.py
385
  done
386
 
387
+
388
+
389
+ ######################
390
+ # enA-zhA: 1_289_192 #
391
+ ######################
392
  # test
393
  export DATASET_ID=test
394
+ export DIRECTION="enA-zhA"
395
  export LINE_NO_START=0
396
  export LINE_NO_END=10
397
  python fetch_dataset_s2s.py
398
  # main
399
+ for i in $(seq 1 258);
400
  do
401
  export N_POOL=15
402
  export DATASET_ID=${i}
403
+ export DIRECTION="enA-zhA"
404
  export LINE_NO_START=$(((DATASET_ID-1) * 2500))
405
  export LINE_NO_END=$((DATASET_ID * 2500))
406
  echo ${LINE_NO_START}
407
  python fetch_dataset_s2s.py
408
  done
409
  # tokenize
410
+ for i in $(seq 1 258);
411
  do
412
+ export N_POOL=15
413
  export DATASET_ID=${i}
414
+ export DIRECTION="enA-zhA"
415
+ export LINE_NO_START=$(((DATASET_ID-1) * 2500))
416
+ export LINE_NO_END=$((DATASET_ID * 2500))
417
+ echo ${LINE_NO_START}
418
  python tokenize_dataset_s2s.py
419
  done
420
  # speaker embedding
421
  export SE_MODEL="metavoice"
422
+ export SE_MODEL="hubert-xl"
423
+ export SE_MODEL="xlsr-2b"
424
  export SE_MODEL="w2vbert-600m"
425
+ for i in $(seq 14 258);
426
  do
427
  export DATASET_ID=${i}
428
+ export DIRECTION="enA-zhA"
429
  python attach_speaker_embedding_s2s.py
430
  done
431
+
432
+
433
  ####################
434
+ # enA-jaA: 718_606 #
435
  ####################
436
  # test
437
  export DATASET_ID=test
438
+ export DIRECTION="enA-jaA"
439
  export LINE_NO_START=0
440
  export LINE_NO_END=10
441
  python fetch_dataset_s2s.py
442
  # main
443
+ for i in $(seq 1 144);
444
  do
445
  export N_POOL=15
446
  export DATASET_ID=${i}
447
+ export DIRECTION="enA-jaA"
448
  export LINE_NO_START=$(((DATASET_ID-1) * 2500))
449
  export LINE_NO_END=$((DATASET_ID * 2500))
450
  echo ${LINE_NO_START}
451
  python fetch_dataset_s2s.py
452
  done
453
  # tokenize
454
+ for i in $(seq 1 144);
455
  do
456
  export DATASET_ID=${i}
457
+ export DIRECTION="enA-jaA"
458
  python tokenize_dataset_s2s.py
459
  done
460
  # speaker embedding
461
  export SE_MODEL="metavoice"
462
  export SE_MODEL="w2vbert-600m"
463
+ export SE_MODEL="xlsr-2b"
464
+ export SE_MODEL="hubert-xl"
465
+ for i in $(seq 1 144);
466
  do
467
  export DATASET_ID=${i}
468
+ export DIRECTION="enA-jaA"
469
  python attach_speaker_embedding_s2s.py
470
+ rm -rf ~/.cache/huggingface/datasets
471
+ done
main_s2t.sh CHANGED
@@ -50,7 +50,7 @@ do
50
  done
51
  python format_text.py
52
  # audio
53
- for i in $(seq 19 300);
54
  do
55
  export N_POOL=15
56
  export DATASET_ID=${i}
 
50
  done
51
  python format_text.py
52
  # audio
53
+ for i in $(seq 213 300);
54
  do
55
  export N_POOL=15
56
  export DATASET_ID=${i}