Update asr and audio tagging demo.

pull/1086/head
KP 3 years ago
parent 6e5a0ed2d5
commit 591828a664

@ -59,13 +59,13 @@ wget https://paddlespeech.bj.bcebos.com/PaddleAudio/cat.wav https://paddlespeech
cls_executor = CLSExecutor() cls_executor = CLSExecutor()
result = cls_executor( result = cls_executor(
model_type='panns_cnn14', model='panns_cnn14',
cfg_path=None, # Set `cfg_path` and `ckpt_path` to None to use pretrained model. config=None, # Set `config` and `ckpt_path` to None to use pretrained model.
label_file=None, label_file=None,
ckpt_path=None, ckpt_path=None,
audio_file='./cat.wav', audio_file='./cat.wav',
topk=10, topk=10,
device=paddle.get_device(), ) device=paddle.get_device())
print('CLS Result: \n{}'.format(result)) print('CLS Result: \n{}'.format(result))
``` ```
Output: Output:

@ -52,7 +52,7 @@ wget https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespeech.
model='conformer_wenetspeech', model='conformer_wenetspeech',
lang='zh', lang='zh',
sample_rate=16000, sample_rate=16000,
config=None, # Set `conf` and `ckpt_path` to None to use pretrained model. config=None, # Set `config` and `ckpt_path` to None to use pretrained model.
ckpt_path=None, ckpt_path=None,
audio_file='./zh.wav', audio_file='./zh.wav',
device=paddle.get_device()) device=paddle.get_device())

Loading…
Cancel
Save