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

相关推荐
飞奔的波大爷4 分钟前
springboot vue工资管理系统源码和答辩PPT论文
vue.js·spring boot·后端
daiyang123...42 分钟前
JavaEE 【知识改变命运】02 多线程(1)
java·开发语言·后端·java-ee·idea
凌虚1 小时前
Web 端语音对话 AI 示例:使用 Whisper 和 llama.cpp 构建语音聊天机器人
前端·人工智能·后端
2401_854391081 小时前
SpringBoot社团管理:用户体验优化
spring boot·后端·ux
陈序缘2 小时前
Rust 力扣 - 198. 打家劫舍
开发语言·后端·算法·leetcode·rust
yyycqupt2 小时前
数据库连接池(二)
linux·数据库·c++·后端·单例模式
techdashen2 小时前
Go context.Context
开发语言·后端·golang
凡人的AI工具箱2 小时前
40分钟学 Go 语言高并发:Select多路复用
开发语言·后端·架构·golang
ModelBulider2 小时前
SpringMVC应用专栏介绍
java·开发语言·后端·spring·springmvc
恬淡虚无真气从之2 小时前
go 结构体方法
开发语言·后端·golang