部署ChatTTS出现tn包和nemo_text_processing的问题总结

部署ChatTTS出现tn包和nemo_text_processing的问题总结

1. 启动时候安装出现的问题

sql 复制代码
WARNING:ChatTTS.core:Package nemo_text_processing not found! Run: 
conda install -c conda-forge pynini=2.1.5 && pip install nemo_text_processing 
Traceback (most recent call last): File "D:\projectAll\github\ChatTTS-main\dome.py", 
line 12, in <module> wavs = chat.infer(texts, ) 
File "D:\projectAll\github\ChatTTS-main\ChatTTS\core.py", line 146, 
in infer self.init_normalizer(_lang) File 
"D:\projectAll\github\ChatTTS-main\ChatTTS\core.py", 
line 199, in init_normalizer 
self.normalizer[lang] = partial(Normalizer(input_case='cased', lang=lang).normalize, 
verbose=False, punct_post_process=True) ^^^^^^^^^^ UnboundLocalError: 
cannot access local variable 'Normalizer' where it is not associated with a value

会提醒没有安装:conda install -c conda-forge pynini=2.1.5 && pip install nemo_text_processing

安装nemo_text_processing报错:

vbnet 复制代码
 error: subprocess-exited-with-error

 × Getting requirements to build wheel did not run successfully.
 │ exit code: 1
 ╰─> [20 lines of output]
     Traceback (most recent call last):
       File "D:\venv\chat\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
         main()
       File "D:\venv\chat\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
         json_out['return_val'] = hook(**hook_input['kwargs'])
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       File "D:\venv\chat\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
         return hook(config_settings)
                ^^^^^^^^^^^^^^^^^^^^^
       File "C:\Users\jxb99\AppData\Local\Temp\pip-build-env-cfbw2jgs\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
         return self._get_build_requires(config_settings, requirements=['wheel'])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       File "C:\Users\jxb99\AppData\Local\Temp\pip-build-env-cfbw2jgs\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
         self.run_setup()
       File "C:\Users\jxb99\AppData\Local\Temp\pip-build-env-cfbw2jgs\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
         super().run_setup(setup_script=setup_script)
       File "C:\Users\jxb99\AppData\Local\Temp\pip-build-env-cfbw2jgs\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
         exec(code, locals())
       File "<string>", line 22, in <module>
     ModuleNotFoundError: No module named 'Cython'
     [end of output]

 note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

2. 解决方案:

torchaudio内存有点大2.4g

pip 复制代码
conda install -c conda-forge pynini=2.1.5
pip uninstall torchaudio
pip install torchaudio -f https://download.pytorch.org/whl/torch_stable.html
pip install nemo_text_processing
  1. core.py文件中会有一个文件找不到:
javascript 复制代码
from tn.chinese.normalizer import Normalizer

4.解决tn包的问题:

arduino 复制代码
# install
pip install WeTextProcessing

参考博客:blog.csdn.net/weixin_4882...

相关推荐
DevOpsDojo2 分钟前
MATLAB语言的正则表达式
开发语言·后端·golang
桂月二二2 小时前
深入探索 Rust 中的异步编程:从基础到实际案例
开发语言·后端·rust
心之语歌6 小时前
Spring boot 项目 Spring 注入 代理 并支持 代理对象使用 @Autowired 去调用其他服务
spring boot·后端·spring
自律小仔7 小时前
桌面开发 的变量声明(Variable Declaration)核心知识
开发语言·后端·golang
Upuping8 小时前
「全网最细 + 实战源码案例」设计模式——外观模式
java·后端·设计模式
拖孩9 小时前
💥大家好,我是拖孩🎤
前端·javascript·后端
AI向前看9 小时前
T-SQL语言的正则表达式
开发语言·后端·golang
追逐时光者10 小时前
Visual Studio实用的搜索技巧(提高开发工作效率)
后端·visual studio
小陈far11 小时前
Springcloud项目-前后端联调(一)
后端·spring·spring cloud