init
Browse files- fetch_dataset_s2t.py +2 -2
- main_s2t.sh +4 -5
fetch_dataset_s2t.py
CHANGED
|
@@ -109,9 +109,9 @@ def cleanup(features, feature_file):
|
|
| 109 |
|
| 110 |
def get_audio(dataframe: pd.DataFrame):
|
| 111 |
features = {"line_no": int(dataframe.pop('line_no').values[0])}
|
| 112 |
-
if features["line_no"] not in
|
| 113 |
return None
|
| 114 |
-
features[f"{direction_text}.text"] =
|
| 115 |
feature_file = p_join(cache_dir_feature, f'{features["line_no"]}.json')
|
| 116 |
features.update({f"{direction_speech}.{k}": to_json_serializable(v) for k, v in dataframe.iloc[0].to_dict().items()})
|
| 117 |
identifier = os.path.basename(features[f"{direction_speech}.url"]).split(".")[-1]
|
|
|
|
| 109 |
|
| 110 |
def get_audio(dataframe: pd.DataFrame):
|
| 111 |
features = {"line_no": int(dataframe.pop('line_no').values[0])}
|
| 112 |
+
if str(features["line_no"]) not in line_no_to_text:
|
| 113 |
return None
|
| 114 |
+
features[f"{direction_text}.text"] = line_no_to_text[str(features["line_no"])]
|
| 115 |
feature_file = p_join(cache_dir_feature, f'{features["line_no"]}.json')
|
| 116 |
features.update({f"{direction_speech}.{k}": to_json_serializable(v) for k, v in dataframe.iloc[0].to_dict().items()})
|
| 117 |
identifier = os.path.basename(features[f"{direction_speech}.url"]).split(".")[-1]
|
main_s2t.sh
CHANGED
|
@@ -26,12 +26,11 @@ cd ../../
|
|
| 26 |
######################
|
| 27 |
# test
|
| 28 |
export DATASET_ID=test
|
| 29 |
-
export
|
|
|
|
| 30 |
export LINE_NO_START=0
|
| 31 |
export LINE_NO_END=10
|
| 32 |
-
python
|
| 33 |
-
|
| 34 |
-
|
| 35 |
# DOWNLOAD AUDIO
|
| 36 |
for i in $(seq 91 100);
|
| 37 |
do
|
|
@@ -41,7 +40,7 @@ do
|
|
| 41 |
export LINE_NO_START=$(((DATASET_ID-1) * 2500))
|
| 42 |
export LINE_NO_END=$((DATASET_ID * 2500))
|
| 43 |
echo ${LINE_NO_START}
|
| 44 |
-
python
|
| 45 |
done
|
| 46 |
|
| 47 |
# text
|
|
|
|
| 26 |
######################
|
| 27 |
# test
|
| 28 |
export DATASET_ID=test
|
| 29 |
+
export DIRECTION_SPEECH="enA"
|
| 30 |
+
export DIRECTION_TEXT="jpn"
|
| 31 |
export LINE_NO_START=0
|
| 32 |
export LINE_NO_END=10
|
| 33 |
+
python fetch_dataset_s2t.py
|
|
|
|
|
|
|
| 34 |
# DOWNLOAD AUDIO
|
| 35 |
for i in $(seq 91 100);
|
| 36 |
do
|
|
|
|
| 40 |
export LINE_NO_START=$(((DATASET_ID-1) * 2500))
|
| 41 |
export LINE_NO_END=$((DATASET_ID * 2500))
|
| 42 |
echo ${LINE_NO_START}
|
| 43 |
+
python fetch_dataset_s2t.py
|
| 44 |
done
|
| 45 |
|
| 46 |
# text
|