[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9803":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":18,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":24,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},9803,"fastrtc","gradio-app\u002Ffastrtc","gradio-app","The python library for real-time communication","https:\u002F\u002Ffastrtc.org\u002F",null,"JavaScript",4604,435,37,64,0,3,12,23,74.22,"MIT License",false,"main",true,[26,27,28,29,30,31,32,33],"artificial-intelligence","hacktoberfest","hacktoberfest2025","llm","python","real-time","speech-to-text","text-to-speech","2026-06-12 04:00:46","\u003Cdiv style='text-align: center; margin-bottom: 1rem; display: flex; justify-content: center; align-items: center;'>\n    \u003Ch1 style='color: white; margin: 0;'>FastRTC\u003C\u002Fh1>\n    \u003Cimg src='https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Ffreddyaboulton\u002Fbucket\u002Fresolve\u002Fmain\u002Ffastrtc_logo_small.png'\n         alt=\"FastRTC Logo\" \n         style=\"margin-right: 10px;\">\n\u003C\u002Fdiv>\n\n\u003Cdiv style=\"display: flex; flex-direction: row; justify-content: center\">\n\u003Cimg style=\"display: block; padding-right: 5px; height: 20px;\" alt=\"Static Badge\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Ffastrtc\"> \n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fgradio-app\u002Ffastrtc\" target=\"_blank\">\u003Cimg alt=\"Static Badge\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fgithub-white?logo=github&logoColor=black\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\u003Ch3 style='text-align: center'>\nThe Real-Time Communication Library for Python. \n\u003C\u002Fh3>\n\nTurn any python function into a real-time audio and video stream over WebRTC or WebSockets.\n\n## Installation\n\n```bash\npip install fastrtc\n```\n\nto use built-in pause detection (see [ReplyOnPause](https:\u002F\u002Ffastrtc.org\u002Fuserguide\u002Faudio\u002F#reply-on-pause)), and text to speech (see [Text To Speech](https:\u002F\u002Ffastrtc.org\u002Fuserguide\u002Faudio\u002F#text-to-speech)), install the `vad` and `tts` extras:\n\n```bash\npip install \"fastrtc[vad, tts]\"\n```\n\n## Key Features\n\n- 🗣️ Automatic Voice Detection and Turn Taking built-in, only worry about the logic for responding to the user.\n- 💻 Automatic UI - Use the `.ui.launch()` method to launch the webRTC-enabled built-in Gradio UI.\n- 🔌 Automatic WebRTC Support - Use the `.mount(app)` method to mount the stream on a FastAPI app and get a webRTC endpoint for your own frontend! \n- ⚡️ Websocket Support - Use the `.mount(app)` method to mount the stream on a FastAPI app and get a websocket endpoint for your own frontend! \n- 📞 Automatic Telephone Support - Use the `fastphone()` method of the stream to launch the application and get a free temporary phone number!\n- 🤖 Completely customizable backend - A `Stream` can easily be mounted on a FastAPI app so you can easily extend it to fit your production application. See the [Talk To Claude](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Ftalk-to-claude) demo for an example of how to serve a custom JS frontend.\n\n## Docs\n\n[https:\u002F\u002Ffastrtc.org](https:\u002F\u002Ffastrtc.org)\n\n## Examples\nSee the [Cookbook](https:\u002F\u002Ffastrtc.org\u002Fcookbook\u002F) for examples of how to use the library.\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd width=\"50%\">\n\u003Ch3>🗣️👀 Gemini Audio Video Chat\u003C\u002Fh3>\n\u003Cp>Stream BOTH your webcam video and audio feeds to Google Gemini. You can also upload images to augment your conversation!\u003C\u002Fp>\n\u003Cvideo width=\"100%\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F9636dc97-4fee-46bb-abb8-b92e69c08c71\" controls>\u003C\u002Fvideo>\n\u003Cp>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffreddyaboulton\u002Fgemini-audio-video-chat\">Demo\u003C\u002Fa> |\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffreddyaboulton\u002Fgemini-audio-video-chat\u002Fblob\u002Fmain\u002Fapp.py\">Code\u003C\u002Fa>\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\n\u003Ch3>🗣️ Google Gemini Real Time Voice API\u003C\u002Fh3>\n\u003Cp>Talk to Gemini in real time using Google's voice API.\u003C\u002Fp>\n\u003Cvideo width=\"100%\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fea6d18cb-8589-422b-9bba-56332d9f61de\" controls>\u003C\u002Fvideo>\n\u003Cp>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Ftalk-to-gemini\">Demo\u003C\u002Fa> |\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Ftalk-to-gemini\u002Fblob\u002Fmain\u002Fapp.py\">Code\u003C\u002Fa>\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\n\u003Ctr>\n\u003Ctd width=\"50%\">\n\u003Ch3>🗣️ OpenAI Real Time Voice API\u003C\u002Fh3>\n\u003Cp>Talk to ChatGPT in real time using OpenAI's voice API.\u003C\u002Fp>\n\u003Cvideo width=\"100%\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F178bdadc-f17b-461a-8d26-e915c632ff80\" controls>\u003C\u002Fvideo>\n\u003Cp>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Ftalk-to-openai\">Demo\u003C\u002Fa> |\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Ftalk-to-openai\u002Fblob\u002Fmain\u002Fapp.py\">Code\u003C\u002Fa>\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\n\u003Ch3>🤖 Hello Computer\u003C\u002Fh3>\n\u003Cp>Say computer before asking your question!\u003C\u002Fp>\n\u003Cvideo width=\"100%\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fafb2a3ef-c1ab-4cfb-872d-578f895a10d5\" controls>\u003C\u002Fvideo>\n\u003Cp>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Fhello-computer\">Demo\u003C\u002Fa> |\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Fhello-computer\u002Fblob\u002Fmain\u002Fapp.py\">Code\u003C\u002Fa>\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\n\u003Ctr>\n\u003Ctd width=\"50%\">\n\u003Ch3>🤖 Llama Code Editor\u003C\u002Fh3>\n\u003Cp>Create and edit HTML pages with just your voice! Powered by SambaNova systems.\u003C\u002Fp>\n\u003Cvideo width=\"100%\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F98523cf3-dac8-4127-9649-d91a997e3ef5\" controls>\u003C\u002Fvideo>\n\u003Cp>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Fllama-code-editor\">Demo\u003C\u002Fa> |\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Fllama-code-editor\u002Fblob\u002Fmain\u002Fapp.py\">Code\u003C\u002Fa>\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\n\u003Ch3>🗣️ Talk to Claude\u003C\u002Fh3>\n\u003Cp>Use the Anthropic and Play.Ht APIs to have an audio conversation with Claude.\u003C\u002Fp>\n\u003Cvideo width=\"100%\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Ffb6ef07f-3ccd-444a-997b-9bc9bdc035d3\" controls>\u003C\u002Fvideo>\n\u003Cp>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Ftalk-to-claude\">Demo\u003C\u002Fa> |\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Ftalk-to-claude\u002Fblob\u002Fmain\u002Fapp.py\">Code\u003C\u002Fa>\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\n\u003Ctr>\n\u003Ctd width=\"50%\">\n\u003Ch3>🎵 Whisper Transcription\u003C\u002Fh3>\n\u003Cp>Have whisper transcribe your speech in real time!\u003C\u002Fp>\n\u003Cvideo width=\"100%\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F87603053-acdc-4c8a-810f-f618c49caafb\" controls>\u003C\u002Fvideo>\n\u003Cp>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Fwhisper-realtime\">Demo\u003C\u002Fa> |\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Fwhisper-realtime\u002Fblob\u002Fmain\u002Fapp.py\">Code\u003C\u002Fa>\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\n\u003Ch3>📷 Yolov10 Object Detection\u003C\u002Fh3>\n\u003Cp>Run the Yolov10 model on a user webcam stream in real time!\u003C\u002Fp>\n\u003Cvideo width=\"100%\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Ff82feb74-a071-4e81-9110-a01989447ceb\" controls>\u003C\u002Fvideo>\n\u003Cp>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Fobject-detection\">Demo\u003C\u002Fa> |\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Fobject-detection\u002Fblob\u002Fmain\u002Fapp.py\">Code\u003C\u002Fa>\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\n\u003Ctr>\n\u003Ctd width=\"50%\">\n\u003Ch3>🗣️ Kyutai Moshi\u003C\u002Fh3>\n\u003Cp>Kyutai's moshi is a novel speech-to-speech model for modeling human conversations.\u003C\u002Fp>\n\u003Cvideo width=\"100%\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fbecc7a13-9e89-4a19-9df2-5fb1467a0137\" controls>\u003C\u002Fvideo>\n\u003Cp>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffreddyaboulton\u002Ftalk-to-moshi\">Demo\u003C\u002Fa> |\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffreddyaboulton\u002Ftalk-to-moshi\u002Fblob\u002Fmain\u002Fapp.py\">Code\u003C\u002Fa>\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\n\u003Ch3>🗣️ Hello Llama: Stop Word Detection\u003C\u002Fh3>\n\u003Cp>A code editor built with Llama 3.3 70b that is triggered by the phrase \"Hello Llama\". Build a Siri-like coding assistant in 100 lines of code!\u003C\u002Fp>\n\u003Cvideo width=\"100%\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F3e10cb15-ff1b-4b17-b141-ff0ad852e613\" controls>\u003C\u002Fvideo>\n\u003Cp>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffreddyaboulton\u002Fhey-llama-code-editor\">Demo\u003C\u002Fa> |\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffreddyaboulton\u002Fhey-llama-code-editor\u002Fblob\u002Fmain\u002Fapp.py\">Code\u003C\u002Fa>\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n## Usage\n\nThis is a shortened version of the official [usage guide](https:\u002F\u002Ffreddyaboulton.github.io\u002Fgradio-webrtc\u002Fuser-guide\u002F). \n\n- `.ui.launch()`: Launch a built-in UI for easily testing and sharing your stream. Built with [Gradio](https:\u002F\u002Fwww.gradio.app\u002F).\n- `.fastphone()`: Get a free temporary phone number to call into your stream. Hugging Face token required.\n- `.mount(app)`: Mount the stream on a [FastAPI](https:\u002F\u002Ffastapi.tiangolo.com\u002F) app. Perfect for integrating with your already existing production system.\n\n\n## Quickstart\n\n### Echo Audio\n\n```python\nfrom fastrtc import Stream, ReplyOnPause\nimport numpy as np\n\ndef echo(audio: tuple[int, np.ndarray]):\n    # The function will be passed the audio until the user pauses\n    # Implement any iterator that yields audio\n    # See \"LLM Voice Chat\" for a more complete example\n    yield audio\n\nstream = Stream(\n    handler=ReplyOnPause(echo),\n    modality=\"audio\", \n    mode=\"send-receive\",\n)\n```\n\n### LLM Voice Chat\n\n```py\nfrom fastrtc import (\n    ReplyOnPause, AdditionalOutputs, Stream,\n    audio_to_bytes, aggregate_bytes_to_16bit\n)\nimport gradio as gr\nfrom groq import Groq\nimport anthropic\nfrom elevenlabs import ElevenLabs\n\ngroq_client = Groq()\nclaude_client = anthropic.Anthropic()\ntts_client = ElevenLabs()\n\n\n# See \"Talk to Claude\" in Cookbook for an example of how to keep \n# track of the chat history.\ndef response(\n    audio: tuple[int, np.ndarray],\n):\n    prompt = groq_client.audio.transcriptions.create(\n        file=(\"audio-file.mp3\", audio_to_bytes(audio)),\n        model=\"whisper-large-v3-turbo\",\n        response_format=\"verbose_json\",\n    ).text\n    response = claude_client.messages.create(\n        model=\"claude-3-5-haiku-20241022\",\n        max_tokens=512,\n        messages=[{\"role\": \"user\", \"content\": prompt}],\n    )\n    response_text = \" \".join(\n        block.text\n        for block in response.content\n        if getattr(block, \"type\", None) == \"text\"\n    )\n    iterator = tts_client.text_to_speech.convert_as_stream(\n        text=response_text,\n        voice_id=\"JBFqnCBsd6RMkjVDRZzb\",\n        model_id=\"eleven_multilingual_v2\",\n        output_format=\"pcm_24000\"\n        \n    )\n    for chunk in aggregate_bytes_to_16bit(iterator):\n        audio_array = np.frombuffer(chunk, dtype=np.int16).reshape(1, -1)\n        yield (24000, audio_array)\n\nstream = Stream(\n    modality=\"audio\",\n    mode=\"send-receive\",\n    handler=ReplyOnPause(response),\n)\n```\n\n### Webcam Stream\n\n```python\nfrom fastrtc import Stream\nimport numpy as np\n\n\ndef flip_vertically(image):\n    return np.flip(image, axis=0)\n\n\nstream = Stream(\n    handler=flip_vertically,\n    modality=\"video\",\n    mode=\"send-receive\",\n)\n```\n\n### Object Detection\n\n```python\nfrom fastrtc import Stream\nimport gradio as gr\nimport cv2\nfrom huggingface_hub import hf_hub_download\nfrom .inference import YOLOv10\n\nmodel_file = hf_hub_download(\n    repo_id=\"onnx-community\u002Fyolov10n\", filename=\"onnx\u002Fmodel.onnx\"\n)\n\n# git clone https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffastrtc\u002Fobject-detection\n# for YOLOv10 implementation\nmodel = YOLOv10(model_file)\n\ndef detection(image, conf_threshold=0.3):\n    image = cv2.resize(image, (model.input_width, model.input_height))\n    new_image = model.detect_objects(image, conf_threshold)\n    return cv2.resize(new_image, (500, 500))\n\nstream = Stream(\n    handler=detection,\n    modality=\"video\", \n    mode=\"send-receive\",\n    additional_inputs=[\n        gr.Slider(minimum=0, maximum=1, step=0.01, value=0.3)\n    ]\n)\n```\n\n## Running the Stream\n\nRun:\n\n### Gradio\n\n```py\nstream.ui.launch()\n```\n\n### Telephone (Audio Only)\n\n    ```py\n    stream.fastphone()\n    ```\n\n### FastAPI\n\n```py\napp = FastAPI()\nstream.mount(app)\n\n# Optional: Add routes\n@app.get(\"\u002F\")\nasync def _():\n    return HTMLResponse(content=open(\"index.html\").read())\n\n# uvicorn app:app --host 0.0.0.0 --port 8000\n```\n","FastRTC 是一个用于实现实时通信的 Python 库。它支持将任何 Python 函数转换为通过 WebRTC 或 WebSocket 传输的实时音频和视频流，具备自动语音检测、自动用户界面生成以及电话支持等功能。FastRTC 的核心特点包括内置的语音检测与轮次管理、一键启动 Gradio UI 和 FastAPI 集成等，极大简化了开发者的集成工作。此外，该库还提供了高度可定制的后端接口，便于开发者根据具体需求进行扩展。FastRTC 适用于需要快速搭建实时音视频交互应用的场景，如在线客服系统、远程教育平台或虚拟助手等。",2,"2026-06-11 03:24:49","top_topic"]