{"id":18822467,"url":"https://github.com/moikapy/ai_streamer_cohost","last_synced_at":"2026-01-18T16:30:17.711Z","repository":{"id":246145301,"uuid":"820230388","full_name":"Moikapy/ai_streamer_cohost","owner":"Moikapy","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-26T04:29:55.000Z","size":10,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-30T03:49:09.104Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/Moikapy.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-06-26T04:18:50.000Z","updated_at":"2024-06-26T04:29:58.000Z","dependencies_parsed_at":"2024-06-26T05:44:34.063Z","dependency_job_id":null,"html_url":"https://github.com/Moikapy/ai_streamer_cohost","commit_stats":null,"previous_names":["moikapy/ai_streamer_cohost"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moikapy%2Fai_streamer_cohost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moikapy%2Fai_streamer_cohost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moikapy%2Fai_streamer_cohost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moikapy%2Fai_streamer_cohost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Moikapy","download_url":"https://codeload.github.com/Moikapy/ai_streamer_cohost/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239758901,"owners_count":19692041,"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-11-08T00:49:44.758Z","updated_at":"2026-01-18T16:30:17.644Z","avatar_url":"https://github.com/Moikapy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Co-Host Project\n\nThis project is designed to create an AI co-host that can interact in real-time, capturing screen content, reading text from images, and communicating via WebSocket. The AI co-host is built using Python, LangChain, and FastAPI, and it integrates with Twitch to read chat messages. It also includes conversation memory using SQLite to store and retrieve messages for each session.\n\n## Features\n\n- 2D Avatar (wip)\n- Real-time screen capture (wip)\n- Real-time microphone input (wip)\n- Real-time Twitch chat reading (wip)\n- Communication via WebSocket\n- Conversation memory with SQLite\n\n## Prerequisites\n\n- Python 3.10+\n- Tesseract OCR\n\n## Installation\n\n### Step 1: Clone the Repository\n\n````bash\ngit clone https://github.com/Moikapy/ai_streamer_cohost.git\ncd ai_streamer_cohost\n````\n\n## Step 2: Install Python Dependencies\nCreate a virtual environment and install the required packages:\n\n  ```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\npip install -r requirements.txt\n````\n\nStep 3: Install Tesseract OCR\n\nWindows\nDownload the Tesseract installer from Tesseract at UB Mannheim.\nRun the installer and follow the on-screen instructions.\nAdd the Tesseract installation path (e.g., C:\\Program Files\\Tesseract-OCR) to your system's PATH environment variable.\n\nmacOS\nInstall Tesseract using Homebrew:\n\n```bash\nbrew install tesseract\nLinux\nInstall Tesseract using your package manager. For example, on Debian-based systems like Ubuntu:\n```\n\n```bash\nsudo apt-get update\nsudo apt-get install tesseract-ocr\nStep 4: Verify Tesseract Installation\nOpen a new command prompt or terminal window and run:\n```\n\n```bash\ntesseract --version\nYou should see the version information of Tesseract if it is correctly installed and added to your PATH.\n\nStep 5: Configure Environment Variables\nCreate a .env file in the root of the project and add your OpenAI API key:\n```\n\n```bash\nOPENAI_API_KEY=your_openai_api_key\n```\n## Step 6: Run the Project\nTo start both the FastAPI server and the WebSocket client and monitor them for specific log messages, run:\n\n```bash\npython monitor_and_restart.py\n```\n\n## Project Structure\n\n```bash\n├── app\n│   ├── __init__.py\n│   ├── image_processor.py\n│   ├── langchain_client.py\n│   ├── screen_capture_tool.py\n│   ├── server.py\n├── websocket_client.py\n├── run_servers.py\n├── monitor_and_restart.py\n├── requirements.txt\n├── .env\n└── README.md\n```\n\n## Files Description\n\n- app/image_processor.py: Handles image processing and OCR using Tesseract.\n- app/langchain_client.py: Integrates with LangChain to handle AI responses and streaming, with conversation memory using SQLite.\n- app/screen_capture_tool.py: Captures screen content.\n- app/server.py: FastAPI server to handle WebSocket connections.\n- websocket_client.py: WebSocket client to communicate with the FastAPI server.\n- run_servers.py: Script to start both the FastAPI server and WebSocket client concurrently.\n- monitor_and_restart.py: Script to monitor the server log and restart the server and client if necessary.\n- requirements.txt: List of Python dependencies.\n- .env: Environment variables file to store sensitive data like API keys.\n- README.md: This file.\n\n## Contributing\n\nFeel free to open issues or submit pull requests if you have any improvements or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n```bash\n\n### Additional Notes\n\n- Make sure that Tesseract OCR is properly installed and configured on your system to avoid any issues with image processing.\n- The `.env` file should be created in the root of your project directory with the correct API key.\n\nThis `README.md` provides comprehensive instructions to get your project started and should help new contributors understand how to set up and run the project.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoikapy%2Fai_streamer_cohost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoikapy%2Fai_streamer_cohost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoikapy%2Fai_streamer_cohost/lists"}