parent
b12ae34ef1
commit
2c531d78ac
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
device=$1
|
||||||
|
audio_file=$2
|
||||||
|
ckpt_dir=$3
|
||||||
|
feat_backend=$4
|
||||||
|
|
||||||
|
python3 ${BIN_DIR}/predict.py \
|
||||||
|
--device ${device} \
|
||||||
|
--wav ${audio_file} \
|
||||||
|
--feat_backend ${feat_backend} \
|
||||||
|
--top_k 10 \
|
||||||
|
--checkpoint ${ckpt_dir}/model.pdparams
|
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ngpu=$1
|
||||||
|
device=$2
|
||||||
|
feat_backend=$3
|
||||||
|
|
||||||
|
num_epochs=50
|
||||||
|
batch_size=16
|
||||||
|
ckpt_dir=./checkpoint
|
||||||
|
save_freq=10
|
||||||
|
|
||||||
|
if [ ${ngpu} -gt 1 ]; then
|
||||||
|
python3 -m paddle.distributed.launch --gpus $CUDA_VISIBLE_DEVICES ${BIN_DIR}/train.py \
|
||||||
|
--epochs ${num_epochs} \
|
||||||
|
--feat_backend ${feat_backend} \
|
||||||
|
--batch_size ${batch_size} \
|
||||||
|
--checkpoint_dir ${ckpt_dir} \
|
||||||
|
--save_freq ${save_freq}
|
||||||
|
else
|
||||||
|
python3 ${BIN_DIR}/train.py \
|
||||||
|
--device ${device} \
|
||||||
|
--epochs ${num_epochs} \
|
||||||
|
--feat_backend ${feat_backend} \
|
||||||
|
--batch_size ${batch_size} \
|
||||||
|
--checkpoint_dir ${ckpt_dir} \
|
||||||
|
--save_freq ${save_freq}
|
||||||
|
fi
|
@ -0,0 +1,15 @@
|
|||||||
|
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
from .backends import *
|
||||||
|
from .features import *
|
@ -0,0 +1,13 @@
|
|||||||
|
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
@ -0,0 +1,41 @@
|
|||||||
|
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
import setuptools
|
||||||
|
|
||||||
|
# set the version here
|
||||||
|
version = '0.1.0a'
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
name="paddleaudio",
|
||||||
|
version=version,
|
||||||
|
author="",
|
||||||
|
author_email="",
|
||||||
|
description="PaddleAudio, in development",
|
||||||
|
long_description="",
|
||||||
|
long_description_content_type="text/markdown",
|
||||||
|
url="",
|
||||||
|
packages=setuptools.find_packages(include=['paddleaudio*']),
|
||||||
|
classifiers=[
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: OSI Approved :: MIT License",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
],
|
||||||
|
python_requires='>=3.6',
|
||||||
|
install_requires=[
|
||||||
|
'numpy >= 1.15.0',
|
||||||
|
'scipy >= 1.0.0',
|
||||||
|
'resampy >= 0.2.2',
|
||||||
|
'soundfile >= 0.9.0',
|
||||||
|
'colorlog',
|
||||||
|
], )
|
Loading…
Reference in new issue