{"id":24653773,"url":"https://github.com/mfenerich/speechflow","last_synced_at":"2026-05-16T21:34:08.653Z","repository":{"id":272594361,"uuid":"917093703","full_name":"mfenerich/SpeechFlow","owner":"mfenerich","description":"SpeechFlow: Modular real-time audio transcription and conversational AI with support for pluggable services like Google Speech-to-Text and OpenAI's ChatGPT.","archived":false,"fork":false,"pushed_at":"2025-02-26T16:50:22.000Z","size":2686,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T17:40:48.609Z","etag":null,"topics":["ai","chatbot","chatgpt","cloud-computing","python"],"latest_commit_sha":null,"homepage":"https://feneri.ch","language":"Python","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/mfenerich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-01-15T10:44:51.000Z","updated_at":"2025-02-26T16:50:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"825ff4ca-23f9-41fa-ba8b-7047a1a0aa7f","html_url":"https://github.com/mfenerich/SpeechFlow","commit_stats":null,"previous_names":["mfenerich/speechflow"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfenerich%2FSpeechFlow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfenerich%2FSpeechFlow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfenerich%2FSpeechFlow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfenerich%2FSpeechFlow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfenerich","download_url":"https://codeload.github.com/mfenerich/SpeechFlow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717347,"owners_count":20498283,"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":["ai","chatbot","chatgpt","cloud-computing","python"],"created_at":"2025-01-25T21:13:59.482Z","updated_at":"2026-05-16T21:34:03.618Z","avatar_url":"https://github.com/mfenerich.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpeechFlow\n\nSpeechFlow is a modular and extensible application for real-time audio transcription and intelligent conversational responses. It leverages transcription services and conversational AI models provided by the `thinkhub` library to provide a seamless experience for speech processing and natural language understanding.\n\n## Features\n\n- **Real-Time Audio Capture**: Record and process audio in real-time.\n- **Out-of-the-Box Transcription Services**:\n  - **OpenAI**: Using the `whisper-1` model.\n  - **Google Speech-to-Text**\n- **Out-of-the-Box Chat Services**:\n  - **OpenAI**: Supporting models like `gpt-4` and `gpt-3.5`.\n  - **Anthropic**: Supporting `Claude.ai`.\n- **Extensible Design**: Use the Strategy Pattern to easily add new transcription and chat services.\n- **Configuration-Driven**: Control services and settings dynamically using `.env` files.\n- **Interactive UI**: Built with [Textual](https://textual.textualize.io/) for a rich terminal-based user interface.\n\n### **Image Processing**\n- **OpenAI**: Analyze and process images with AI models (not used in this project).\n\nLearn more about the `thinkhub` library at [https://github.com/mfenerich/thinkhub](https://github.com/mfenerich/thinkhub).\n\n---\n\n## Installation\n\n### Prerequisites\n- Python 3.11+\n- [Poetry](https://python-poetry.org/)\n\n### Clone the Repository\n```bash\ngit clone https://github.com/mfenerich/SpeechFlow.git\ncd speechflow\n```\n\n### Install Dependencies\nUse Poetry to install project dependencies:\n```bash\npoetry install\n```\n\n### Set Up Environment Variables\nCreate a `.env` file in the root directory with the following content:\n\n```env\n# Transcription service\nTRANSCRIPTION_SERVICE=openai or google\n\n# Chat service\nCHAT_SERVICE=openai or anthropic\n\n# OpenAI settings\nCHATGPT_API_KEY=your_openai_api_key\nCHAT_MODEL=gpt-4o or claude-3-5-sonnet-20240620 (or any other model you have access to)\n\n# Google\nGOOGLE_APPLICATION_CREDENTIALS=your_gcp_json_path\n```\n\nProvide appropriate values for each variable.\n\n### Verify Environment\nMake sure the `.env` file is listed in `.gitignore` to avoid accidentally committing sensitive data.\n\n---\n\n## Usage\n\n### Run the Application\nStart the SpeechFlow application:\n```bash\npoetry run python app.py\n```\n\n### Interact with the Application\n- Select an audio input device.\n- Press **`K`** to start recording and **`K`** again to stop.\n- Press **`Q`** to quit the application.\n\n### Change Transcription or Chat Services\nTo use a different transcription or chat service, update the `TRANSCRIPTION_SERVICE` and `CHAT_SERVICE` variables in the `.env` file. Restart the application to apply the changes.\n\n---\n\n## Project Structure\n\n```plaintext\nspeechflow/\n├── core/                              # Core utilities and constants\n│   ├── constants.py                   # Shared constants (e.g., sample rate)\n│   ├── audio_handler.py               # Audio capture and processing\n│   └── interface.py                   # UI components\n├── app.py                             # Main application entry point\n├── .env                               # Environment variables (ignored by Git)\n├── .env.example                       # Example environment variables\n├── README.md                          # Project documentation\n├── poetry.lock                        # Poetry lock file\n├── pyproject.toml                     # Poetry project configuration\n└── tests/                             # Unit tests\n```\n\n---\n\n## Extending SpeechFlow\n\nSpeechFlow is designed to be modular and extensible. You can easily add new transcription or chat services by utilizing the `thinkhub` library.\n\nLearn more about extending services in the [thinkhub repository](https://github.com/mfenerich/thinkhub).\n\n---\n\n## Testing\n\nTODO\n\n---\n\n## Workflow Diagram\n\n```mermaid\ngraph TD\n    A[User] --\u003e|Interacts via UI| B[AudioTranscriptionApp]\n    B --\u003e|Captures Audio| C[AudioHandler]\n    C --\u003e|Sends Audio Chunks| D[TranscriptionService]\n    D --\u003e|Transcribes Audio| E[Transcription API - Google or other service]\n    E --\u003e|Returns Transcription| D\n    D --\u003e|Sends Transcription| F[ChatService]\n    F --\u003e|Queries Chat API| G[Chat API - OpenAI GPT]\n    G --\u003e|Returns Response| F\n    F --\u003e|Sends Response| B\n    B --\u003e|Displays Response| H[User Interface]\n```\n\n---\n\n## Contributing\n\nContributions are welcome! Please follow these steps:\n1. Fork the repository.\n2. Create a new branch: `git checkout -b feature-name`.\n3. Commit your changes: `git commit -m \"Add feature-name\"`.\n4. Push to the branch: `git push origin feature-name`.\n5. Open a pull request.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\n## Acknowledgments\n- [Textual](https://textual.textualize.io/) for the interactive UI framework.\n- [thinkhub](https://github.com/mfenerich/thinkhub) for providing transcription and chat services.\n- [Google Cloud Speech-to-Text](https://cloud.google.com/speech-to-text) for transcription services.\n- [OpenAI](https://openai.com/) for conversational AI.\n\n---\n\n## Contact\nFor questions or support, please contact `marcel@feneri.ch` or open an issue in the repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfenerich%2Fspeechflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfenerich%2Fspeechflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfenerich%2Fspeechflow/lists"}