Skip to main content

A modular voice agent with swappable STT/TTS/LLM backends

Project description

fastrtc-voice-agent

A modular voice agent built on FastRTC

Installation

pip install fastrtc-voice-agent

Example

from fastrtc import ReplyOnPause, Stream
from voice_agent import create_agent, AgentConfig, STTConfig, TTSConfig, LLMConfig

config = AgentConfig(
    system_prompt="You are a helpful voice assistant.",
    stt=STTConfig(backend="faster_whisper", model_size="small"),
    tts=TTSConfig(backend="edge", voice="en-US-AvaMultilingualNeural"),
    llm=LLMConfig(backend="ollama", model="llama3.2:3b"),
)

agent = create_agent(config)

stream = Stream(
    ReplyOnPause(agent.create_fastrtc_handler()),
    modality="audio",
    mode="send-receive",
)

stream.ui.launch()

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

fastrtc_voice_agent-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

fastrtc_voice_agent-0.1.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file fastrtc_voice_agent-0.1.0.tar.gz.

File metadata

  • Download URL: fastrtc_voice_agent-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for fastrtc_voice_agent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5a4fded5b457603901e98d0ad195241ba0a11e0412b0e69fb808a5f9ca75dc65
MD5 49f9926c448f0b294a0927be6638f775
BLAKE2b-256 d09669e1bd4af14907ccc0e070841c4575081aa3b5bca1cd224a96dc9280292e

See more details on using hashes here.

File details

Details for the file fastrtc_voice_agent-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fastrtc_voice_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a45be540e27cd38c221a8753305ef861b59588ad5c17c147889ad4b8b5757ccc
MD5 8f9e12491b027505d3727460234214db
BLAKE2b-256 e7ebd72ec6f4659b3f240a09f130cffa38ef821f2debb3cc7fff41f63a63df26

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