Skip to content

Commit f8c32cb

Browse files
committed
feat(lecture-notes): add audio/video transcription workflow
1 parent 9274759 commit f8c32cb

2 files changed

Lines changed: 73 additions & 2 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,11 @@ npx skills add emmsixx/skills --no-confirm
3232
| Skill | Description |
3333
|-------|-------------|
3434
| [lecture-notes](./lecture-notes/) | Transform lecture materials into exam-ready Markdown notes for Obsidian |
35+
36+
### lecture-notes requirements
37+
38+
For audio or video lecture inputs, the `lecture-notes` skill uses Groq Whisper for transcription. Make sure `GROQ_API_KEY` is defined in your environment before using those workflows.
39+
40+
```sh
41+
export GROQ_API_KEY=your_groq_api_key_here
42+
```

lecture-notes/SKILL.md

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,79 @@
11
---
22
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.
44
license: MIT
55
metadata:
66
author: emmsixx
7-
version: "1.0"
7+
version: "1.2"
88
---
99

1010
# Lecture Notes Skill
1111

1212
Transform lecture materials into structured, exam-ready Markdown notes for Obsidian.
1313

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+
1477
## Output Format
1578

1679
Output all notes inside fenced codeblocks. When content spans multiple chapters or distinct topics, create separate files.

0 commit comments

Comments
 (0)