Skip to main content

modelscopeTTS Unofficial api,see https://github.com/avilliai/modelscopeTTS for more information

Project description

modelscope unofficial api

从pip安装

pip install modelscope_tts

安装此依赖

运行

你可以运行下面这段代码

import asyncio
import modelscope_tts

Cookie=None              #大部分speaker不需要cookie,直接用None即可
ms=modelscope_tts.TTS(Cookie)        #创建对象

print(ms.listSpeakers())             #查看所有可用的角色
#异步处理方式
asyncio.run(ms.tts(text="你好",speaker="宫子(泳装)")  )
#(如果使用["BT","塔菲","阿梓","otto","丁真","星瞳","东雪莲","嘉然","孙笑川","亚托克斯","文静","鹿鸣","奶绿","七海","恬豆","科比"]需要获取cookie
import asyncio
import modelscope_tts

Cookie="你的Cookie"                   #设置cookie,参照[Manyana#issue7](https://github.com/avilliai/Manyana/issues/7) 复制你的cookie
ms=modelscope_tts.TTS(Cookie)        #创建对象

print(ms.listSpeakers())             #查看所有可用的角色
#异步处理方式
asyncio.run(ms.tts(text="你好",speaker="阿梓")  )

在异步函数中使用

import asyncio
import modelscope_tts
async def voiceGenerater():
    ms=modelscope_tts.TTS(None)    #前面我们说了,除了特定speaker需要cookie,其他的直接给TTS传None就行
    await ms.tts(text="你好",speaker="宫子(泳装)") #返回的是文件路径,当然,你也可以传递path参数

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Enkianthus_tts-0.1.6.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

Enkianthus_tts-0.1.6-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file Enkianthus_tts-0.1.6.tar.gz.

File metadata

  • Download URL: Enkianthus_tts-0.1.6.tar.gz
  • Upload date:
  • Size: 30.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.0

File hashes

Hashes for Enkianthus_tts-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5c307261d105df0828d03532a55ef619574a329c4c26a33cfe4af2188bfbbb5c
MD5 d63dcad9beb281c1e5f605da1d6eeb48
BLAKE2b-256 ab13d10054dbb4cef5522f9bb04d544d1317563ef60822b10f591ad02d9b8615

See more details on using hashes here.

File details

Details for the file Enkianthus_tts-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for Enkianthus_tts-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1ab976f193d824f5a45c7557cdc1a70c66cb2fac1cadf695b207667c7f90765c
MD5 49d6825a612f652f7e8a85e84a90fb52
BLAKE2b-256 9508b0a3100bb5ac243e1fb7e201d5e2f09778173ca1c38d472c0a9ecd5a40c7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page