Skip to main content

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


Download files

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

Source Distribution

livekit_plugins_flashtts-1.1.5.post0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file livekit_plugins_flashtts-1.1.5.post0.tar.gz.

File metadata

File hashes

Hashes for livekit_plugins_flashtts-1.1.5.post0.tar.gz
Algorithm Hash digest
SHA256 e6be6d2f8bc8a7045c45da1d4f6428857e21350c3d514acfb21b388a22576d13
MD5 2a8f0e3a74573e27b099b5fe5782f12c
BLAKE2b-256 f8cfa1c93e482ccea6235ea0b5f604f8ff31c9d4c5df15e4ffff795f9d3d9e63

See more details on using hashes here.

File details

Details for the file livekit_plugins_flashtts-1.1.5.post0-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_flashtts-1.1.5.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ad497343e4d9b64e6f18f0b213a68fb3bf6cfb1234a1fb571b3385c1b782de3
MD5 9d328c4e3563921a58ce9d4fbd8ff5cd
BLAKE2b-256 92d1288d2b88f1420adeb792aa9be557783c69f6ec83254a52eebc20e46b126a

See more details on using hashes here.

Supported by

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