Compare commits

...
Author SHA1 Message Date
shinyobjectz 500d05a4d2 raea words: Whisper on Groq first, Parakeet on a GPU only when Groq and OpenRouter fail
12-03, Shane: "make that the primary". On the workspace's 10 GPUs, Parakeet heard 2 takes at a time: a 50-take
project's prep took 3.6 minutes, and raising it to 12 containers starved the render farm (StreetTalk round 4). Groq
takes about 4 s a take (Body Shop's Angle1_Interview2, measured on raea-6) and uses none of the GPUs. Deployed.
2026-12-03 23:02:40 -08:00
shane bec1ab1947 Merge pull request #325 from shinyobjectz/idle-real-path
A box's idle stop sees work by its folder's real path; box.sh holds the box while unpacking
2026-12-03 22:19:39 -08:00
+9 -8
View File
@@ -710,16 +710,17 @@ def api():
except urllib.error.HTTPError as e:
return e.code, {"error": e.read()[:500].decode("utf8", "replace")}
# raea-words first (words.py, 12-03): Parakeet on a GPU, each word's edges on its sound, as raea hears on a Mac.
# Whisper's word times are guessed (StreetTalk's out points sat on them, mid-word); it stays as the fallback
if not req.query_params.get("language") or req.query_params["language"] in WORDS_LANGUAGES:
try:
hear = modal.Cls.from_name(WORDS_APP, "Hear")
return await hear().words.remote.aio(mp3)
except Exception as e:
print(f"words: {WORDS_APP} failed, so Whisper hears it: {str(e)[-300:]}", flush=True)
# Whisper on Groq first (12-03, Shane: "make that the primary"): no GPU of the workspace's 10, so a run's prep
# hears all its takes at once instead of queuing on two, and renders never wait behind it. Parakeet on a GPU
# (raea-words, words.py) only when Groq and OpenRouter both fail
code, got = await asyncio.to_thread(ask)
if code != 200:
if not req.query_params.get("language") or req.query_params["language"] in WORDS_LANGUAGES:
try:
hear = modal.Cls.from_name(WORDS_APP, "Hear")
return await hear().words.remote.aio(mp3)
except Exception as e:
print(f"words: Whisper said {code} and {WORDS_APP} failed too: {str(e)[-300:]}", flush=True)
raise HTTPException(502, f"Whisper said {code}: {got.get('error', '')}")
ws = [{"text": w.get("word", "").strip(), "start": float(w.get("start", 0)), "end": float(w.get("end", w.get("start", 0)))} for w in got.get("words") or [] if w.get("word", "").strip()]
return {"model": got.get("_model", "openai/whisper-large-v3"), "duration": got.get("duration"), "text": got.get("text", ""), "words": ws}