|
|
@ -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:
|
|
|
|