Files
breakpilot-compliance/ai-compliance-sdk/migrations/016_training_media.sql
Benjamin Boenisch 375914e568
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 36s
CI / test-python-backend-compliance (push) Successful in 31s
CI / test-python-document-crawler (push) Successful in 23s
CI / test-python-dsms-gateway (push) Successful in 21s
feat(training): add Media Pipeline — TTS Audio, Presentation Video, Bulk Generation
Phase A: 8 new IT-Security training modules (SEC-PWD, SEC-DESK, SEC-KIAI,
SEC-BYOD, SEC-VIDEO, SEC-USB, SEC-INC, SEC-HOME) with CTM entries.
Bulk content and quiz generation endpoints for all 28 modules.

Phase B: Piper TTS service (Python/FastAPI) for local German speech synthesis.
training_media table, TTSClient in Go backend, audio generation endpoints,
AudioPlayer component in frontend. MinIO storage integration.

Phase C: FFmpeg presentation video pipeline — LLM generates slide scripts,
ImageMagick renders 1920x1080 slides, FFmpeg combines with audio to MP4.
VideoPlayer and ScriptPreview components in frontend.

New files: 15 created, 9 modified
- compliance-tts-service/ (Dockerfile, main.py, tts_engine.py, storage.py,
  slide_renderer.py, video_generator.py)
- migrations 014-016 (training engine, IT-security modules, media table)
- training package (models, store, content_generator, media, handlers)
- frontend (AudioPlayer, VideoPlayer, ScriptPreview, api, types, page)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 21:45:05 +01:00

29 lines
1.3 KiB
SQL

-- =========================================================
-- Migration 016: Training Media (Audio/Video)
-- =========================================================
CREATE TABLE IF NOT EXISTS training_media (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
module_id UUID NOT NULL REFERENCES training_modules(id) ON DELETE CASCADE,
content_id UUID REFERENCES training_module_content(id),
media_type VARCHAR(10) NOT NULL CHECK (media_type IN ('audio', 'video')),
status VARCHAR(20) NOT NULL DEFAULT 'processing',
bucket VARCHAR(100) NOT NULL,
object_key VARCHAR(500) NOT NULL,
file_size_bytes BIGINT,
duration_seconds FLOAT,
mime_type VARCHAR(50),
voice_model VARCHAR(100),
language VARCHAR(10) DEFAULT 'de',
metadata JSONB DEFAULT '{}'::jsonb,
error_message TEXT,
generated_by VARCHAR(50),
is_published BOOLEAN DEFAULT FALSE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_training_media_module ON training_media(module_id);
CREATE INDEX IF NOT EXISTS idx_training_media_type ON training_media(module_id, media_type);
CREATE INDEX IF NOT EXISTS idx_training_media_published ON training_media(module_id, media_type, is_published) WHERE is_published = true;