Repository: PaddlePaddle/PaddleSpeech

Issue:
speech_recognition示例运行出错
这是源码：
import paddle
from paddlespeech.cli import ASRExecutor

asr_executor = ASRExecutor()
text = asr_executor(
    model='conformer_wenetspeech',
    lang='zh',
    sample_rate=16000,
    config=None,  # Set `config` and `ckpt_path` to None to use pretrained model.
    ckpt_path=None,
    audio_file='input.wav',
    force_yes=False,
    device=paddle.get_device())
print('ASR Result: \n{}'.format(text))

运行后提示：
Traceback (most recent call last):
  File "D:\BaiduNetdiskDownload\PaddleSpeech-r0.1.0\demos\speech_recognition\speech_recognition.py", line 5, in <module>
    text = asr_executor(
  File "D:\BaiduNetdiskDownload\PaddleSpeech-r0.1.0\paddlespeech\cli\asr\infer.py", line 449, in __call__
    self._init_from_path(model, lang, sample_rate, config, ckpt_path)
  File "D:\BaiduNetdiskDownload\PaddleSpeech-r0.1.0\paddlespeech\cli\asr\infer.py", line 166, in _init_from_path
    self.config.merge_from_file(self.cfg_path)
  File "D:\SoftWare\Anaconda\lib\site-packages\yacs\config.py", line 212, in merge_from_file
    cfg = self.load_cfg(f)
  File "D:\SoftWare\Anaconda\lib\site-packages\yacs\config.py", line 349, in load_cfg
    return cls._load_cfg_from_file(cfg_file_obj_or_str)
  File "D:\SoftWare\Anaconda\lib\site-packages\yacs\config.py", line 358, in _load_cfg_from_file
    return cls._load_cfg_from_yaml_str(file_obj.read())
  File "D:\SoftWare\Anaconda\lib\site-packages\yacs\config.py", line 371, in _load_cfg_from_yaml_str
    return cls(cfg_as_dict)
  File "D:\SoftWare\Anaconda\lib\site-packages\yacs\config.py", line 86, in __init__
    init_dict = self._create_config_tree_from_dict(init_dict, key_list)
  File "D:\SoftWare\Anaconda\lib\site-packages\yacs\config.py", line 126, in _create_config_tree_from_dict
    dic[k] = cls(v, key_list=key_list + [k])
  File "D:\SoftWare\Anaconda\lib\site-packages\yacs\config.py", line 86, in __init__
    init_dict = self._create_config_tree_from_dict(init_dict, key_list)
  File "D:\SoftWare\Anaconda\lib\site-packages\yacs\config.py", line 126, in _create_config_tree_from_dict
    dic[k] = cls(v, key_list=key_list + [k])
  File "D:\SoftWare\Anaconda\lib\site-packages\yacs\config.py", line 86, in __init__
    init_dict = self._create_config_tree_from_dict(init_dict, key_list)
  File "D:\SoftWare\Anaconda\lib\site-packages\yacs\config.py", line 129, in _create_config_tree_from_dict
    _assert_with_logging(
  File "D:\SoftWare\Anaconda\lib\site-packages\yacs\config.py", line 521, in _assert_with_logging
    assert cond, msg
AssertionError: Key model.model_conf.ctc_grad_norm_type with value <class 'NoneType'> is not a valid type; valid types: {<class 'list'>, <class 'tuple'>, <class 'str'>, <class 'int'>, <class 'float'>, <class 'bool'>}

目前是按照文档在windows下进行的paddlepaddle安装，并下载了PaddleSpeech-r0.1.0源码后直接进行的测试，请问我该如何解决这个问题，谢谢


Discussion:
这个意思是还要进行训练获得模型的一些值么
yaml中None值不支持导致的。将配置文件中的ctc_grad_norm_type的value修改成null，或者删除试下。
> yaml中None值不支持导致的。将配置文件中的ctc_grad_norm_type的value修改成null，或者删除试下。

可是配置文件中的值原本就是null，不是None，已经删除试过还是报一个错
把ctc_grad_norm 设置成 instance
请问一下你这里的yacs是什么版本？我这里使用的是0.1.8，是可以支持null的
https://issueexplorer.com/issue/facebookresearch/detectron2/3649 这里也用相似问题，yacs升级到0.1.8就可以解决这个问题
> https://issueexplorer.com/issue/facebookresearch/detectron2/3649 这里也用相似问题，yacs升级到0.1.8就可以解决这个问题

当我把yacs从0.1.6升级到0.1.8后，成功解决了，感谢
嗯，好的，感谢反馈，下一版本会自动升级yacs的版本号来避免这个问题。

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -61,7 +61,7 @@
         "typeguard",
         "visualdl",
         "webrtcvad",
-        "yacs",
+        "yacs~=0.1.8",
     ],
     "develop": [
         "ConfigArgParse",


Test patch: