asahi417 commited on
Commit
2c3b1f3
·
1 Parent(s): 4d206b1

nit refactoring

Browse files
Files changed (2) hide show
  1. download_audio.py +1 -2
  2. main.sh +18 -0
download_audio.py CHANGED
@@ -35,11 +35,10 @@ wget_timeout = os.getenv("TIMEOUT", "30")
35
  line_no_start = int(os.getenv("LINE_NO_START", 0))
36
  line_no_end = int(os.getenv("LINE_NO_END", 10000))
37
  dataset_id = os.getenv("DATASET_ID", 0)
38
- hf_org = "kotoba-tech"
39
  hf_dataset = f"seamless-align-{direction}"
40
 
41
 
42
-
43
  def wget(url: str, output_file: Optional[str] = None):
44
  os.makedirs(os.path.dirname(output_file), exist_ok=True)
45
  subprocess.run(["wget", url, "-O", output_file, "--tries", wget_max_retry, "--timeout", wget_timeout])
 
35
  line_no_start = int(os.getenv("LINE_NO_START", 0))
36
  line_no_end = int(os.getenv("LINE_NO_END", 10000))
37
  dataset_id = os.getenv("DATASET_ID", 0)
38
+ hf_org = os.getenv("HF_ORG", "asahi417")
39
  hf_dataset = f"seamless-align-{direction}"
40
 
41
 
 
42
  def wget(url: str, output_file: Optional[str] = None):
43
  os.makedirs(os.path.dirname(output_file), exist_ok=True)
44
  subprocess.run(["wget", url, "-O", output_file, "--tries", wget_max_retry, "--timeout", wget_timeout])
main.sh CHANGED
@@ -1,15 +1,33 @@
1
  ####################
2
  # enA-jaA: 718_606 #
3
  ####################
 
4
  export DIRECTION="enA-jaA"
5
  export LINE_NO_START=0
6
  export LINE_NO_END=10
7
  export DATASET_ID="tmp"
8
  python download_audio.py
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  export DIRECTION="enA-jaA"
11
  export LINE_NO_START=25000
12
  export LINE_NO_END=50000
 
13
  python download_audio.py
14
 
15
  export DIRECTION="enA-jaA"
 
1
  ####################
2
  # enA-jaA: 718_606 #
3
  ####################
4
+ # test
5
  export DIRECTION="enA-jaA"
6
  export LINE_NO_START=0
7
  export LINE_NO_END=10
8
  export DATASET_ID="tmp"
9
  python download_audio.py
10
 
11
+ # run
12
+ export DIRECTION="enA-jaA"
13
+ export LINE_NO_START=0
14
+ export LINE_NO_END=10000
15
+ export DATASET_ID=0
16
+ python download_audio.py
17
+
18
+
19
+ export DIRECTION="enA-jaA"
20
+ export LINE_NO_START=10000
21
+ export LINE_NO_END=20000
22
+ export DATASET_ID=1
23
+ python download_audio.py
24
+
25
+
26
+
27
  export DIRECTION="enA-jaA"
28
  export LINE_NO_START=25000
29
  export LINE_NO_END=50000
30
+ export DATASET_ID=1
31
  python download_audio.py
32
 
33
  export DIRECTION="enA-jaA"