Skip to content

akou 1.2.4

Choose a tag to compare

@github-actions github-actions released this 24 Oct 23:44
· 32 commits to main since this release
15c6990

1.2.4 — akou gives its memory back once it is done with a model

akou held memory after it had finished with a model: about 900 MB on a server after every live session, 650 MB on the Mac app after every dictation or job, and 2.2 GB more for every file job someone cancelled. The dictation lane's Qwen server and the live model warmed at start were never let go at all. Now each of these goes back to the system once its idle time is up, and an idle server or app falls back to within a few MB of its size at start. The next use after an idle stretch loads its model again, about 1.5 s for the live model and about 10 s for Parakeet on a server CPU. The 8-hour soak did not run for this release. Instead we measured the memory on every path this release changes, on a Linux server and on a Mac, before and after the fix.

Server

  • A finished job or live session hands its model memory back (#431). On Linux the released memory stayed in the C library's heaps and the server kept about 2.3 GB after a Parakeet job and about 680 MB after a live session. It now falls to about 45 MB, its size at start.
  • A cancelled job no longer keeps its models (#434). Every job cancelled while it ran kept about 2.2 GB until the server restarted. A DELETE, a client hanging up on the OpenAI route, Bazarr timing out on a long film and the Wyoming routes all cancel this way. The job now stops at its next piece and the Worker frees its models before it goes.
  • The dictation lane's Qwen server and the live model warmed at start now go after their idle time (#432). Before, nothing ever let them go.
  • server.model_idle_minutes and asr.modelIdleMinutes now go up to 1440 (one day) (#432). A larger stored value is refused with a setting refused line at start, and the default is used instead (10 and 5 minutes).
  • /healthz answers 503 while a job is stuck (#428). A job that has run longer than 300 s plus five times its audio length counts as stalled, in the new queue.stalled, and /healthz says ok: false until it ends. Before, a server whose every job hung at running still said ok.
  • A job cancelled while its model loads no longer takes the server down (#429). Bun aborts the whole process when a Worker is terminated inside a native model load, so a caller hanging up during a long Parakeet load crashed the server. The Worker is now terminated only once the load returns.

Desktop

  • The Mac app gives back the memory of a released model (#430, #431). It kept about 650 MB after every dictation or file job. macOS keeps freed large blocks in a cache unless the process starts with MallocLargeCache=0, so the app now sets it in its bundle, and on a three-job run its memory stays flat at about its size at launch.
  • The same holds when the app starts at login, and for akou serve on a Mac (#434, #433). The login item now sets MallocLargeCache=0, and a server started without it starts itself again once with it, on the same pid.

Behind the scenes

  • Dependencies: libc 0.2.191 and pulseaudio 0.3.2 in the native helpers (#427).

Signed and notarized. The app and the akou command line are signed with a Developer ID and notarized by Apple, so macOS opens them without an extra step, and the microphone and system audio grants should survive updates. Coming from 0.6.0 or older, which were not signed, macOS asks for both grants once more. The speech models are downloaded on first run. See docs/getting-started.md.

What's Changed

  • fix(asr): stop a cancelled job from aborting the server while a model loads by @GeiserX in #429
  • fix(server): stop /healthz saying ok while every job hangs at running by @GeiserX in #428
  • chore(deps): bump the cargo-minor-and-patch group across 1 directory with 2 updates by @dependabot[bot] in #427
  • fix(app): stop macOS keeping 555 MB of a released model in the app's memory by @GeiserX in #430
  • fix(server): stop an idle server holding the dictation lane's Qwen and the boot-warmed live model forever by @GeiserX in #432
  • fix(asr): give model memory back once a job or live session is done with it by @GeiserX in #431
  • fix: stop a cancelled job leaking 2.2 GB, and macOS servers keeping 560 MB, after every release by @GeiserX in #434
  • release: 1.2.4, akou gives its memory back once it is done with a model by @GeiserX in #435

Full Changelog: v1.2.3...v1.2.4