{"id":25426731,"url":"https://github.com/suryask007/rag-with-tts","last_synced_at":"2026-04-20T03:03:30.339Z","repository":{"id":277833212,"uuid":"933581236","full_name":"suryask007/RAG-with-TTS","owner":"suryask007","description":"AI-Powered Q\u0026A with File Upload","archived":false,"fork":false,"pushed_at":"2025-02-16T12:54:19.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T05:23:27.260Z","etag":null,"topics":["fastapi","python","rag-chatbot","streamlit","text-to-speech"],"latest_commit_sha":null,"homepage":"","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/suryask007.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,"zenodo":null}},"created_at":"2025-02-16T10:14:02.000Z","updated_at":"2025-02-16T13:00:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"41bddc20-51ce-4434-9256-d07f018087bf","html_url":"https://github.com/suryask007/RAG-with-TTS","commit_stats":null,"previous_names":["suryask007/rag-with-tts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/suryask007/RAG-with-TTS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suryask007%2FRAG-with-TTS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suryask007%2FRAG-with-TTS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suryask007%2FRAG-with-TTS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suryask007%2FRAG-with-TTS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suryask007","download_url":"https://codeload.github.com/suryask007/RAG-with-TTS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suryask007%2FRAG-with-TTS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32031070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["fastapi","python","rag-chatbot","streamlit","text-to-speech"],"created_at":"2025-02-17T00:21:34.802Z","updated_at":"2026-04-20T03:03:30.327Z","avatar_url":"https://github.com/suryask007.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## **AI-Powered Q\u0026A with File Upload**\n\n## **📌 Description**\n\nThe AI-Powered Q\u0026A with File Upload is an advanced Streamlit-based web application that allows users to upload PDF files, ask questions related to the content, and receive answers in both text and audio formats. This system leverages FastAPI for backend processing and a Text-to-Speech (TTS) module for audio responses. It provides an interactive and efficient way to extract and interpret information from documents.\n\n---\n\n## **🚀 Features**\n\n✅ **Upload PDF Files** – Users can upload multiple PDFs for processing.\n\n✅ **File Processing via FastAPI** – The backend extracts information from PDFs.\n\n✅ **AI-Powered Q\u0026A** – Users can ask questions based on the uploaded PDFs, and the system returns answers.\n\n✅ **Text-to-Speech (TTS) Support** – Converts the answer into audio format for playback.\n\n---\n\n## **🔧 Prerequisites**\n\nEnsure you have the following installed:\n\n- **Python 3.8+**\n- **pip** (Python package manager)\n\n---\n\n## **📥 Installation**\n\nClone the repository:\n\n```bash\ngit clone https://github.com/suryask007/RAG-with-TTS.git\ncd RAG-with-TTS\n```\n\nInstall the required dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n---\n\n## **▶️ Running the Application**\n\nRun the `root.py` script, which starts both **FastAPI and Streamlit**:\n\n```bash\npython root.py\n```\n\n---\n\n## **🛠️ Usage**\n\n1️⃣ **Upload PDFs** – Click on the upload button and select PDF files.\n\n2️⃣ **Process Files** – The app sends the files to FastAPI for processing.\n\n3️⃣ **Ask a Question** – Enter a question related to the uploaded files.\n\n4️⃣ **Get Text Answer** – The model will return an answer based on the PDFs.\n\n5️⃣ **Generate Audio Answer** – Click on \"Get Audio Answer\" to listen to the response.\n\n---\n\n## **🔗 API Endpoints**\n\n- **`POST /file_upload`** → Uploads and processes PDFs.\n- **`POST /model`** → Takes a question and returns an answer.\n- **`GET /audio`** → Converts the text answer to an audio response.\n\n---\n\n## **⚠️ Troubleshooting**\n\n⚡ **App restarts on button clicks** – This is due to Streamlit's rerun behavior. The app uses `st.session_state` to prevent reprocessing on every button click.\n\n⚡ **FastAPI Not Running** – Ensure FastAPI is running before launching Streamlit.\n\n⚡ **Audio Not Playing** – If `pydub` fails, download the file manually from the UI.\n\n---\n\n## **👨‍💻 Contributors**\n\n- **Surya K** (surya.tvm.apm@gmail.com)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuryask007%2Frag-with-tts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuryask007%2Frag-with-tts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuryask007%2Frag-with-tts/lists"}