{"id":51060104,"url":"https://github.com/ybakhan/lecture-assistant","last_synced_at":"2026-06-23T01:01:47.344Z","repository":{"id":247886763,"uuid":"812471283","full_name":"ybakhan/lecture-assistant","owner":"ybakhan","description":"Real-time lecture transcription and AI-powered Q\u0026A. Record a live lecture, get an instant transcript, and chat with an AI about the content.","archived":false,"fork":false,"pushed_at":"2026-06-06T22:21:50.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-07T00:11:40.539Z","etag":null,"topics":["aws","docker","express","nodejs","openai","parcel","real-time","speech-to-text","typescript","websocket"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ybakhan.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-09T01:46:17.000Z","updated_at":"2026-06-06T22:21:53.000Z","dependencies_parsed_at":"2024-07-11T05:53:49.926Z","dependency_job_id":null,"html_url":"https://github.com/ybakhan/lecture-assistant","commit_stats":null,"previous_names":["ybakhan/yhza-sa","ybakhan/lecture-assistant"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ybakhan/lecture-assistant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybakhan%2Flecture-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybakhan%2Flecture-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybakhan%2Flecture-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybakhan%2Flecture-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ybakhan","download_url":"https://codeload.github.com/ybakhan/lecture-assistant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybakhan%2Flecture-assistant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34671045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"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":["aws","docker","express","nodejs","openai","parcel","real-time","speech-to-text","typescript","websocket"],"created_at":"2026-06-23T01:01:42.378Z","updated_at":"2026-06-23T01:01:47.334Z","avatar_url":"https://github.com/ybakhan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LECTURE ASSISTANT\n\n\u003e Real-time lecture transcription and AI-powered Q\u0026A — record a live lecture, get an instant transcript, and chat with an AI about the content.\n\n[![Node.js](https://img.shields.io/badge/Node.js-20%2B-339933?logo=nodedotjs\u0026logoColor=white)](https://nodejs.org/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5-3178C6?logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n[![JavaScript](https://img.shields.io/badge/JavaScript-ES2020-F7DF1E?logo=javascript\u0026logoColor=black)](https://developer.mozilla.org/en-US/docs/Web/JavaScript)\n[![Express](https://img.shields.io/badge/Express-4-000000?logo=express\u0026logoColor=white)](https://expressjs.com/)\n[![AWS Transcribe](https://img.shields.io/badge/AWS-Transcribe-FF9900?logo=amazonaws\u0026logoColor=white)](https://aws.amazon.com/transcribe/)\n[![OpenAI](https://img.shields.io/badge/OpenAI-GPT--3.5-412991?logo=openai\u0026logoColor=white)](https://platform.openai.com/)\n[![Docker](https://img.shields.io/badge/Docker-ready-2496ED?logo=docker\u0026logoColor=white)](https://www.docker.com/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\n## Overview\n\n**Lecture Assistant** streams microphone audio from the browser to **AWS Transcribe** for real-time speech-to-text, then lets you ask questions about the transcript using **OpenAI GPT**. The live transcript appears word-by-word as you speak, and the AI chat has full context of everything said in the lecture.\n\n```\nBrowser mic → WebSocket → Node/Express → AWS Transcribe → live transcript\n                                       ↓\n                              OpenAI GPT Q\u0026A chat\n```\n\n## Features\n\n- **Real-time transcription** — live captions stream to the screen as you speak via AWS Transcribe Streaming\n- **AI chat** — ask anything about the recorded lecture; GPT answers with full transcript context\n- **Server-vended credentials** — the server obtains short-lived AWS tokens via STS and serves them to the client; no secrets in the browser bundle\n- **Transcript persistence** — completed transcripts and chat history are stored in S3; local files are cleaned up automatically\n- **WebSocket pipeline** — low-latency audio streaming directly from browser to cloud\n- **Docker-ready server** — single-file production bundle in a minimal Alpine image\n\n## Tech Stack\n\n| Layer | Technology |\n|---|---|\n| Frontend | Vanilla JavaScript, Parcel |\n| Backend | Node.js 20, TypeScript, Express, ws (WebSocket) |\n| Speech-to-text | AWS Transcribe Streaming |\n| AI chat | OpenAI GPT-3.5-turbo |\n| Cloud infra | AWS S3, AWS Secrets Manager, AWS STS |\n| Container | Docker (Alpine) |\n| Build | esbuild, ESLint, Prettier |\n\n## Prerequisites\n\n- Node.js 20+\n- AWS account with Transcribe, S3, Secrets Manager, and STS access\n- OpenAI API key stored in AWS Secrets Manager under the key `OPENAI_API_KEY`\n\n## Getting Started\n\n### 1. Server\n\n```bash\ncd server\nyarn install\nyarn bundle:prod\nnode ./dist/index.js\n```\n\nThe server starts on **port 8080**.\n\nThe server resolves credentials from the environment (IAM role, instance profile, or environment variables). Configure the following:\n\n| Variable | Description |\n|---|---|\n| `AWS_REGION` | AWS region (e.g. `us-east-2`) |\n| `TRANSCRIBE_ROLE_ARN` | ARN of the IAM role the server assumes to vend client credentials |\n| `AWS_ACCESS_KEY_ID` | AWS credentials (not needed when using an IAM role) |\n| `AWS_SECRET_ACCESS_KEY` | AWS credentials (not needed when using an IAM role) |\n\nThe OpenAI API key is fetched automatically from AWS Secrets Manager at runtime — no environment variable needed.\n\n### 2. Client\n\nCopy the example env file and set the server host:\n\n```bash\ncd client\ncp .env.example .env\n# edit .env and set PARCEL_PUBLIC_SERVICE_HOST if not running locally\nnpm install\nnpm start\n```\n\nOpen [http://localhost:1234](http://localhost:1234) and allow microphone access when prompted.\n\n### Docker (server only)\n\n```bash\ncd server\nyarn bundle:prod\ndocker build -t lecture-assistant .\ndocker run -p 8080:8080 lecture-assistant\n```\n\n## Usage\n\n1. Click **Start Recording** — the client fetches short-lived AWS credentials from the server, then begins streaming your mic to AWS Transcribe\n2. Speak; the live transcript appears on screen in real time\n3. Click **Stop Recording** — the transcript is uploaded to S3 and the local copy is cleaned up\n4. Type a question in the chat box and press **Send** or **Enter**\n5. GPT answers based on the full lecture transcript, read from S3\n\n## Project Structure\n\n```\n.\n├── client/                      # Browser frontend (Parcel, vanilla JS)\n│   ├── .env.example             # Environment variable template\n│   └── src/\n│       ├── app.js               # Main UI logic and event handling\n│       ├── config.js            # Host/port config (reads from env)\n│       ├── microphone.js        # Microphone capture\n│       ├── transcribe-client.js # AWS Transcribe Streaming client\n│       ├── socket.js            # WebSocket connection to server\n│       └── question.js          # OpenAI Q\u0026A API calls\n└── server/                      # Node.js backend (TypeScript, Express)\n    └── src/\n        ├── index.ts             # Express + WebSocket server entry point\n        ├── aws/\n        │   ├── s3-client.ts     # S3 read/write helpers\n        │   ├── sts-client.ts    # STS credential vending\n        │   └── secrets/         # Secrets Manager client with cache\n        ├── openai/              # GPT chat handler\n        └── transcribe/          # WebSocket transcription handler\n```\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybakhan%2Flecture-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fybakhan%2Flecture-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybakhan%2Flecture-assistant/lists"}