{"id":26090525,"url":"https://github.com/rohanprichard/fastrtc-demo","last_synced_at":"2026-04-17T13:06:30.527Z","repository":{"id":280795538,"uuid":"943183357","full_name":"rohanprichard/fastrtc-demo","owner":"rohanprichard","description":"A simple POC of FastRTC, a framework to use voice mode in python!","archived":false,"fork":false,"pushed_at":"2025-04-02T09:48:53.000Z","size":92,"stargazers_count":24,"open_issues_count":2,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T10:37:22.251Z","etag":null,"topics":["conversational-ai","fastapi","fastrtc","generative-ai","huggingface","multimodal","voice-activity-detection","voice-assistant"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rohanprichard.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":"2025-03-05T09:50:21.000Z","updated_at":"2025-04-02T09:48:57.000Z","dependencies_parsed_at":"2025-04-02T10:30:56.805Z","dependency_job_id":"2cae642d-0edd-492d-acad-b8a3db29aa17","html_url":"https://github.com/rohanprichard/fastrtc-demo","commit_stats":null,"previous_names":["rohanprichard/fastrtc-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rohanprichard/fastrtc-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohanprichard%2Ffastrtc-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohanprichard%2Ffastrtc-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohanprichard%2Ffastrtc-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohanprichard%2Ffastrtc-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rohanprichard","download_url":"https://codeload.github.com/rohanprichard/fastrtc-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohanprichard%2Ffastrtc-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31930130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T12:37:54.787Z","status":"ssl_error","status_checked_at":"2026-04-17T12:37:25.095Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["conversational-ai","fastapi","fastrtc","generative-ai","huggingface","multimodal","voice-activity-detection","voice-assistant"],"created_at":"2025-03-09T09:34:28.372Z","updated_at":"2026-04-17T13:06:30.522Z","avatar_url":"https://github.com/rohanprichard.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastRTC POC\nA simple POC for a fast real-time voice chat application using FastAPI and FastRTC by [rohanprichard](https://github.com/rohanprichard). I wanted to make one as an example with more production-ready languages, rather than just Gradio.\n\n\n## Setup\n1. Set your OpenAI and ElevenLabs API key in an `.env` file based on the `.env.example` file\n2. Create a virtual environment and install the dependencies\n    ```bash\n    python3 -m venv env\n    source env/bin/activate\n    pip install -r requirements.txt\n    ```\n\n    For windows, \n    ```bash\n    python -m venv env\n    .\\env\\Scripts\\activate\n    pip install -r requirements.txt\n    ```\n\n\n3. Run the server\n    ```bash\n    ./run.sh\n    ```\n    Windows: \n    ```bash\n    uvicorn backend.server:app --host 0.0.0.0 --port 8000\n    ```\n\n4. Navigate into the frontend directory\n    ```bash\n    cd frontend/fastrtc-demo\n    ```\n    \n5. Run the frontend\n    ```bash\n    npm install\n    npm run dev\n    ```\n6. Click the microphone icon and start chatting!\n\n7. Reset chats by clicking the trash button on the bottom right\n\n## Notes\n- The STT is currently using the ElevenLabs API.\n- The LLM is currently using the OpenAI API.\n- The TTS is currently using the ElevenLabs API.\n- The VAD is currently using the Silero VAD model.\n- You may need to install ffmpeg if you get errors in STT\n\nThe prompt can be changed in the `backend/server.py` file and modified as you like.\n\n### Audio Parameters \n\n#### AlgoOptions\n\n- **audio_chunk_duration**: Length of audio chunks in seconds. Smaller values allow for faster processing but may be less accurate.\n- **started_talking_threshold**: If a chunk has more than this many seconds of speech, the system considers that the user has started talking.\n- **speech_threshold**: After the user has started speaking, if a chunk has less than this many seconds of speech, the system considers that the user has paused.\n\n#### SileroVadOptions\n\n- **threshold**: Speech probability threshold (0.0-1.0). Values above this are considered speech. Higher values are more strict.\n- **min_speech_duration_ms**: Speech segments shorter than this (in milliseconds) are filtered out.\n- **min_silence_duration_ms**: The system waits for this duration of silence (in milliseconds) before considering speech to be finished.\n- **speech_pad_ms**: Padding added to both ends of detected speech segments to prevent cutting off words.\n- **max_speech_duration_s**: Maximum allowed duration for a speech segment in seconds. Prevents indefinite listening.\n\n### Tuning Recommendations\n\n- If the AI interrupts you too early:\n  - Increase `min_silence_duration_ms`\n  - Increase `speech_threshold`\n  - Increase `speech_pad_ms`\n\n- If the AI is slow to respond after you finish speaking:\n  - Decrease `min_silence_duration_ms`\n  - Decrease `speech_threshold`\n\n- If the system fails to detect some speech:\n  - Lower the `threshold` value\n  - Decrease `started_talking_threshold`\n\n\n## Credits:\nCredit for the UI components goes to Shadcn, Aceternity UI and Kokonut UI.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohanprichard%2Ffastrtc-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohanprichard%2Ffastrtc-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohanprichard%2Ffastrtc-demo/lists"}