部署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...

相关推荐
2401_8576226617 分钟前
SpringBoot框架下校园资料库的构建与优化
spring boot·后端·php
2402_8575893621 分钟前
“衣依”服装销售平台:Spring Boot框架的设计与实现
java·spring boot·后端
哎呦没1 小时前
大学生就业招聘:Spring Boot系统的架构分析
java·spring boot·后端
_.Switch2 小时前
Python Web 应用中的 API 网关集成与优化
开发语言·前端·后端·python·架构·log4j
杨哥带你写代码3 小时前
足球青训俱乐部管理:Spring Boot技术驱动
java·spring boot·后端
AskHarries4 小时前
读《show your work》的一点感悟
后端
A尘埃4 小时前
SpringBoot的数据访问
java·spring boot·后端
yang-23074 小时前
端口冲突的解决方案以及SpringBoot自动检测可用端口demo
java·spring boot·后端
Marst Code4 小时前
(Django)初步使用
后端·python·django
代码之光_19804 小时前
SpringBoot校园资料分享平台:设计与实现
java·spring boot·后端