LiveKit Agent Plugins for FlashTTS
Project description
简介
FlashTTS是一个开源的TTS推理框架,你可以使用它部署Spark-TTS,MegaTTS等开源模型。
安装
pip install livekit-plugins-flashtts
环境变量
FLASHTTS_API_URL,FlashTTS的API地址,默认值为http://localhost:8000。FLASHTTS_API_KEY,FlashTTS的API密钥,默认值为空。
使用
以下是一个使用FlashTTS插件的示例:
from livekit.agents import Agent, AgentSession, JobContext, cli, WorkerOptions
from livekit.plugins import flashtts
from dotenv import load_dotenv
async def entry_point(ctx: JobContext):
await ctx.connect()
agent = Agent(instructions="You are a helpful assistant.")
session = AgentSession(
tts=flashtts.TTS(voice="female"),
)
await session.start(agent=agent, room=ctx.room)
if __name__ == "__main__":
load_dotenv()
cli.run_app(WorkerOptions(entrypoint_fnc=entry_point))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file livekit_plugins_flashtts-1.2.3.post0.tar.gz.
File metadata
- Download URL: livekit_plugins_flashtts-1.2.3.post0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4cb9f1033ab9712cf475b27a217dcd64abe3a44b948cdeaa84b44f95dd3b380
|
|
| MD5 |
5bd96f2a3910284d549860689108b770
|
|
| BLAKE2b-256 |
677110b55c8cec9b86a0320f05d69b28aa41bba688933cc7b060999dfb63277e
|
File details
Details for the file livekit_plugins_flashtts-1.2.3.post0-py3-none-any.whl.
File metadata
- Download URL: livekit_plugins_flashtts-1.2.3.post0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
938b7fa7f40549bfe1a19bb8d3aceb020472061688b91a0926f13c8c954df32a
|
|
| MD5 |
276c866e7234facee43cdf0731c47f00
|
|
| BLAKE2b-256 |
df34648f2d23bdd6defef6e8ee9d0851c486f918b8201b2716b1c2b19c51c047
|