prepare_data.sh 765 字节
Newer Older
1 2 3 4 5 6 7 8
#! /usr/bin/bash

pushd ../..

# download data, generate manifests
python data/librispeech/librispeech.py \
--manifest_prefix='data/librispeech/manifest' \
--full_download='True' \
L
Luo Tao 已提交
9
--target_dir=$HOME'/.cache/paddle/dataset/speech/Libri'
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

if [ $? -ne 0 ]; then
    echo "Prepare LibriSpeech failed. Terminated."
    exit 1
fi

#cat data/librispeech/manifest.train* | shuf > data/librispeech/manifest.train


# compute mean and stddev for normalizer
python tools/compute_mean_std.py \
--manifest_path='data/librispeech/manifest.train' \
--num_samples=2000 \
--specgram_type='linear' \
--output_path='data/librispeech/mean_std.npz'

if [ $? -ne 0 ]; then
    echo "Compute mean and stddev failed. Terminated."
    exit 1
fi


echo "LibriSpeech Data preparation done."