Fix podcasts generating in English + failing with invalid JSON
Two root causes, both fixed in the bind-mounted podcast prompt templates
(prompts/podcast/*.jinja):
1. Language: the episode profile's `language` field IS passed to both
podcast_creator templates as {{ language }}, but the stock templates never
reference it — so podcasts came out English (driven only by the English
stock briefings/speakers), then read aloud by the German-locked Chatterbox
TTS = "English with a German accent". Added a CRITICAL LANGUAGE REQUIREMENT
block keyed on {{ language }} to both templates; now `language: "de"`
actually forces German. Verified end-to-end: a full run produced a 44-line
all-German transcript + audio.
2. Invalid json output failures: qwen3.5:27b is a thinking model; on long
segments the <think> block ate the response-token budget and truncated the
JSON. Prepended /no_think to both templates (~3x faster, valid JSON).
Templates are bind-mounted read-only via docker-compose (directory mount, so
edits survive a container restart without inode-staleness). Bundled briefings
and speaker backstories were also translated to German to reduce drift.
Known limitation documented: feeding an entire book (~70k tokens) as podcast
content makes each of the 6 LLM calls take ~3.5 min and is unreliable; use a
shorter source or summary. Confirmed working with concise content.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
e2fb113213
commit
054f867a8a
6 changed files with 304 additions and 18 deletions
|
|
@ -34,3 +34,11 @@ services:
|
|||
- "host.docker.internal:host-gateway"
|
||||
volumes:
|
||||
- ./notebook_data:/app/data
|
||||
# Podcast-Prompt-Vorlagen mit expliziter Sprachanweisung ({{ language }})
|
||||
# und abgeschaltetem Thinking-Modus (/no_think), damit Podcasts in der
|
||||
# eingestellten Sprache erzeugt werden (statt Englisch) und das JSON bei
|
||||
# langen Segmenten nicht durch riesige Reasoning-Blöcke abgeschnitten wird.
|
||||
# Verzeichnis-Mount (nicht Einzeldateien), damit Edits ohne Inode-Probleme
|
||||
# nach einem Container-Neustart greifen. Der Ordner im Image enthält nur
|
||||
# genau diese zwei Vorlagen.
|
||||
- ./prompts/podcast:/app/prompts/podcast:ro
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue