Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
Document prompt template variables in user-guide and v1 OpenAPI spec
Murtaza Nasir1c5d6f15f930
diff --git a/docs/user-guide/settings.md b/docs/user-guide/settings.mdindex 36cfad5a..f90a5fa3 100644--- a/docs/user-guide/settings.md+++ b/docs/user-guide/settings.md@@ -207,6 +207,10 @@ Creating a new tag happens through the prominent "Create Tag" button. The systemTag prompts stack intelligently when multiple tags are applied. If you tag a recording with both "BSB Meetings" and "Student Meetings," both prompts combine, creating a comprehensive summary that addresses all specified requirements. This powerful stacking eliminates the need for complex single prompts trying to anticipate every combination.+### Prompt Variables++Tag and folder custom prompts may contain `{{name}}` placeholders that are filled in per recording at upload time. A "Council Meetings" tag whose prompt reads `Generate minutes for this council meeting. Agenda: {{agenda}}. Attendees: {{attendees}}.` will cause Speakr's upload form to display two input fields ("Agenda", "Attendees") whenever that tag is selected. The values are stored on the recording and substituted into the prompt at summarisation time, including on reprocessing. Variable names follow identifier rules (letters, digits, and underscores; must start with a letter or underscore). Labels are derived from the name automatically (`meeting_date` becomes "Meeting date").+### ASR DefaultsThe ASR defaults feature is particularly valuable for consistent meeting types. Setting "Max 10" for a "Court Action" tag ensures the transcription service looks for up to 10 distinct speakers, improving accuracy for multi-party proceedings. A "One-on-One" tag might default to exactly 2 speakers, while a "Webinar" tag could specify 1-3 speakers.diff --git a/src/api/api_v1.py b/src/api/api_v1.pyindex 5c22da90..081c925d 100644--- a/src/api/api_v1.py+++ b/src/api/api_v1.py@@ -110,6 +110,7 @@ OPENAPI_SPEC = {"is_inbox": {"type": "boolean"},"is_highlighted": {"type": "boolean"},"deletion_exempt": {"type": "boolean", "description": "If true, recording is exempt from auto-deletion"},+ "prompt_variables": {"type": "object", "description": "Per-recording {{name}} substitutions used when summarising"},"folder_id": {"type": "integer", "nullable": True},"folder": {"type": "object", "nullable": True, "properties": {"id": {"type": "integer"}, "name": {"type": "string"}}},"events": {"type": "array", "description": "Calendar events extracted from the recording (detail endpoint only)", "items": {"type": "object"}},@@ -314,6 +315,7 @@ OPENAPI_SPEC = {"hotwords": {"type": "string"},"initial_prompt": {"type": "string"},"transcription_model": {"type": "string"},+ "prompt_variables": {"type": "string", "description": "JSON object of {variable_name: value} substituted into {{name}} placeholders in the summary prompt"},"folder_id": {"type": "integer"},"tag_id": {"type": "integer"},"tag_ids[0]": {"type": "integer"},@@ -2578,6 +2580,9 @@ def upload_recording():- hotwords (optional)- initial_prompt (optional)- transcription_model (optional, validated against admin-curated list)+ - prompt_variables (optional, JSON object of `{variable_name: value}`+ substituted into `{{name}}` placeholders in the resolved summary+ prompt at summarisation time)- folder_id (optional)- tag_ids[0], tag_ids[1], ... (optional)- tag_id (optional, legacy)