Merge pull request #947 from zh794390558/soundfile

[bugfix] Soundfile install
pull/953/head
Hui Zhang 3 years ago committed by GitHub
commit 8b35b3bd88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -53,8 +53,8 @@ def batch_text_id(minibatch, pad_id=0, dtype=np.int64):
peek_example = minibatch[0]
assert len(peek_example.shape) == 1, "text example is an 1D tensor"
lengths = [example.shape[0] for example in minibatch
] # assume (channel, n_samples) or (n_samples, )
lengths = [example.shape[0] for example in
minibatch] # assume (channel, n_samples) or (n_samples, )
max_len = np.max(lengths)
batch = []

@ -67,19 +67,16 @@ class LJSpeechCollector(object):
# Sort by text_len in descending order
texts = [
i
for i, _ in sorted(
i for i, _ in sorted(
zip(texts, text_lens), key=lambda x: x[1], reverse=True)
]
mels = [
i
for i, _ in sorted(
i for i, _ in sorted(
zip(mels, text_lens), key=lambda x: x[1], reverse=True)
]
mel_lens = [
i
for i, _ in sorted(
i for i, _ in sorted(
zip(mel_lens, text_lens), key=lambda x: x[1], reverse=True)
]

@ -24,7 +24,7 @@ clean:
apt.done:
apt update -y
apt install -y bc flac jq vim tig tree pkg-config libflac-dev libogg-dev libvorbis-dev libboost-dev swig python3-dev
apt install -y bc flac jq vim tig tree pkg-config libsndfile1 libflac-dev libogg-dev libvorbis-dev libboost-dev swig python3-dev
echo "check_certificate = off" >> ~/.wgetrc
touch apt.done

@ -1,3 +1,7 @@
# install scripts
call from `tools` dir.
## Details
1. kaldi
deps gcc, mkl or openblas

@ -0,0 +1,18 @@
# install package libsndfile
WGET=wget --no-check-certificate
SOUNDFILE=libsndfile-1.0.28
SOUNDFILE_LIB=${SOUNDFILE}tar.gz
echo "Install package libsndfile into default system path."
test -e ${SOUNDFILE_LIB} || ${WGET} -c "http://www.mega-nerd.com/libsndfile/files/${SOUNDFILE_LIB}"
if [ $? != 0 ]; then
echo "Download ${SOUNDFILE_LIB} failed !!!"
exit 1
fi
tar -zxvf ${SOUNDFILE_LIB}
pushd ${SOUNDFILE}
./configure > /dev/null && make > /dev/null && make install > /dev/null
popd
Loading…
Cancel
Save