feat(export): Volltranskript als Anhang in DOCX/PDF (meeting/phone-call/interview)

LLM komprimiert das Transkript bisher auf wenige Sätze + 20 Excerpt-Einträge
— der Rest fiel aus dem Dokument. Pipeline reicht Whisper-Segmente jetzt an
build_docx/build_pdf durch; Profile mit `docx.include_full_transcript: true`
hängen das komplette Transkript (9 pt) am Ende an.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
root
2026-05-18 14:35:34 +00:00
co-authored by Claude Opus 4.7
parent 60fbdbf036
commit 5f0b41161e
8 changed files with 99 additions and 10 deletions
+16 -4
View File
@@ -146,16 +146,28 @@ class MacClient:
job_id,
)
async def export_docx(self, data: dict, profile: str | None = None, job_id: int | None = None) -> bytes:
async def export_docx(
self,
data: dict,
profile: str | None = None,
job_id: int | None = None,
full_transcript: list[dict] | None = None,
) -> bytes:
return await self._post_bytes_retry(
f"{self.base_url}/api/export/docx",
{"data": data, "profile": profile},
{"data": data, "profile": profile, "full_transcript": full_transcript or []},
job_id,
)
async def export_pdf(self, data: dict, profile: str | None = None, job_id: int | None = None) -> bytes:
async def export_pdf(
self,
data: dict,
profile: str | None = None,
job_id: int | None = None,
full_transcript: list[dict] | None = None,
) -> bytes:
return await self._post_bytes_retry(
f"{self.base_url}/api/export/pdf",
{"data": data, "profile": profile},
{"data": data, "profile": profile, "full_transcript": full_transcript or []},
job_id,
)
+9 -2
View File
@@ -166,6 +166,11 @@ async def run_pipeline(job_id: int) -> None:
protocol_path.write_text(json.dumps(protocol, ensure_ascii=False, indent=2), encoding="utf-8")
_update(job_id, protocol_path=str(protocol_path), progress=85)
# Volltranskript-Segmente: optionaler Anhang ans DOCX/PDF, falls das
# Profil `docx.include_full_transcript` setzt. Renderer ignoriert die
# Liste sonst — wir reichen sie trotzdem immer durch.
full_segments = tx.get("segments", []) or []
# 4) DOCX
if existing_dx_path:
log.info("[job %s] reuse docx %s", job_id, existing_dx_path.name)
@@ -174,7 +179,8 @@ async def run_pipeline(job_id: int) -> None:
log.info("[job %s] export docx", job_id)
docx_bytes = await _with_heartbeat(
job_id,
client.export_docx(protocol, profile=profile, job_id=job_id),
client.export_docx(protocol, profile=profile, job_id=job_id,
full_transcript=full_segments),
)
docx_path = job_dir / "protocol.docx"
docx_path.write_bytes(docx_bytes)
@@ -189,7 +195,8 @@ async def run_pipeline(job_id: int) -> None:
log.info("[job %s] export pdf", job_id)
pdf_bytes = await _with_heartbeat(
job_id,
client.export_pdf(protocol, profile=profile, job_id=job_id),
client.export_pdf(protocol, profile=profile, job_id=job_id,
full_transcript=full_segments),
)
pdf_path = job_dir / "protocol.pdf"
pdf_path.write_bytes(pdf_bytes)