This commit is contained in:
eddiesoehnel committed 2026-10-17 14:59:30 -06:00
commit 4eaec52904
55 files changed
+5044

No files matched your search

+114
View File
@@ -0,0 +1,114 @@
# Structured Media Builder
Put an audio or video recording and its speech-to-text **TXT and VTT files in one folder**. Ask an AI to use this template against that folder. The AI gathers useful metadata, builds structured assets inside that folder, and leaves them for your review.
Use it for webinars, meetings, interviews, podcasts, lectures, demonstrations, and other recordings. No browser preview or local web server is required. Internet publication, API/MCP hosting, and embeddings are later options.
Version **0.2.0**, experimental. See [the detailed workflow](docs/workflow.md) and [capabilities](docs/architecture.md).
## What you prepare
1. Run your normal speech-to-text process.
2. Copy the original media, its `.txt`, and its `.vtt` into a new recording folder. Keep your filenames; the three stems do not have to match.
3. Include whatever metadata you know using the checklist below, or provide a published source page. You do not need to create JSON, supply every answer, or review generated chunks in advance.
4. Give the AI the template repo path and recording folder path. It inspects the files, interviews you about missing useful facts, builds the assets, and returns review links.
Your original three files remain unchanged. A local draft can be built when URLs, exact credits, rights, or other optional facts are unknown. Unknowns stay explicit; human review follows the build.
## Metadata checklist for your prompt
Use [this copyable checklist](templates/media-intake.md), or ordinary prose. Partial answers and “unknown” are welcome. An official recording page is useful: the AI should extract supported metadata from it before asking you to repeat anything.
| Information | What helps | If unavailable |
| --- | --- | --- |
| Identity | Official title; recording date/timezone; organizer/publisher; series/part; event type | Use a marked candidate or leave unknown |
| People and credits | Hosts, speakers, moderators, affiliations, correct spellings, attribution | Transcript names remain unverified |
| Purpose | Description, audience, topics, questions people should find answers to | AI drafts these from the transcript for review |
| Links and supporting material | Published session page, future landing page, slides, reports, related sessions | Leave unset; add later |
| Rights and scope | Known license/rights, sharing limits, sensitive content or exclusions | Build a local draft; resolve before publication |
| Transcript quality | STT tool/model, review status, errors, missing sections, languages | Record limitations and preserve sources |
| Processing preferences | Depth, priority topics, terminology, downstream API/MCP/RAG goals | Use coherent chunks and grounded Q&A |
The AI inspects supplied files, prompt, and authorized source pages before asking. It groups useful missing questions, accepts partial answers, and records the distinction between user answers, file observations, source-page facts, transcript claims, AI interpretations, and unknowns. Source ambiguity and requested sensitive exclusions must be resolved before processing affected content.
## Example request
```text
Use C:\projects\indx\structured-media-builder-OPEN to structure the media in:
C:\path\to\my-recording-folder
Title / organizer / date: ...
Published session page: ...
Speakers / affiliations: ...
Audience / priority questions: ...
Credits / sharing limits / transcript issues: ...
Ask for missing useful metadata first. Build all assets in the recording
folder, leave unknowns explicit, then give me the result to review.
```
## What the AI does
1. Follow [media-intake](skills/media-intake/SKILL.md): inventory sources, compare TXT/VTT, measure available timing, inspect supplied source pages, and interview you.
2. Save `media-intake.json` beside the sources, with provenance and unknowns.
3. Follow [structure-media](skills/structure-media/SKILL.md): read the whole transcript, author coherent topic chunks, useful Q&A with exact evidence, and navigation chapters. Save `structure-plan.json` beside the sources.
4. Build a new `structured/` subfolder. Validate time ranges, cue coverage, IDs, evidence quotes, output checksums, and original source hashes.
5. Return `structured/README.md` and `structured/review.md`. Everything remains **draft** until you review it. Flag missing metadata, suspected STT errors, and unverified figures or identities.
6. Incorporate your corrections into a new output such as `structured-002/`, preserving originals and prior results. Publication is separate.
## Files you receive
```text
my-recording-folder/
original-recording.mp3 original media (or video)
original-transcript.txt original STT text
original-transcript.vtt original timed STT text
media-intake.json answers, observations, provenance, unknowns
structure-plan.json authored chunks, Q&A, and chapters
structured/
README.md overview, chapter map, summaries, Q&A
review.md review checklist, unknowns, quality notes
media.json recording metadata and source audit
transcript.md readable timed transcript with cue anchors
transcript.json normalized timed cues
chunks.json conceptual units and source citations
qa.json answers with exact quoted evidence
chapters.json navigation without invented hosted URLs
schema.jsonld draft AudioObject/VideoObject, known facts
ai-index.json local artifact routing
llms.txt local reading guide
build-receipt.json hashes, counts, and draft status
```
Chunks preserve what was said. Summaries and Q&A interpret it with supporting quotes and time ranges; neither proves a speaker's claims true. Originals are not rewritten or copied into the output. If TXT/VTT differ, the draft uses VTT timing/text and flags the difference.
## Commands for the AI or operator
Python 3.11+ and `jsonschema` are required. Run from this template repo. The AI normally handles these steps.
```powershell
python -m pip install -r requirements.txt
python scripts/folder_builder.py inspect --folder "C:\path\to\my-recording-folder"
python scripts/folder_builder.py prepare --folder "C:\path\to\my-recording-folder" --output "C:\path\to\my-recording-folder\media-intake.json"
# Fill intake from the interview, then seed and author the semantic plan:
python scripts/folder_builder.py seed --folder "C:\path\to\my-recording-folder" --intake "C:\path\to\my-recording-folder\media-intake.json" --output "C:\path\to\my-recording-folder\structure-plan.json"
python scripts/folder_builder.py build --folder "C:\path\to\my-recording-folder" --intake "C:\path\to\my-recording-folder\media-intake.json" --plan "C:\path\to\my-recording-folder\structure-plan.json" --output "C:\path\to\my-recording-folder\structured"
python scripts/folder_builder.py verify --output "C:\path\to\my-recording-folder\structured"
python scripts/folder_builder.py search --output "C:\path\to\my-recording-folder\structured" --query "a useful question"
```
`seed` is a starter, not completed semantic analysis. The AI must structure the content before delivery. Existing intake, plans, and outputs are not overwritten. Supported MP3 duration is measured from MPEG frames; otherwise media duration stays unknown and VTT end time is reported separately.
## Later: publish or serve reviewed content
After review and collection of publication facts, the optional [approved public export](docs/public-export.md) can generate companion HTML, hosted URLs, and a collection sitemap. It retains stricter review/rights checks and is separate from local draft generation.
Static JSON and local keyword search work now. [API/MCP contracts](docs/interfaces.md) are future adapter designs. [Research](docs/research.md) covers standards and platform patterns. This adapts [AI Knowledge Structure](https://projects.eddiesoehnel.com/adminprojects/ai-knowledge-structure-OPEN) and [Structured Website Builder](https://projects.eddiesoehnel.com/adminprojects/structured-website-builder-OPEN) to timed media evidence.
## Repository maintenance
- [Agent instructions](AGENTS.md), [manifest](repository.json), [identity](repository-variables.json), [author](AUTHOR.md), [changelog](CHANGELOG.md), [skills](skills.md).
- [Schemas](schemas/README.md), [templates](templates/README.md), [synthetic tests](examples/README.md), [validation](docs/validation.md).
- [Publication](PUBLICATION_WORKFLOW.md), [security](SECURITY.md), [contributing](CONTRIBUTING.md), [license](LICENSE.md), [proposals](UPDATES.md).
Run `python -m unittest discover -s tests -v` and `python scripts/check_repository.py` after changes. No repository code/documentation license has been selected; recording and derivative rights are separate facts.