• kailebee

    将整个nltk_data下载下来放到指定目录下,不会出现下面这个错误了:

    [nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
    [nltk_data]     [Errno 99] Cannot assign requested address>
    [nltk_data] Error loading cmudict: <urlopen error [Errno 99] Cannot
    [nltk_data]     assign requested address>
    

    但训练时,还是有这个错误:

    Traceback (most recent call last):
      File "examples/tacotron2/train_tacotron2.py", line 488, in <module>
        main()
      File "examples/tacotron2/train_tacotron2.py", line 436, in main
        tacotron2 = TFTacotron2(config=tacotron_config, training=True, name="tacotron2")
      File "/root/anaconda3/envs/tts/lib/python3.6/site-packages/tensorflow_tts/models/tacotron2.py", line 746, in __init__
        super().__init__(self, **kwargs)
      File "/root/anaconda3/envs/tts/lib/python3.6/site-packages/tensorflow/python/training/tracking/base.py", line 457, in _method_wrapper
        result = method(self, *args, **kwargs)
      File "/root/anaconda3/envs/tts/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 262, in __init__
        'name', 'autocast'})
      File "/root/anaconda3/envs/tts/lib/python3.6/site-packages/tensorflow/python/keras/utils/generic_utils.py", line 778, in validate_kwargs
        raise TypeError(error_message, kwarg)
    TypeError: ('Keyword argument not understood:', 'training')
    

    发布在 语音合成与识别 阅读更多
  • kailebee

    补充一下,训练时仍然输出:

    [nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
    [nltk_data]     [Errno 99] Cannot assign requested address>
    [nltk_data] Error loading cmudict: <urlopen error [Errno 99] Cannot
    [nltk_data]     assign requested address>
    

    不知道有没有影响?

    发布在 语音合成与识别 阅读更多
  • kailebee

    已解决。为以后复现项目的同学留下提示。根据https://blog.csdn.net/qq_36756866/article/details/111593531提示,下载好cmudict安装包,放到下图提示的任一路径下即可。
    42118617-0dff-4652-aa60-f0fcc06841c0-image.png

    在python解释器中输入,import cmudict 不报错,即表示安装成功

    发布在 语音合成与识别 阅读更多
  • kailebee

    项目地址:http://manaai.cn/aicodes_detail3.html?id=70

    处理数据、数据归一化都顺利进行,在训练数据时发生报错:

    python examples/tacotron2/train_tacotron2.py --train-dir dump/train/ \
      --dev-dir dump/valid/ \
      --outdir examples/tacotron2/exp/train.tacotron2.baker.v1/ \
      --config examples/tacotron2/conf/tacotron2.baker.v1.yaml \
      --use-norm 1 \
      --mixed_precision 0 \
      --resume examples/tacotron2/exp/train.tacotron2.baker.v1/checkpoints/
    

    报错信息:

    Traceback (most recent call last):
      File "examples/tacotron2/train_tacotron2.py", line 488, in <module>
        main()
      File "examples/tacotron2/train_tacotron2.py", line 436, in main
        tacotron2 = TFTacotron2(config=tacotron_config, training=True, name="tacotron2")
      File "/root/anaconda3/envs/tts/lib/python3.6/site-packages/tensorflow_tts/models/tacotron2.py", line 746, in __init__
        super().__init__(self, **kwargs)
      File "/root/anaconda3/envs/tts/lib/python3.6/site-packages/tensorflow/python/training/tracking/base.py", line 457, in _method_wrapper
        result = method(self, *args, **kwargs)
      File "/root/anaconda3/envs/tts/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 262, in __init__
        'name', 'autocast'})
      File "/root/anaconda3/envs/tts/lib/python3.6/site-packages/tensorflow/python/keras/utils/generic_utils.py", line 778, in validate_kwargs
        raise TypeError(error_message, kwarg)
    TypeError: ('Keyword argument not understood:', 'training')
    

    发布在 语音合成与识别 阅读更多
  • kailebee

    @刘看山 好的 谢谢您了。再运行不报错了,貌似解决了。

    发布在 语音合成与识别 阅读更多
  • kailebee

    您好!
    关于 cmudict 报错的问题:
    输入 一下命令,

    tensorflow-tts-preprocess --dataset baker --rootdir baker --outdir dump --config ./preprocess/baker_preprocess.yaml 
    

    提示错误信息:

    cff7db9d-583d-478d-80a5-7fe057b2f86d-image.png
    依照网上的解决方案:https://blog.csdn.net/qq_36756866/article/details/111593531
    不会再提示上面这种错误了:

    但是仍然会提示没安装上cumdict的错误,不知道是因为什么原因:

    (tts) root@2369ba45a62d:/T_c# tensorflow-tts-preprocess --dataset baker --rootdir baker --outdir dump --config preprocess/baker_preprocess.yaml 
    2021-04-14 03:21:23.696142: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
    [nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
    [nltk_data]     [Errno 99] Cannot assign requested address>
    [nltk_data] Error loading cmudict: <urlopen error [Errno 99] Cannot
    [nltk_data]     assign requested address>
    2021-04-14 03:21:25,895 (preprocess:373) INFO: Selected 'baker' processor.
    Traceback (most recent call last):
      File "/root/anaconda3/envs/tts/bin/tensorflow-tts-preprocess", line 8, in <module>
        sys.exit(preprocess())
      File "/root/anaconda3/envs/tts/lib/python3.6/site-packages/tensorflow_tts/bin/preprocess.py", line 377, in preprocess
        cleaner_names=dataset_cleaner[config["dataset"]],
      File "<string>", line 17, in __init__
      File "/root/anaconda3/envs/tts/lib/python3.6/site-packages/tensorflow_tts/processor/baker.py", line 549, in __post_init__
        super().__post_init__()
      File "/root/anaconda3/envs/tts/lib/python3.6/site-packages/tensorflow_tts/processor/base_processor.py", line 63, in __post_init__
        self.create_items()
      File "/root/anaconda3/envs/tts/lib/python3.6/site-packages/tensorflow_tts/processor/baker.py", line 567, in create_items
        print(f"Skip this: {utt_id} {chn_char} {pinyin}")
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 18-19: ordinal not in range(128)
    

    发布在 语音合成与识别 阅读更多
  • kailebee

    @刘看山 好的。百度过来但是,仍然报错:

    >>> import nltk
    >>> nltk.download('cmudict')
    [nltk_data] Error loading cmudict: <urlopen error [Errno 99] Cannot
    [nltk_data]     assign requested address>
    False
    

    发布在 语音合成与识别 阅读更多
  • kailebee

    项目地址: https://gitlab.com/StrangeAI/tensorflow_tts_cn
    跑项目之前已经安装:conda list
    20bd1fb1-dbfd-4d37-8998-02f36ccad874-image.png

    b9f70ad9-ffd2-4b77-97fa-6750e79a19ab-image.png

    准备处理数据,使用的是标贝数据集:

    tensorflow-tts-preprocess --dataset baker --rootdir baker --outdir dump --config ./preprocess/baker_preprocess.yaml 
    

    报错信息:
    69e5837d-875f-4f13-ba54-d5932d94673c-image.png
    3e344ce7-6716-4f48-9db2-941d0cc8c06a-image.png

      Resource cmudict not found.
      Please use the NLTK Downloader to obtain the resource:
    
      >>> import nltk
      >>> nltk.download('cmudict')
      
      For more information see: https://www.nltk.org/data.html
    
      Attempted to load corpora/cmudict
    
      Searched in:
        - '/root/nltk_data'
        - '/root/anaconda3/envs/tts/nltk_data'
        - '/root/anaconda3/envs/tts/share/nltk_data'
        - '/root/anaconda3/envs/tts/lib/nltk_data'
        - '/usr/share/nltk_data'
        - '/usr/local/share/nltk_data'
        - '/usr/lib/nltk_data'
        - '/usr/local/lib/nltk_data'
    

    根据提示输入哪两行命令仍是不能解决问题报错:

    >>> import nltk
    >>> nltk.download('cmudict')
    [nltk_data] Error loading cmudict: <urlopen error [Errno 99] Cannot
    [nltk_data]     assign requested address>
    False
    

    在网上看到解决方案,说先下载cmudict,然后拷贝到'/root/nltk_data目录下,但仍然没有解决..,望指教

    发布在 语音合成与识别 阅读更多

与 神力AI社区 的连接断开,我们正在尝试重连,请耐心等待