|
1 | 1 | --- |
2 | 2 | name: lecture-notes |
3 | | -description: Transform lecture materials (slides, PDFs, text snippets, transcripts) into comprehensive, exam-ready Markdown notes for Obsidian. Use when the user provides lecture content, study materials, or asks to take notes, summarize lectures, or create study guides. Outputs structured notes with key concepts, definitions, LaTeX math, and exam-important callouts. |
| 3 | +description: Transform lecture materials (slides, PDFs, text snippets, transcripts, audio, or video recordings) into comprehensive, exam-ready Markdown notes for Obsidian. Use when the user provides lecture content, study materials, or asks to take notes, summarize lectures, or create study guides. Outputs structured notes with key concepts, definitions, LaTeX math, and exam-important callouts. |
4 | 4 | license: MIT |
5 | 5 | metadata: |
6 | 6 | author: emmsixx |
7 | | - version: "1.0" |
| 7 | + version: "1.2" |
8 | 8 | --- |
9 | 9 |
|
10 | 10 | # Lecture Notes Skill |
11 | 11 |
|
12 | 12 | Transform lecture materials into structured, exam-ready Markdown notes for Obsidian. |
13 | 13 |
|
| 14 | +## Audio and Video Inputs |
| 15 | + |
| 16 | +When the source material is an audio or video file, always create a local transcript first and use that transcript as the primary input for note generation. |
| 17 | + |
| 18 | +### Required Workflow |
| 19 | +1. **If the input is audio**, transcribe it directly with Groq Whisper. |
| 20 | +2. **If the input is video**, first extract a separate audio file with `ffmpeg`, then transcribe that extracted audio with Groq Whisper. |
| 21 | +3. **Save the transcript locally as a plain text file** and use that saved transcript for the rest of the lecture-notes workflow. |
| 22 | +4. If useful, also save the raw verbose JSON response locally for debugging or timestamp lookups, but the `.txt` transcript is the canonical note-generation source. |
| 23 | + |
| 24 | +### Whisper Transcription |
| 25 | +Before using audio or video transcription, make sure `GROQ_API_KEY` is defined in the environment. |
| 26 | + |
| 27 | +Use the Groq transcription endpoint with `whisper-large-v3-turbo`, `temperature=0`, and `response_format=verbose_json`. |
| 28 | + |
| 29 | +```bash |
| 30 | +curl "https://api.groq.com/openai/v1/audio/transcriptions" \ |
| 31 | + -H "Authorization: Bearer ${GROQ_API_KEY}" \ |
| 32 | + -F "model=whisper-large-v3-turbo" \ |
| 33 | + -F "file=@./audio.m4a" \ |
| 34 | + -F "temperature=0" \ |
| 35 | + -F "response_format=verbose_json" \ |
| 36 | + -X POST |
| 37 | +``` |
| 38 | + |
| 39 | +For actual skill usage, save the verbose JSON first, then convert it into a plain text transcript file: |
| 40 | + |
| 41 | +```bash |
| 42 | +curl "https://api.groq.com/openai/v1/audio/transcriptions" \ |
| 43 | + -H "Authorization: Bearer ${GROQ_API_KEY}" \ |
| 44 | + -F "model=whisper-large-v3-turbo" \ |
| 45 | + -F "file=@./Lecture 05.audio.mp3" \ |
| 46 | + -F "temperature=0" \ |
| 47 | + -F "response_format=verbose_json" \ |
| 48 | + -X POST \ |
| 49 | + -o "Lecture 05.transcript.verbose.json" |
| 50 | + |
| 51 | +jq -r '.text // (.segments | map(.text) | join(" "))' \ |
| 52 | + "Lecture 05.transcript.verbose.json" > "Lecture 05.transcript.txt" |
| 53 | +``` |
| 54 | + |
| 55 | +### Recommended Local File Outputs |
| 56 | +Given an input file like `Lecture 05.mp4` or `Lecture 05.m4a`, save derived files alongside it using predictable names: |
| 57 | +- `Lecture 05.audio.mp3` for audio extracted from video |
| 58 | +- `Lecture 05.transcript.verbose.json` for the Whisper API response |
| 59 | +- `Lecture 05.transcript.txt` for the plain text transcript used to generate notes |
| 60 | + |
| 61 | +### Video to Audio Extraction |
| 62 | +Use `ffmpeg` to extract audio from video before transcription. A safe default is: |
| 63 | + |
| 64 | +```bash |
| 65 | +ffmpeg -i "Lecture 05.mp4" -vn -ac 1 -ar 16000 -c:a mp3 "Lecture 05.audio.mp3" |
| 66 | +``` |
| 67 | + |
| 68 | +Then transcribe the extracted audio and save both the verbose JSON and plain text transcript locally. |
| 69 | + |
| 70 | +### Transcript Handling Rules |
| 71 | +- Always generate notes from the saved local transcript file, not directly from the raw media file. |
| 72 | +- If the user also provides slides, PDFs, or other lecture materials, combine them with the transcript when producing notes. |
| 73 | +- Preserve important spoken structure such as section transitions, definitions, theorem statements, examples, and repeated exam hints. |
| 74 | +- If the transcript is clearly noisy or incomplete, note uncertainty in the final notes rather than silently inventing missing content. |
| 75 | +- If a transcript already exists locally for the same media file, reuse it unless the user explicitly asks for a fresh transcription. |
| 76 | + |
14 | 77 | ## Output Format |
15 | 78 |
|
16 | 79 | Output all notes inside fenced codeblocks. When content spans multiple chapters or distinct topics, create separate files. |
|
0 commit comments