{"id":30368509,"url":"https://github.com/sarthak576/internsbyte","last_synced_at":"2025-08-20T01:34:33.743Z","repository":{"id":308837424,"uuid":"1028181967","full_name":"sarthak576/InternsByte","owner":"sarthak576","description":"YouTube Video Link -","archived":false,"fork":false,"pushed_at":"2025-08-08T06:33:21.000Z","size":299,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-08T08:20:23.289Z","etag":null,"topics":["chatbot-application","openai-api","realistic","transcription","whisper-api"],"latest_commit_sha":null,"homepage":"https://youtu.be/4y1a4syMJHM?si=8TMlX0g8loZ3M428","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/sarthak576.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-07-29T06:38:37.000Z","updated_at":"2025-08-08T06:33:24.000Z","dependencies_parsed_at":"2025-08-08T08:20:32.059Z","dependency_job_id":"ac60d459-3705-4f2a-a070-e19384d29c20","html_url":"https://github.com/sarthak576/InternsByte","commit_stats":null,"previous_names":["sarthak576/internsbyte"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sarthak576/InternsByte","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarthak576%2FInternsByte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarthak576%2FInternsByte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarthak576%2FInternsByte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarthak576%2FInternsByte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sarthak576","download_url":"https://codeload.github.com/sarthak576/InternsByte/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarthak576%2FInternsByte/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271252561,"owners_count":24726913,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"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":["chatbot-application","openai-api","realistic","transcription","whisper-api"],"created_at":"2025-08-20T01:34:33.090Z","updated_at":"2025-08-20T01:34:33.737Z","avatar_url":"https://github.com/sarthak576.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Banner --\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/sarthak576/InternsByte/blob/main/All%20documentation/images/demo.png\" alt=\"Demo Banner\" width=\"80%\"\u003e\n\u003c/p\u003e\n\n# 📚 Developer Notes – OpenAI, Whisper AI \u0026 More  \n\n\u003e 🚀 **Future-Proof \u0026 Clickable** – This doc is structured for quick navigation, visual clarity, and easy updates.\n\n---\n\n## 📑 Table of Contents\n1. [🔑 OpenAI API Key Usage](#-1-openai-api-key-usage)\n2. [🎙️ Whisper AI – Speech to Text](#-2-whisper-ai--speech-to-text)\n3. [📦 Why Install `multipart`](#-3-why-install-multipart)\n4. [🆕 Using Latest OpenAI Version](#-4-using-latest-openai-version)\n5. [⚡ Quick Reference Table](#-quick-reference-table)\n\n---\n\n## 🔑 1. OpenAI API Key Usage  \n\n![Badge](https://img.shields.io/badge/Status-Important-red)  \n### ✅ 5 Key Points – Using `os.getenv(\"OPEN_AI_API_KEY\")` for API Key:\n\n1. **`os.getenv()` Reads Env Vars** – Fetches `OPEN_AI_API_KEY` from environment variables.\n2. **Must Export It 🔐** – Before running:\n   ```bash\n   export OPEN_AI_API_KEY=\"your_api_key\"\n\n\n\n   ## 🎙️ 2. Whisper AI – Speech to Text  \n\n![Badge](https://img.shields.io/badge/Model-Whisper_AI-blue)  \n### ✅ 5 Key Points – Using Whisper AI with ChatGPT/OpenAI:\n\n1. **What is Whisper? 🎙️** – OpenAI’s automatic speech recognition (ASR) model for converting audio to text.\n2. **Usage in Code 💻**:\n   ```python\n   import openai\n\n   openai.api_key = \"your_api_key\"\n\n   audio_file = open(\"your_audio.mp3\", \"rb\")\n   transcript = openai.Audio.transcribe(\"whisper-1\", audio_file)\n\n   print(transcript[\"text\"])\n\n## 📦 3. Why Install `multipart`?  \n\n![Badge](https://img.shields.io/badge/Package-python--multipart-green)  \n### ✅ 2 Key Points – `pip install multipart`:\n\n1. **Purpose** – Parses `multipart/form-data` for handling file uploads in FastAPI and similar frameworks.\n2. **Example**:\n   ```python\n   from fastapi import FastAPI, File, UploadFile\n\n   app = FastAPI()\n\n   @app.post(\"/upload/\")\n   async def upload(file: UploadFile = File(...)):\n       return {\"filename\": file.filename}\n\n   \n## 🆕 4. Using Latest OpenAI Version  \n\n![Badge](https://img.shields.io/badge/OpenAI-Version_1+-purple)  \n### ✅ 5 Key Points – Updating to Latest OpenAI SDK:\n\n1. **API Key Change 🔑** – Old: `openai.apikey` ❌ → New: `OpenAI(api_key=...)` ✅\n2. **File Handling 📂** – Files are temporarily saved before being sent to the API.\n3. **Method Update 🛠️** – Old: `transcribe()` ❌ → New: `client.audio.transcriptions.create(...)` ✅\n4. **FastAPI Integration ⚡** – `UploadFile = File(...)` ensures proper `multipart/form-data` handling.\n5. **Future-Proofing 🚀** – v1+ syntax prevents deprecation issues and keeps code up-to-date.\n\n\n## ⚡ 5. Quick Reference Table  \n\n![Badge](https://img.shields.io/badge/Reference-Quick_Access-orange)  \n\n| Section | Topic | Key Command / Code | Notes |\n|---------|-------|-------------------|-------|\n| 1 | OpenAI API Key Usage | `export OPEN_AI_API_KEY=\"your_api_key\"` | Set in terminal before running app |\n| 2 | Whisper AI – Speech to Text | `openai.Audio.transcribe(\"whisper-1\", audio_file)` | Works with `.mp3`, `.wav`, `.m4a`, etc. |\n| 3 | Install `multipart` | `pip install python-multipart` | Needed for file uploads in FastAPI |\n| 4 | Latest OpenAI Version | `OpenAI(api_key=...)` \u0026 `client.audio.transcriptions.create(...)` | Updated v1+ SDK syntax |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarthak576%2Finternsbyte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsarthak576%2Finternsbyte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarthak576%2Finternsbyte/lists"}