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.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

livekit_plugins_flashtts-1.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_flashtts-1.1.0.tar.gz.

File metadata

File hashes

Hashes for livekit_plugins_flashtts-1.1.0.tar.gz
Algorithm Hash digest
SHA256 24cede8d8ddffacd126c29cc1901c43dd61a8c8d4914040d65dd22de6ce43c16
MD5 55a04afbd2e9a342be19a48cca70264e
BLAKE2b-256 6b0b15eeffa27ff2401f65a9dfa9c875fa79bea93edf2df77a0ef39187393665

See more details on using hashes here.

File details

Details for the file livekit_plugins_flashtts-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_flashtts-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c21123dafef83fe870b16a62ca4efe92037a75d4d90f4aea9b4ce7d0444833b8
MD5 d1796272e3df6690deec97d5eacd63c4
BLAKE2b-256 44b766f230a809616f344c8c0085114fd7cee678d5d2c8d8ebf4f52c05886773

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