Skip to content

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

title Voice Agent
emoji 🎙️
colorFrom blue
colorTo pink
sdk docker
sdk_version 1.0.0
app_file main.py
pinned false

🎙️ Voice Agent Backend (FastAPI)

This is the backend service of the Voice Agent project.
It powers the AI logic, generates text/audio, and serves responses to the frontend.


✨ Features

  • AI agent (Gemini via openai-agents)
  • Text-to-Speech with Edge TTS
  • REST API endpoint (/ask) for frontend
  • Serves generated audio files via static route

🛠️ Tech Stack


🚀 Getting Started

1. Clone the repo

git clone <repo-url>
cd backend

2. Initialize project with uv

Make sure uv is installed globally. If not, install first:

pip install uv

Initialize the project:

uv init

This will create a pyproject.toml file.

3. Add dependencies

uv add fastapi uvicorn openai-agents edge-tts python-dotenv

Now your dependencies are stored in pyproject.toml.

4. Environment variables

Create a .env file in the backend folder:

GEMINI_API_KEY=your_api_key_here

5. Run locally

uv run uvicorn main:app --reload

Backend will run at: 👉 http://localhost:8000


📦 Deployment (Koyeb / Render / Fly.io)

  1. Push this folder to GitHub.

  2. On your cloud platform, select this repo.

  3. Set the Start Command:

    uv run uvicorn main:app --host 0.0.0.0 --port 8000
  4. Add environment variable:

    GEMINI_API_KEY=your_api_key_here

✅ Now your backend API is live!

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages