CosyVoice
CosyVoice copied to clipboard
分享一下pypi包,一键运行cosyvoice
感觉CosyVoice依赖比较多,尤其是还是有third party,这对于python来讲实在是太不pythonic了。
为了不劳烦仓库原作者们再辛苦添加pypi,我动手创建了一个,可以一键安装:
pip install cosyvoice
同时textnormalize的库也很烦人,为了方便,可以直接用:WeTextProcessing,这个库也容易踩坑,好在依赖都有conda forge的库版本。
conda install -c conda-forge pynini==2.1.6
pip install WeTextProcessing
pip install cosyvoice -U
这样便可以用几行代码推理了。不用安装matcha-tts。剩余的依赖pip会自动处理。
from cosyvoice.api import CosyVoiceTTS
def test_tts():
tts = CosyVoiceTTS()
a = tts.tts(
"今天我很想学习一下,不知道大模型能否帮我解决这个问题,日本語は話せますか?"
)
print(a)
我在使用3.11的python环境时,直接pip install cosyvoice,运行上述的demo时依旧会有没有导入的依赖库,并且我还没有完整的跑完,可能还有未导入的依赖,或者是我使用的方式有问题
Oh, please run pip install cosyvoice>=0.0.6, just added these dependencies to pypi. Meanwhile, one can try run:
cosyvoice-server --port 8888
To any devices without even download anything, the model will download automatically from modelscope. I have made a TTS server cli just like openai, with streaming support out of box. (Different from official repo does, which only supports non-stream)
你好,感谢你做的一切,但是我发现包中缺少一些文件,这代表使用它还需要克隆这个项目吗?
@xipingL Hi, can u point out which file were lacked of?
Traceback (most recent call last):
File "/opt/miniconda3/envs/cosyvoice/bin/cosyvoice-server", line 5, in
我这里也少了呢,辛苦您看下 @lucasjinreal
@xipingL Hi, can u point out which file were lacked of?
就是下面给出的问题,感谢。貌似包里缺少了util cli文件
@xipingL @Ccccx
Hi, I have upgrade to 0.0.7, can u check if this works?
from cosyvoice.api import CosyVoiceTTS
a = CosyVoiceTTS()
on my side it seems can work
感谢回复,确认已升级,依旧报错,@lucasjinreal。 conda包: ` ...... 省略其他 cosyvoice 0.0.7 pypi_0 pypi ...... 省略其他
启动:
cosyvoice-server --port 8888
(cosyvoice) cjz@iZ0jlf:/data/git$ Traceback (most recent call last): File "/opt/miniconda3/envs/cosyvoice/bin/cosyvoice-server", line 5, in <module> from cosyvoice.server import main File "/opt/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/cosyvoice/server.py", line 24, in <module> from cosyvoice.api import CosyVoiceTTS File "/opt/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/cosyvoice/api.py", line 3, in <module> from cosyvoice.utils.file_utils import load_wav ModuleNotFoundError: No module named 'cosyvoice.utils'
Oh, it seems that there are certain oversight on my part. Apologies for the issue. I will rectify it this evening!
This issue is stale because it has been open for 30 days with no activity.
我这边是错误无效参数/Who-register,可惜了
i think it can be used for now.
ModuleNotFoundError: No module named 'cosyvoice.utils' I also meet this error