chore: auto-commit from dashboard
This commit is contained in:
@@ -691,9 +691,9 @@ Reminders:
|
||||
Audio:
|
||||
/audio <text> — TTS pe text
|
||||
/audio <url> — Extrage articol → audio
|
||||
/audio rezumat <url> — Rezumat Claude → audio
|
||||
/audio <url> rezumat — Rezumat Claude → audio (flag oriunde)
|
||||
/audio — Ultimul răspuns Echo → audio
|
||||
/audio M2 [text|url|gol] — Voce specificată (M1-M5, F1-F5)
|
||||
/audio M2 [text|url] [rezumat] — Voce specificată (M1-M5, F1-F5)
|
||||
/audio ajutor — Ajutor detaliat
|
||||
|
||||
Ops:
|
||||
@@ -736,6 +736,12 @@ def cmd_audio(args: list[str]) -> str:
|
||||
voice = remaining[0].upper()
|
||||
remaining = remaining[1:]
|
||||
|
||||
# Detectare flag "rezumat" oriunde în args (indiferent de ordine)
|
||||
do_summarize = False
|
||||
if any(t.lower() == "rezumat" for t in remaining):
|
||||
do_summarize = True
|
||||
remaining = [t for t in remaining if t.lower() != "rezumat"]
|
||||
|
||||
channel_id = _get_ctx_channel()
|
||||
|
||||
# Determinare text sursă
|
||||
@@ -750,30 +756,29 @@ def cmd_audio(args: list[str]) -> str:
|
||||
elif len(remaining) == 1 and remaining[0].lower() == "ajutor":
|
||||
return (
|
||||
"🎙️ /audio — Text-to-Speech local (Supertonic)\n\n"
|
||||
" /audio <text> — TTS pe text dat\n"
|
||||
" /audio <url> — extrage articol → audio\n"
|
||||
" /audio rezumat <url> — rezumat Claude → audio\n"
|
||||
" /audio — ultimul răspuns Echo → audio\n"
|
||||
" /audio M2 <...> — voce specifică (M1-M5, F1-F5)\n\n"
|
||||
" /audio <text> — TTS pe text dat\n"
|
||||
" /audio <url> — extrage articol → audio\n"
|
||||
" /audio <url> rezumat — rezumat Claude → audio\n"
|
||||
" /audio — ultimul răspuns Echo → audio\n"
|
||||
" /audio M2 [text|url] [rezumat] — voce specifică (M1-M5, F1-F5)\n\n"
|
||||
"Flag rezumat: poate fi pus oriunde în comandă\n"
|
||||
" /audio rezumat <url> ≡ /audio <url> rezumat ≡ /audio M2 <url> rezumat\n\n"
|
||||
"Voci: M1 M2 M3 M4 M5 (masculin) · F1 F2 F3 F4 F5 (feminin)"
|
||||
)
|
||||
|
||||
elif (len(remaining) >= 2
|
||||
and remaining[0].lower() == "rezumat"
|
||||
and remaining[1].startswith("http")):
|
||||
url = remaining[1]
|
||||
extracted = _extract_url_text(url)
|
||||
if not extracted:
|
||||
return f"Nu am putut extrage text din URL: {url}"
|
||||
text = _claude_summarize(extracted)
|
||||
if not text:
|
||||
return "Rezumatul a eșuat. Încearcă /audio <url> pentru extragere directă."
|
||||
|
||||
elif len(remaining) == 1 and remaining[0].startswith("http"):
|
||||
url = remaining[0]
|
||||
text = _extract_url_text(url)
|
||||
if not text:
|
||||
return f"Nu am putut extrage text din URL: {url}"
|
||||
if do_summarize:
|
||||
extracted = _extract_url_text(url)
|
||||
if not extracted:
|
||||
return f"Nu am putut extrage text din URL: {url}"
|
||||
text = _claude_summarize(extracted)
|
||||
if not text:
|
||||
return "Rezumatul a eșuat. Încearcă /audio <url> pentru extragere directă."
|
||||
else:
|
||||
text = _extract_url_text(url)
|
||||
if not text:
|
||||
return f"Nu am putut extrage text din URL: {url}"
|
||||
|
||||
else:
|
||||
text = " ".join(remaining)
|
||||
|
||||
Reference in New Issue
Block a user