赞
踩
modelscope unofficial api
github地址
pip install modelscope_tts
进入网页,登录后,按f12打开开发者工具,复制Cookie(不用管图片中说的api.yaml,复制Cookie就行)
你可以运行下面这段代码
import asyncio import modelscope_tts Cookie="你的Cookie" #设置cookie ms=modelscope_tts.TTS(Cookie) #创建对象 print(ms.listSpeakers()) #查看所有可用的角色 #语音合成是ms的tts方法,支持三个参数,text、speaker、path #支持下面三种方式传参 ms.tts("你好") #只传text ms.tts(text="你好",speaker="阿梓") #使用 阿梓 合成语音 ms.tts("你好","阿梓","./data/tb.wav") #额外传递路径变量(相对) #支持异步处理方式 asyncio.run(ms.asynctts("你好") )
喜欢项目的话可以给个star喵,给个star谢谢喵
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。