|
export CUDA_VISIBLE_DEVICES=0 |
|
export CUDA_VISIBLE_DEVICES=1 |
|
rm -rf download/audio |
|
rm -rf download/feature |
|
python -c 'n=41; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/feature/enA-jaA/*.json")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=41; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/audio/enA-jaA/enA/*")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=41; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/audio/enA-jaA/jaA/*")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=42; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/feature/enA-jaA/*.json")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=42; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/audio/enA-jaA/enA/*")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=42; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/audio/enA-jaA/jaA/*")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=51; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/feature/enA-jaA/*.json")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=51; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/audio/enA-jaA/enA/*")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=51; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/audio/enA-jaA/jaA/*")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
|
|
python -c 'n=1; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/feature/enA-jaA/*.json")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=1; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/audio/enA-jaA/enA/*")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=1; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/audio/enA-jaA/jaA/*")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=2; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/feature/enA-jaA/*.json")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=2; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/audio/enA-jaA/enA/*")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=2; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/audio/enA-jaA/jaA/*")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=10; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/feature/enA-jaA/*.json")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=10; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/audio/enA-jaA/enA/*")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
python -c 'n=10; import os; from glob import glob; tmp = [int(os.path.basename(i).split(".")[0]) for i in glob("download/audio/enA-jaA/jaA/*")]; print(len([x for x in tmp if (n-1) * 2500 <= x < n * 2500]))' |
|
|
|
python -c 'file_name="tmp.mp3"; from datasets import Audio; a=Audio(); wav=a.decode_example({"path": file_name, "bytes": None}); print(wav)' |
|
|
|
export N_POOL=1 |
|
export DATASET_ID=1 |
|
export DIRECTION="enA-jaA" |
|
export LINE_NO_START=$(((DATASET_ID-1) * 2500)) |
|
export LINE_NO_END=$((DATASET_ID * 2500)) |
|
echo ${LINE_NO_START} |
|
python download_audio.py |
|
|
|
|
|
|
|
|
|
export N_POOL=1 |
|
export DATASET_ID=1 |
|
export DIRECTION="enA-jaA" |
|
export LINE_NO_START=$(((DATASET_ID-1) * 2500)) |
|
export LINE_NO_END=$((DATASET_ID * 2500)) |
|
echo ${LINE_NO_START} |
|
python download_audio.py |
|
|
|
export N_POOL=10 |
|
export DATASET_ID=2 |
|
export DIRECTION="enA-jaA" |
|
export LINE_NO_START=$(((DATASET_ID-1) * 2500)) |
|
export LINE_NO_END=$((DATASET_ID * 2500)) |
|
echo ${LINE_NO_START} |
|
python download_audio.py |
|
|
|
export N_POOL=10 |
|
export DATASET_ID=10 |
|
export DIRECTION="enA-jaA" |
|
export LINE_NO_START=$(((DATASET_ID-1) * 2500)) |
|
export LINE_NO_END=$((DATASET_ID * 2500)) |
|
echo ${LINE_NO_START} |
|
python download_audio.py |
|
|
|
|
|
|
|
export N_POOL=1 |
|
export DATASET_ID=41 |
|
export DIRECTION="enA-jaA" |
|
export LINE_NO_START=$(((DATASET_ID-1) * 2500)) |
|
export LINE_NO_END=$((DATASET_ID * 2500)) |
|
echo ${LINE_NO_START} |
|
python download_audio.py |
|
|
|
export N_POOL=10 |
|
export DATASET_ID=42 |
|
export DIRECTION="enA-jaA" |
|
export LINE_NO_START=$(((DATASET_ID-1) * 2500)) |
|
export LINE_NO_END=$((DATASET_ID * 2500)) |
|
echo ${LINE_NO_START} |
|
python download_audio.py |
|
|
|
export N_POOL=10 |
|
export DATASET_ID=51 |
|
export DIRECTION="enA-jaA" |
|
export LINE_NO_START=$(((DATASET_ID-1) * 2500)) |
|
export LINE_NO_END=$((DATASET_ID * 2500)) |
|
echo ${LINE_NO_START} |
|
python download_audio.py |
|
|
|
for i in $(seq 51 60); |
|
do |
|
export N_POOL=10 |
|
export DATASET_ID=${i} |
|
export DIRECTION="enA-jaA" |
|
export LINE_NO_START=$(((DATASET_ID-1) * 2500)) |
|
export LINE_NO_END=$((DATASET_ID * 2500)) |
|
echo ${LINE_NO_START} |
|
python download_audio.py |
|
done |
|
|
|
|
|
|
|
|
|
|
|
|
|
export DIRECTION="enA-jpn" |
|
export LINE_NO_START=0 |
|
export LINE_NO_END=50000 |
|
python download_audio.py |
|
|
|
export DIRECTION="enA-jpn" |
|
export LINE_NO_START=50000 |
|
export LINE_NO_END=100000 |
|
python download_audio.py |
|
|
|
export DIRECTION="enA-jpn" |
|
export LINE_NO_START=100000 |
|
export LINE_NO_END=150000 |
|
python download_audio.py |
|
|
|
export DIRECTION="enA-jpn" |
|
export LINE_NO_START=150000 |
|
export LINE_NO_END=300000 |
|
python download_audio.py |
|
|
|
export DIRECTION="enA-jpn" |
|
export LINE_NO_START=300000 |
|
export LINE_NO_END=360000 |
|
python download_audio.py |
|
|
|
|
|
|
|
export DIRECTION="enA-jpn" |
|
export DIRECTION_SPEECH="enA" |
|
export LINE_NO_START=0 |
|
export LINE_NO_END=25000 |
|
python filter_audio.py |
|
|
|
export DIRECTION="enA-jpn" |
|
export DIRECTION_SPEECH="enA" |
|
export LINE_NO_START=25000 |
|
export LINE_NO_END=50000 |
|
python filter_audio.py |
|
|
|
export DIRECTION="enA-jpn" |
|
export DIRECTION_SPEECH="enA" |
|
export LINE_NO_START=50000 |
|
export LINE_NO_END=75000 |
|
python filter_audio.py |
|
|
|
export DIRECTION="enA-jpn" |
|
export DIRECTION_SPEECH="enA" |
|
export LINE_NO_START=75000 |
|
export LINE_NO_END=100000 |
|
python filter_audio.py |
|
|
|
export DIRECTION="enA-jpn" |
|
export DIRECTION_SPEECH="enA" |
|
export LINE_NO_START=100000 |
|
export LINE_NO_END=125000 |
|
python filter_audio.py |
|
|
|
export DIRECTION="enA-jpn" |
|
export DIRECTION_SPEECH="enA" |
|
export LINE_NO_START=125000 |
|
export LINE_NO_END=150000 |
|
python filter_audio.py |
|
|
|
export DIRECTION="enA-jpn" |
|
export DIRECTION_SPEECH="enA" |
|
export LINE_NO_START=150000 |
|
export LINE_NO_END=175000 |
|
python filter_audio.py |
|
|
|
export DIRECTION="enA-jpn" |
|
export DIRECTION_SPEECH="enA" |
|
export LINE_NO_START=175000 |
|
export LINE_NO_END=200000 |
|
python filter_audio.py |
|
|
|
|
|
export DIRECTION="enA-jpn" |
|
export DIRECTION_SPEECH="enA" |
|
export LINE_NO_START=200000 |
|
export LINE_NO_END=225000 |
|
python filter_audio.py |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
git clone https://github.com/kpu/preprocess |
|
cd preprocess |
|
git checkout wet |
|
git submodule update --init --recursive |
|
mkdir build |
|
cd build |
|
cmake .. |
|
make -j4 |
|
alias wet_lines="${PWD}/build/bin/wet_lines" |
|
cd ../ |
|
wget https://dl.fbaipublicfiles.com/seamless/data/seamless.dataset.metadata.public.enA-jpn.withduration.tsv.gz |
|
cp ../download_text.py ./ |
|
python download_text.py |
|
cat seamless.dataset.metadata.public.enA-jpn.withduration.reordered.batch_1.tsv | egrep ^crawl-data | tr '\t' ' ' | wet_lines | tee seamless.dataset.metadata.public.jpn.batch_1.tsv |
|
cat seamless.dataset.metadata.public.enA-jpn.withduration.reordered.batch_2.tsv | egrep ^crawl-data | tr '\t' ' ' | wet_lines | tee seamless.dataset.metadata.public.jpn.batch_2.tsv |
|
cat seamless.dataset.metadata.public.enA-jpn.withduration.reordered.batch_3.tsv | egrep ^crawl-data | tr '\t' ' ' | wet_lines | tee seamless.dataset.metadata.public.jpn.batch_3.tsv |
|
cat seamless.dataset.metadata.public.enA-jpn.withduration.reordered.batch_4.tsv | egrep ^crawl-data | tr '\t' ' ' | wet_lines | tee seamless.dataset.metadata.public.jpn.batch_4.tsv |
|
cat seamless.dataset.metadata.public.enA-jpn.withduration.reordered.batch_5.tsv | egrep ^crawl-data | tr '\t' ' ' | wet_lines | tee seamless.dataset.metadata.public.jpn.batch_5.tsv |
|
cat seamless.dataset.metadata.public.enA-jpn.withduration.reordered.batch_6.tsv | egrep ^crawl-data | tr '\t' ' ' | wet_lines | tee seamless.dataset.metadata.public.jpn.batch_6.tsv |
|
cat seamless.dataset.metadata.public.enA-jpn.withduration.reordered.batch_7.tsv | egrep ^crawl-data | tr '\t' ' ' | wet_lines | tee seamless.dataset.metadata.public.jpn.batch_7.tsv |
|
cat seamless.dataset.metadata.public.enA-jpn.withduration.reordered.batch_8.tsv | egrep ^crawl-data | tr '\t' ' ' | wet_lines | tee seamless.dataset.metadata.public.jpn.batch_8.tsv |
|
cat seamless.dataset.metadata.public.enA-jpn.withduration.reordered.batch_9.tsv | egrep ^crawl-data | tr '\t' ' ' | wet_lines | tee seamless.dataset.metadata.public.jpn.batch_9.tsv |
|
cat seamless.dataset.metadata.public.enA-jpn.withduration.reordered.batch_10.tsv | egrep ^crawl-data | tr '\t' ' ' | wet_lines | tee seamless.dataset.metadata.public.jpn.batch_10.tsv |
|
cat seamless.dataset.metadata.public.enA-jpn.withduration.reordered.batch_11.tsv | egrep ^crawl-data | tr '\t' ' ' | wet_lines | tee seamless.dataset.metadata.public.jpn.batch_11.tsv |
|
cp ../format_text.py ./ |
|
python format_text.py |
|
mv text.enA-jpn.json ../ |
|
cd ../ |
|
|
|
|
|
|
|
|
|
|
|
|
|
python -c "from datasets import load_dataset; load_dataset('allenai/nllb', 'eng_Latn-jpn_Jpan')" |
|
|
|
|