Skip to main content

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

Project description

modelscope unofficial api

从pip安装

pip install Enkianthus_tts

安装此依赖

运行

你可以运行下面这段代码

import asyncio
import Enkianthus_tts

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

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

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

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

在异步函数中使用

import asyncio
import Enkianthus_tts


async def voiceGenerater():
    ms = Enkianthus_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.8.tar.gz (29.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: Enkianthus_tts-0.1.8.tar.gz
  • Upload date:
  • Size: 29.8 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.8.tar.gz
Algorithm Hash digest
SHA256 8a014d0145e89c2ad96bd400c412c30d9959cf9a359c701afca4b7e24d7737e9
MD5 ce134aacd313a2bf729abe4db9411e12
BLAKE2b-256 55b4cbf327036d37ba014a3455ecf7a859dbfb970f9879a58d34c7cd11adc6ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Enkianthus_tts-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 945b96e2df4c079166eb094630c7f4d10d3c98e9a24c485581ebe5f11d14ea97
MD5 6c6f59de488d4d87931c72c6e45864be
BLAKE2b-256 535154ecdf33abf84d9683f21ea95138640e3d10c3fc46d34dd3f106817db107

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