One folder per meeting (out/<name>/source.*, transcript.txt, meta.json, logs/), out/_global; speaker transcript from DB; throwaway Edge profile; skip shots only when all images exist
This commit is contained in:
+3
-10
@@ -7,7 +7,6 @@ API = f"http://127.0.0.1:{llama.PORT}/v1/chat/completions"
|
||||
JIRA_BROWSE = "https://italdesign.atlassian.net/browse"
|
||||
_open = urllib.request.build_opener(urllib.request.ProxyHandler({})).open
|
||||
TICKET = re.compile(r"\b[A-Z][A-Z0-9]{1,9}-\d{1,6}\b")
|
||||
LINE = re.compile(r"^\[(\d+):(\d+)\] (?:(Speaker \d+): )?(.*)$")
|
||||
SYS_A = ('Dividi la trascrizione in argomenti discussi. Rispondi SOLO JSON: {"topics":[{"title":str,"start":"mm:ss","end":"mm:ss","summary":[str],"shown":[str],"decisions":[str],"actions":[{"who":str,"what":str,"when":str}],"open_questions":[str]}]}. '
|
||||
'Le righe [SCHERMO] riportano cosa era visibile sullo schermo condiviso (tipo, titolo, testo letto): usale come fonte di fatti complementare al parlato. '
|
||||
'In "shown" metti i fatti concreti visti a schermo e rilevanti per l\'argomento (valori, nomi di sistemi, ticket, errori, URL), ognuno iniziando con il timestamp "mm:ss" della riga [SCHERMO] da cui proviene. '
|
||||
@@ -39,8 +38,7 @@ def _tick(note):
|
||||
|
||||
|
||||
def _manual_title(name):
|
||||
p = db.out_dir(name) / "title.txt"
|
||||
return p.read_text(encoding="utf-8").strip() if p.exists() else ""
|
||||
return db.meta(name).get("title", "")
|
||||
|
||||
THINK = 1024 # reasoning budget per report call (server: --reasoning-budget); added to max_tokens so the answer keeps its room
|
||||
|
||||
@@ -74,13 +72,8 @@ def chat(system, user, max_tokens, retries=2, think=False):
|
||||
|
||||
|
||||
def _transcript(name):
|
||||
p = db.OUT / f"{name}.spk.txt"
|
||||
if not p.exists(): p = db.OUT / f"{name}.txt"
|
||||
rows = []
|
||||
for l in p.read_text(encoding="utf-8").splitlines() if p.exists() else []:
|
||||
m = LINE.match(l)
|
||||
if m: rows.append((int(m[1]) * 60 + int(m[2]), m[3], m[4]))
|
||||
return rows
|
||||
"""[(sec, "Speaker N" | None, text)] from the lines table: diarize stores the speaker-labelled paragraphs there, names are applied at render time."""
|
||||
return [(int(t), sp, x) for t, sp, x in db.connect().execute("SELECT t, speaker, text FROM lines WHERE name=? ORDER BY rowid", (name,))]
|
||||
|
||||
|
||||
def _load(name, f, default):
|
||||
|
||||
Reference in New Issue
Block a user