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.1.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.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastrtc_voice_agent-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ced097ad9de8fc8d982e7336a75de20892d6eafb67ff84503dff2f84051e7031
MD5 b57dd9c08ed3c49aecd9e543581ba7a3
BLAKE2b-256 6fa97fe8bdc33876e7734c1e39484cb96bcced84858510e479414bf4a3557c3f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastrtc_voice_agent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ad8607671d24abcb943b96062bcea1b4ba452756bbf2952fe34b04f44e28024
MD5 71e5db01bd3b583c4f01d89a4b5dfc2d
BLAKE2b-256 6587768a7d4c1cf657698a756f7ece3fbf78391000c0197dccb5642945fa6b2e

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