{"id":23021234,"url":"https://github.com/ryanleecode/sst-voice-agent-example","last_synced_at":"2025-04-02T18:43:52.621Z","repository":{"id":267907803,"uuid":"902635250","full_name":"ryanleecode/sst-voice-agent-example","owner":"ryanleecode","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-16T07:35:03.000Z","size":90,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T09:26:47.584Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanleecode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-13T00:49:12.000Z","updated_at":"2024-12-16T07:46:13.000Z","dependencies_parsed_at":"2024-12-13T07:21:50.415Z","dependency_job_id":"1c277cb2-732b-4650-97dc-8dc7feb0a5c0","html_url":"https://github.com/ryanleecode/sst-voice-agent-example","commit_stats":null,"previous_names":["ryanleecode/sst-voice-agent-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanleecode%2Fsst-voice-agent-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanleecode%2Fsst-voice-agent-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanleecode%2Fsst-voice-agent-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanleecode%2Fsst-voice-agent-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanleecode","download_url":"https://codeload.github.com/ryanleecode/sst-voice-agent-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246871514,"owners_count":20847495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T12:17:02.282Z","updated_at":"2025-04-02T18:43:52.565Z","avatar_url":"https://github.com/ryanleecode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SST Voice Agent Example\n\nA production-ready example of a Voice Agent that leverages WebRTC through [LiveKit](https://livekit.io/) to enable real-time voice interactions. This project showcases a unique architecture that bridges TypeScript and Python, enabling you to harness the best of both ecosystems.\n\n## Architecture Overview\n\nThe project demonstrates several key technical innovations:\n\n- **Python-TypeScript Bridge**: Uses `pybridge` (built on [Deepkit](https://deepkit.io/)) to seamlessly integrate Python code with a Bun server through reflection\n- **IPC Communication**: Custom Hono server running on an IPC socket to enable bidirectional communication between Python and Bun processes\n- **Vector Operations**: Efficient vector storage operations executed on the Bun side with results passed back to Python\n- **Real-time Voice**: WebRTC-based voice communication powered by LiveKit\n\n## Prerequisites\n\n- [Bun](https://bun.sh/) - JavaScript runtime \u0026 toolkit\n- Python 3.8+ \n- [Node.js](https://nodejs.org/) with [Corepack](https://nodejs.org/api/corepack.html)\n\n## Setup\n\n1. **Environment Setup**\n\nCreate a `.env` file with the following variables:\n\n```sh\n# Database Configuration\nDATABASE_URL=          # Postgres connection string (local or Neon)\n\n# API Keys\nDEEPGRAM_API_KEY=     # For speech-to-text\nOPENAI_API_KEY=       # For AI processing\nLIVEKIT_API_KEY=      # For WebRTC\nLIVEKIT_API_SECRET=   # For WebRTC\nLIVEKIT_URL=          # Your LiveKit server URL\n\n# Optional Configuration\nLOG_LEVEL=DEBUG       # Logging verbosity\n```\n\n2. **Python Environment**\n\n```sh\npython -m venv .venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\npip install -r apps/voice-agent/requirements.txt\n```\n\n3. **Node Dependencies**\n\n```sh\ncorepack pnpm install\n```\n\n4. **Start Development Server**\n\n```sh\ncd apps/voice-agent\npnpm dev\n```\n\n## Testing Your Agent\n\n1. Visit [LiveKit Agents Playground](https://agents-playground.livekit.io/)\n2. Connect to your running agent\n3. Start interacting through voice!\n\n## Customization\n\n### Basic Customization\n\n1. Modify `apps/voice-agent/main.py` to adjust agent behavior\n2. Update vector database embeddings for different knowledge domains\n\n### Advanced Customization\n\n- Extend the Python-TypeScript bridge in `packages/pybridge`\n- Modify vector storage operations in `packages/llama-index-storage`\n- Customize the Hono server in `packages/vector-storage-hono`\n\n## Infrastructure Options\n\n### Database\n\nYou have two options for the PostgreSQL database:\n\n1. **Local Development**: Run PostgreSQL in Docker\n2. **Cloud Hosted**: Use [Neon Database](https://neon.tech/) for serverless PostgreSQL\n\n### Required Services\n\n- [Deepgram](https://deepgram.com/) - Speech-to-text API\n- [OpenAI](https://platform.openai.com/) - AI processing\n- [LiveKit Cloud](https://cloud.livekit.io/) - WebRTC infrastructure\n\n## Deployment\n\n### AWS Setup\n\n1. Configure your AWS credentials:\n```sh\naws configure\n```\n\n2. Install [Doppler](https://www.doppler.com/) for secrets management and set up your project:\n```sh\n# Set up Doppler project\ndoppler setup\n```\n\n3. Deploy to production:\n```sh\ndoppler run -- npx sst deploy --stage=production\n```\n\nTo remove the deployment:\n```sh\nnpx sst remove --stage=production\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanleecode%2Fsst-voice-agent-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanleecode%2Fsst-voice-agent-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanleecode%2Fsst-voice-agent-example/lists"}