ExamSpectrum

ExamSpectrum — ExamSpectrumAI Quick Start

This repo carries a self-contained copy of ExamSpectrumAI, the engine that generates Essential and Deep-Dive articles (Read + Listen + Watch/Video + Social) from small series specs. This page is the 5-step quick start. For depth see:

The engine auto-detects this folder as its repo root (it resolves the folder two levels above ExamSpectrumAI/src/engine), so it reads specs from content/…/series and writes output to site/…/Articles here — fully independent of any other repo.


1. Create a virtual environment

cd C:\Repo\#GithubPages\ExamSpectrum
python -m venv .venv
.venv\Scripts\Activate.ps1

2. Install the engine + its dependencies

pip install -e ExamSpectrumAI          # installs the engine and its Python deps
pip install edge-tts             # free text-to-speech for Listen/Video (no Azure needed)
playwright install chromium      # only needed for Video / VideoWB rendering

3. Choose your model + speech path

ExamSpectrumAI runs in two modes — pick per your needs:

  LLM (writing) Speech (TTS) When to use
Free Copilot handoff (the in-editor model services a bridge file) edge-tts You drive ExamSpectrumAI from inside VS Code with an agent; zero Azure cost
Azure Azure OpenAI Azure Speech Unattended runs; production; no editor agent needed

Set the env for a session (run from the repo root):

$env:PYTHONUTF8 = '1'
$env:PYTHONPATH = 'ExamSpectrumAI/src'
$env:EXAMSPECTRUMAI_LLM_PROVIDER = 'handoff'   # 'handoff' = free/Copilot; omit or configure for Azure

4. (Optional) Provision Azure infrastructure

Only for the Azure path. Stands up one keyless multi-service AI Services account (serves both Speech and Azure OpenAI), assigns your RBAC roles, and writes ExamSpectrumAI/src/engine/config.local.json. Requires the Azure CLI.

az login --tenant <TENANT_ID>
python -m engine.cli init                                   # scaffold folders + config
python -m engine.cli provision -g rg-examspectrum -l swedencentral -n examspectrum-ai
# add the paid GPT deployment too (optional):
python -m engine.cli provision -g rg-examspectrum -l swedencentral -n examspectrum-ai --deploy-openai

config.local.json is git-ignored and never leaves the machine.

5. Generate your first article

Series specs live in content/essential/series/*.yaml and content/deep-dive/series/*.yaml. The <series-id> is the spec’s id (its file name without .yaml).

Essential article (defaults to content/essential/seriessite/essential/Articles) — run in a shell where the Deep-Dive profile is not loaded:

python -m engine.cli read   <series-id> --topic <slug>
python -m engine.cli listen <series-id> --topic <slug>
python -m engine.cli video  <series-id> <slug>

Deep-Dive article — dot-source the Deep-Dive profile first (isolates input/output under content/deep-dive/seriessite/deep-dive/Articles):

. tools/deepdive_env.ps1
python -m engine.cli read     <series-id> --topic <slug>
python -m engine.cli listen   <series-id> --topic <slug>
python -m engine.cli listenwb <series-id> --topic <slug>   # whiteboard Watch (Deep-Dive only)
python -m engine.cli social   <series-id> --topic <slug>
python -m engine.cli video    <series-id> <slug>
python -m engine.cli videowb  <series-id>                  # all built boards, sequential

Video / VideoWB use Chromium screen-recording — never run two renders at once (concurrent captures corrupt frames). Run them sequentially.


Adapt for ExamSpectrum (copied as-is from the source repo)

What’s here vs. not

Included: the engine (ExamSpectrumAI/), tooling (tools/), series-spec templates (content/), deploy workflow, pagefind.yml, .gitattributes, and the guides. Not included (recreated on demand): the ExamSpectrumAI/cache/ scratch, generated site/ output, and the machine-specific config.local.json.