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.2.tar.gz (9.3 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.2-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastrtc_voice_agent-0.1.2.tar.gz
  • Upload date:
  • Size: 9.3 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.2.tar.gz
Algorithm Hash digest
SHA256 61ab0bca6a97df6d4e845022350072bc79dc40404c051370cd5b993699bfde7a
MD5 8006b2354984299c1a3efd5d993a0f2d
BLAKE2b-256 13d6875311ba0dfaf94543eaa9494fdd4d927b5bca6a3aada2d8894c5e916725

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastrtc_voice_agent-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 afa05334e38fd26dd11d0837d522678d673f9cf8600e4c537f517b3837ad8a7b
MD5 f0cb8cb66c2a9cc0952b39e1b86211a9
BLAKE2b-256 5ac9aaa655e45bca3b571074c8fbbf8348dfb78ae46d888e306ec08bd7195d55

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