mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
* resume from step * batch * batch * batch * batch * batch * batch * batch * batch * batch * batch * batch * batch * batch * batch * batch * train_loss_avg train_acc_avg * train_loss_avg train_acc_avg * train_loss_avg train_acc_avg * log step * wav is not exist * wav is not exist * decoding * decoding * decoding * wechat * decoding key * decoding key * decoding key * decoding key * decoding key * decoding key * dynamic batch * start_data_split_i=0 * total_time/accum_grad * total_time/accum_grad * total_time/accum_grad * update avg slice * update avg slice * sensevoice sanm * sensevoice sanm * add * add * add * add * deepspeed * update with main (#1731) * c++ runtime adapt to 1.0 (#1724) * adapt vad runtime to 1.0 * add json * change yml name * add func LoadVocabFromJson * add token file for InitAsr * add token path for OfflineStream * add funcOpenYaml * add token file for InitPunc * add token file for stream * update punc-model * update funasr-wss-server * update runtime_sdk_download_tool.py * update docker list * Delete docs/images/wechat.png * Add files via upload * Emo2Vec限定选择的情感类别 (#1730) * 限定选择的情感类别 * 使用none来禁用情感标签输出 * 修改输出接口 * 使用unuse来禁用token --------- Co-authored-by: 常材 <gaochangfeng.gcf@alibaba-inc.com> * bugfix * v1.0.27 * update docs * hf hub * Fix incorrect assignment of 'end' attribute to 'start' in sentences list comprehension (#1680) --------- Co-authored-by: Yabin Li <wucong.lyb@alibaba-inc.com> Co-authored-by: gaochangfeng <54253717+gaochangfeng@users.noreply.github.com> Co-authored-by: 常材 <gaochangfeng.gcf@alibaba-inc.com> Co-authored-by: nsdou <168500039+nsdou@users.noreply.github.com> * docs * docs * deepspeed * deepspeed * deepspeed * deepspeed * update * ds * ds * ds * ds * ds * ds * ds * add * add * bugfix * add --------- Co-authored-by: Yabin Li <wucong.lyb@alibaba-inc.com> Co-authored-by: gaochangfeng <54253717+gaochangfeng@users.noreply.github.com> Co-authored-by: 常材 <gaochangfeng.gcf@alibaba-inc.com> Co-authored-by: nsdou <168500039+nsdou@users.noreply.github.com>
106 lines
2.5 KiB
Bash
Executable File
106 lines
2.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Copyright 2014 Johns Hopkins University (author: Daniel Povey)
|
|
# 2017 Xingyu Na
|
|
# Apache 2.0
|
|
|
|
remove_archive=false
|
|
|
|
if [ "$1" == --remove-archive ]; then
|
|
remove_archive=true
|
|
shift
|
|
fi
|
|
|
|
if [ $# -ne 3 ]; then
|
|
echo "Usage: $0 [--remove-archive] <data-base> <url-base> <corpus-part>"
|
|
echo "e.g.: $0 /export/a05/xna/data www.openslr.org/resources/33 data_aishell"
|
|
echo "With --remove-archive it will remove the archive after successfully un-tarring it."
|
|
echo "<corpus-part> can be one of: data_aishell, resource_aishell."
|
|
fi
|
|
|
|
data=$1
|
|
url=$2
|
|
part=$3
|
|
|
|
if [ ! -d "$data" ]; then
|
|
echo "$0: no such directory $data"
|
|
exit 1;
|
|
fi
|
|
|
|
part_ok=false
|
|
list="data_aishell resource_aishell"
|
|
for x in $list; do
|
|
if [ "$part" == $x ]; then part_ok=true; fi
|
|
done
|
|
if ! $part_ok; then
|
|
echo "$0: expected <corpus-part> to be one of $list, but got '$part'"
|
|
exit 1;
|
|
fi
|
|
|
|
if [ -z "$url" ]; then
|
|
echo "$0: empty URL base."
|
|
exit 1;
|
|
fi
|
|
|
|
if [ -f $data/$part/.complete ]; then
|
|
echo "$0: data part $part was already successfully extracted, nothing to do."
|
|
exit 0;
|
|
fi
|
|
|
|
# sizes of the archive files in bytes.
|
|
sizes="15582913665 1246920"
|
|
|
|
if [ -f $data/$part.tgz ]; then
|
|
size=$(/bin/ls -l $data/$part.tgz | awk '{print $5}')
|
|
size_ok=false
|
|
for s in $sizes; do if [ $s == $size ]; then size_ok=true; fi; done
|
|
if ! $size_ok; then
|
|
echo "$0: removing existing file $data/$part.tgz because its size in bytes $size"
|
|
echo "does not equal the size of one of the archives."
|
|
rm $data/$part.tgz
|
|
else
|
|
echo "$data/$part.tgz exists and appears to be complete."
|
|
fi
|
|
fi
|
|
|
|
if [ ! -f $data/$part.tgz ]; then
|
|
if ! command -v wget >/dev/null; then
|
|
echo "$0: wget is not installed."
|
|
exit 1;
|
|
fi
|
|
full_url=$url/$part.tgz
|
|
echo "$0: downloading data from $full_url. This may take some time, please be patient."
|
|
|
|
cd $data || exit 1
|
|
if ! wget --no-check-certificate $full_url; then
|
|
echo "$0: error executing wget $full_url"
|
|
exit 1;
|
|
fi
|
|
fi
|
|
|
|
cd $data || exit 1
|
|
|
|
if ! tar -xvzf $part.tgz; then
|
|
echo "$0: error un-tarring archive $data/$part.tgz"
|
|
exit 1;
|
|
fi
|
|
|
|
touch $data/$part/.complete
|
|
|
|
if [ $part == "data_aishell" ]; then
|
|
cd $data/$part/wav || exit 1
|
|
for wav in ./*.tar.gz; do
|
|
echo "Extracting wav from $wav"
|
|
tar -zxf $wav && rm $wav
|
|
done
|
|
fi
|
|
|
|
echo "$0: Successfully downloaded and un-tarred $data/$part.tgz"
|
|
|
|
if $remove_archive; then
|
|
echo "$0: removing $data/$part.tgz file since --remove-archive option was supplied."
|
|
rm $data/$part.tgz
|
|
fi
|
|
|
|
exit 0;
|