This repository is a reference project for deploying and running voice-agent model infrastructure with a local backend/frontend workflow.
The default setup in this public template is:
- deploy ASR and TTS model servers on AWS with Terraform + EC2
- run the backend locally
- run the frontend locally
Before running the stack, make sure you have:
- An AWS account with credentials configured locally
- Terraform installed: https://developer.hashicorp.com/terraform/install
uvinstalled for the Python backend- Node.js installed for the frontend
- A SEA-LION API key for the default LLM configuration
For the default Terraform + EC2 path, make sure your AWS account has enough EC2 GPU quota and regional capacity for the G-series instances you plan to launch.
SEA-LION API key guide: https://docs.sea-lion.ai/guides/inferencing/api
This is the primary supported path in the repo today. It deploys the ASR and TTS model servers on EC2, then connects your local backend and frontend to those model endpoints.
For more detail, see the Terraform models-only guide.
From the repository root:
cd iac/terraform/models-only/networking
terraform init
terraform apply -var-file="../common.tfvars"
cd ../compute
terraform init
terraform apply -var-file="../common.tfvars" -var-file="terraform.tfvars"After the apply completes, print the backend environment values:
../scripts/print_model_env.shThat command prints values such as QWEN3_ASR_BASE_URL and
QWEN3_TTS_BASE_URL that you will paste into backend/.env.
Create the backend environment file:
cd backend
cp .env.example .envThen edit backend/.env and set:
SEALION_API_KEY=your_api_key_here
QWEN3_ASR_BASE_URL=http://your-asr-host:8091
QWEN3_TTS_BASE_URL=http://your-tts-host:8092Install dependencies and start the backend:
uv sync
uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000The backend will be available at http://localhost:8000.
Open a new terminal and create the frontend environment file:
cd frontend/client
cp .env.example .envMake sure frontend/client/.env contains:
BACKEND_BASE_URL=http://localhost:8000Then install dependencies and start the frontend:
npm install
npm run devThe frontend will usually be available at http://localhost:3000.
The alternative CloudFormation + SageMaker path is still experimental. It is intended for the same local backend/frontend workflow, but it should not be treated as the default path yet.
If you want to explore it, see the CloudFormation models-only guide.
When building images for AWS, you may need --platform linux/amd64 so the
resulting images match the deployment environment.