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