Skip to content

Releases

Release v1.5.1 - Bazarr uploads without media mounts

Choose a tag to compare

@ventura8 ventura8 released this 17 Nov 11:35
9ab00dd

Release v1.5.1 - Bazarr uploads without media mounts

Summary

Fixes the production failure mode where every Bazarr job returned No audio source provided when media volumes were not mounted and /tmp/whisper was not writable by the service user (Portainer/custom compose with tmpfs size but missing mode=1777).

Media mounts remain an optional zero-copy optimisation. The upload path is the supported default.

Fixes

  • Unwritable TEMP_DIR fallback: startup _temp_dir() falls back to a dedicated whisper-owned directory under whisper-runtime (never bare /tmp), and runtime resolve_temp_dir / get_temp_dir check writability before free space and may select PERSISTENT_TEMP_DIR instead of silently failing materialization.
  • Approved roots for persistent temp: get_approved_roots() includes PERSISTENT_TEMP_DIR so materialized uploads that landed there are accepted.
  • Trust server-materialized uploads: MaterializedUploadPath is used without re-applying the caller-facing approved-roots gate (avoids a crash when re-copying a path we just wrote).
  • Clearer materialization errors: failed upload writes log the real cause instead of collapsing into No audio source provided.

Tests

  • E2E module tests/integration/test_bazarr_upload_without_mounts_e2e.py:
    • Mounts absent: detect-language and ASR with unresolvable video_file, plus unwritable TEMP_DIR fallback.
    • Mounts present: resolvable video_file / local_path win over multipart upload (no materialization, raw-PCM flags cleared, stream alignment on the container).
  • Unit coverage for writability fallback in resolve_temp_dir / get_temp_dir.
  • Compose pin: tmpfs must be /tmp/whisper:size=2G,mode=1777.

Ops note

If you deploy outside the repo compose (e.g. Portainer), keep:

tmpfs:
  - /tmp/whisper:size=2G,mode=1777

size=2G alone is not enough after a compose restart.

Dependency sweep

Full sweep to current releases (no ASR/scheduler behaviour change). Audit-only bumps from the first cut are superseded by this list.

Python

  • App: fastapi 0.163.1, python-multipart 0.0.34, numpy 2.5.5
  • ML: ctranslate2 4.9.0, librosa 1.0.1 + audio-separator 0.48.0 (paired; still uses get_duration(path=...)), transformers 5.23.0, huggingface-hub 2.4.0
  • Dev: pytest 9.2.0, httpx2 2.16.2, ruff 0.17.5, flake8 7.5.0, pylint 4.1.4, check-jsonschema 0.39.0
  • Build: pip 26.3, setuptools 84.2.1 (Poetry 2.5.1 unchanged)

Held deliberately: torch 2.13.0 / torchaudio 2.11.0 / torchvision 0.28.0 (CUDA 13 vs libcublas.so.12 / CTranslate2); vendored braces; cosmiconfig js-yaml on 4.x.

npm

  • Playwright 1.65.1 / MCP 0.0.85, Vitest 5.1.0, stylelint 18.0.0 + config-standard 41.0.0, jsdom 31.0.1, html-validate 11.21.1, globals 17.14.0, eslint 10.15.0, markdownlint-cli2 0.24.1
  • Overrides: markdown-it 15.0.3, minimatch 11.0.9, undici 8.12.4, fast-uri 4.2.3, glob 14.0.6, katex 0.19.1, smol-toml ^1.9.1
  • Global npm in the test image: 12.2.2

Verification

  • Focused Docker pytest: mount helpers, SSD/temp selection, Bazarr wire format, upload-without-mounts e2e — passed.
  • npm audit --audit-level=low and pip-audit (main+dev) — clean after lock refresh.
  • Intel NUC: recreated with tmpfs mode=1777; Bazarr-shaped /detect-language upload without /tv mounts returned language_code=en.
  • UVR path (librosa/audio-separator) should be re-checked on a host with vocal separation before claiming that path validated.

Release v1.5.0 - PARAKEET and CANARY: NVIDIA NeMo Engines

Choose a tag to compare

@github-actions github-actions released this 11 Oct 14:45
e5a8a18

Release v1.5.0 - PARAKEET and CANARY: NVIDIA NeMo Engines

Two new opt-in ASR engines run NVIDIA's NeMo models through onnx-asr: PARAKEET
(Parakeet-TDT-0.6B-v3) and CANARY (Canary-1B-v2). Both cover 25 European languages.
A Whisper companion on ASR_MODEL serves language detection and every other language, so
/detect-language, Bazarr and every other API caller see the same contract as before.
The default engine is unchanged (ASR_ENGINE=AUTO still resolves to FASTER-WHISPER),
and so are the API and the task statuses. Two things change for every engine: the scheduler
now sends idle work to the fastest idle unit kind, and the dashboard's accelerator-load
figure follows where work really runs (see Scheduling and monitoring).


Highlights

PARAKEET and CANARY engines

  • ASR_ENGINE=PARAKEET or CANARY. One engine per hardware unit, like every other
    engine; inside it are the NeMo model and a Faster-Whisper companion.
  • Routing per decode call ([NeMo] route=nemo|whisper reason=... in the log): a
    language outside the model's 25 goes to Whisper, as does a call with no language. NeMo
    models never fail on an unknown language; they quietly transcribe it as the nearest one
    they know, so they are never given one. Translation goes to Canary natively, and to
    Whisper under Parakeet.
  • Decoding by speech region and pause/resume work unchanged. The engines honour
    clip_timestamps, split anything over NEMO_MAX_CHUNK_SEC (20 s) at its quietest point,
    and yield segments a batch at a time, so preemption stops them at the next batch.
  • Timestamps: Parakeet's token times become word timestamps and lines (at most 7 s and
    84 characters). Canary reports no times, so its lines are spread across their chunk by
    length and wrapped at 84 characters.
  • Devices: CUDA, and Intel GPUs through ONNX Runtime's OpenVINO provider; NPU and AMD
    units run the model on the CPU. Providers are always named explicitly, and the startup
    banner reports the one actually in use.
  • Supply chain: NEMO_MODEL can only name a catalog entry, and each entry is pinned to
    one Hugging Face revision. Provisioning downloads it and integrity-checks the result,
    never onnx-asr. The engine checks the pinned files again at load and refuses to start
    without them, so a failed provisioning can never let onnx-asr fetch the repository head.
  • Settings: NEMO_MODEL, NEMO_QUANTIZATION (AUTO = fp32 on accelerators, int8 on
    the CPU), NEMO_MAX_CHUNK_SEC, NEMO_BATCH_SIZE, NEMO_GPU_MEM_LIMIT_MB, and
    NEMO_COMPANION_DEVICE (CPU keeps the companion off a card too small for both). A CUDA
    out-of-memory error at load falls back to the CPU. Mid-decode, a batch that runs out of
    memory is retried one chunk at a time, and a chunk that still does not fit is decoded on
    a CPU copy while the engine stays on the card.

Scheduling and monitoring

  • With several idle units, a task goes to the fastest kind
    (engine_registry.AUTO_DEVICE_PRIORITY). Units of the same kind keep FIFO rotation. This
    matters once one engine drives two vendors: PARAKEET ran 123x real time on a CUDA card
    and 9x on the iGPU beside it.
  • The dashboard counts a NeMo engine's work as accelerator load only where it really runs.
    Language detection on an Intel unit is the CPU-bound companion's work.

Engine evaluation

docs/ASR_ENGINE_EVALUATION.md records the measurements behind keeping FASTER-WHISPER the
default, and the benchmark harness that produced them (tests/real_audio/test_engine_benchmark.py,
scripts/remote_validate.sh --suite bench|codeswitch|longform). On an RTX 5090, Parakeet
decodes about 6.5x faster than Whisper large-v3, at a WER about three points higher on the
matrix clips. Canary sits between them on both. Canary also translates a short foreign line
into the language detection gave its region, rather than transcribing it, which makes it
the weaker choice for code-switched material.

Dependencies

Every dependency without a hardware-backed reason to stay put moves to its current release.

Python fastapi 0.143.0, uvicorn 0.54.0, numpy 2.5.4, tokenizers 0.23.3, openvino / -genai / -tokenizers 2026.4.1, transformers 5.19.0, huggingface-hub 2.2.0, onnx-asr 0.12.0 (new); dev: httpx2 2.13.1, ruff 0.17.0, flake8 7.4.1, pylint 4.1.3, black 26.10.1, isort 9.0.2, check-jsonschema 0.38.2
npm @playwright/test 1.64.0, @playwright/mcp 0.0.83, vitest and @vitest/coverage-v8 5.0.3, eslint 10.12.0, globals 17.13.0, html-validate 11.16.2, jsdom 30.1.2, stylelint 17.16.0; override fast-uri 4.2.2
Build FFmpeg 9.0.2 (signed source, both images), Poetry 2.5.1, npm 12.2.0

Held deliberately: torch 2.13.0 / torchvision 0.28.0 (torch 2.14 needs CUDA 13, which
CTranslate2 cannot load), and the js-yaml override on 4.x (cosmiconfig's API). Checked
against published metadata: openvino 2026.4.1 still declares numpy<2.6.0, and
transformers 5.19.0 accepts huggingface-hub<3.0. huggingface-hub 2.x is a major version;
the only call this project makes, snapshot_download, keeps every argument it passes.


Verification

  • Tests: backend 3069 passed / 0 failed, coverage 97 %, all run in the Docker test
    image. Pylint 10.00/10 on code and tests; Ruff, Radon (rank A), Bandit, ESLint, Markdownlint
    and HTML validation pass, with no inline suppressions.

  • npm audit: clean. GHSA-vfj7-8cjw-p6xm (braces, stack exhaustion from deeply nested
    patterns) affects every published version and has no fix, and reaches this project only
    through the lint tooling (markdownlint-cli2, stylelint). braces is overridden to a
    vendored 3.0.3 that refuses nesting past 64 levels (vendor/npm/braces). It rejects the
    4,900-level input that crashes the original, and will be dropped once upstream releases a fix.

  • RTX 5090 (nvidia build, every engine on cuda:0):

    engine accuracy smoke code-switched long-form
    FASTER-WHISPER 9/9 30/30 30/30 44/44
    PARAKEET 9/9 30/30 30/30 44/44
    CANARY 8/9 30/30 30/30 42/44

    Canary writes "whisperpro" for "Whisper Pro". Its long-form misses are a recurring
    Russian line it mishears, plus the region-language translation described above.

  • After the dependency sweep (RTX 5090, nvidia image rebuilt from the swept tree,
    models re-provisioned through huggingface-hub 2.2.0): FASTER-WHISPER and PARAKEET each
    9/9 accuracy and 30/30 smoke on CUDA.

  • RTX 3080 laptop and Intel NUC (Arc 140T + NPU): PARAKEET and CANARY on CUDA, the Intel
    GPU and the CPU; the shipped INTEL-WHISPER configuration 9/9 (no regression). Details are
    in docs/RELEASE_VALIDATION_PLAN.md.

Release v1.4.3 - Zero SonarQube Issues, and Tag Releases That Publish

Choose a tag to compare

@github-actions github-actions released this 29 Sep 21:28
0ba89f1

Release v1.4.3 - Zero SonarQube Issues, and Tag Releases That Publish

The first release to actually publish since v1.4.0. The v1.4.1 and v1.4.2 tags were cut,
but neither produced images or a GitHub Release: the pipeline's SonarQube step analysed
each tag as a branch, which SonarQube Cloud does not allow on this plan, and the failed
gate check skipped both publish jobs. v1.4.3 fixes that and ships everything those two
tags carried, so their notes apply here too:

  • v1.4.1 (docs/releases/v1.4.1_github_description.md): SonarQube Cloud in the pipeline,
    a dependency sweep, and coverage for scripts/.
  • v1.4.2 (docs/releases/v1.4.2_github_description.md): roughly 660 SonarQube findings
    resolved across the Python modules, scripts, dashboard and tests.

The API contract, the decoding path and the language handling are unchanged.


Highlights

Release Tags Publish Again

A tag run no longer scans the tag. It looks up main's own SonarQube analysis of the
tagged commit, by revision across every page of main's history, and publishes only if
that analysis passed the quality gate. So the gate still guards every release, a tag cut
after main has moved on still finds its own commit's result, and a tag on a commit
main never analysed blocks the release, as it should. A malformed or failed SonarCloud
response is retried rather than crashing the step, and the token travels in a request
header built in Python, never on a curl command line.

No SonarQube Issues, No Duplications

main has no open issues, none marked Accepted or False Positive, and no duplicated
blocks:

  • Log injection (pythonsecurity:S5145): request text no longer reaches the log. The
    task-start line records the requested language only as its canonical code from a fixed
    table, or unrecognized; the warning for an unsupported language says it was dropped
    without echoing it. The language lookup itself moved to languages.supported_code,
    which never logs, so an unsupported language also stops warning twice per request.
  • Downgrade on redirect (shell:S6506): the CUDA and ROCm installer downloads run
    with redirects disabled (wget --https-only --max-redirect=0); the one GitHub release
    asset, which is served through a redirect, is fetched by a Python snippet that refuses
    any hop leaving HTTPS.
  • Unhandled promises (javascript:S9383): the dashboard and analytics pages no longer
    drop a promise. Helpers that handle their own errors are called with void, and the
    history fetch now catches and reports a failure instead of leaving it unhandled.
  • list.extend() (python:S9409) in the startup banner.
  • Float equality (python:S1244): the audio-matrix CLI compares gain with
    math.isclose.
  • Always-true condition (pythonbugs:S2583): the request context's special
    attributes are a table lookup instead of an if-chain that the analysis misread.
  • Duplication: the Linux and macOS PowerShell bootstrappers shared 122 duplicated
    lines (key generation, the BatchMode SSH wrapper, the wait-for-host loop). They now
    dot-source one helper, scripts/remote_setup_common.ps1.

Hardware Validation

Real speech, driven over HTTP against the built image, with per-request device evidence:

  • Intel NUC (Core Ultra 255H): INTEL-WHISPER on the Intel iGPU, vocal isolation on the
    NPU -- accuracy suite 9/9.
  • RTX 3080 laptop with an Intel iGPU: FASTER-WHISPER with vocal isolation on CUDA --
    accuracy suite 9/9.

Results, and what was not run on silicon: docs/validation/v1.4.3/README.md.

Release v1.4.0 - Decoding by Speech Region, and a Language for Every Segment

Choose a tag to compare

@github-actions github-actions released this 13 Sep 13:37
f6699bb

Release v1.4.0 - Decoding by Speech Region, and a Language for Every Segment

Whisper commits to one language per decode window. Left alone that window is 30 seconds of
whatever the VAD compacted together, so on audio that changes language faster than that, the
decoder picks one language for the lot and renders the rest of the window in it.

This release makes the speech region the decode window, decides each region's language
before decoding, and reports the language of each segment rather than only of the file.


Highlights

Segment-First Decoding

ASR_SEGMENT_FIRST (default on, FASTER-WHISPER only) scans for speech regions, detects
the language of each before decoding, groups consecutive regions of one language into runs,
and decodes each language in its own call -- told its language outright, one clip per
region -- so a decode window can no longer span a language change and the decoder is never
left to guess a language from one line. Measured on a 20-minute, 10-language clip that
switches every 7.6 seconds:

before after
windows transcribed in the wrong language 67 / 118 0 / 118
quiet windows filled with invented speech 11 / 25 0 / 25

quiet improving is the same mechanism rather than a second fix. Clips exclude the silence
between them, so the decoder is never handed a silent window to invent speech into.

The runs are what make this safe on the case most libraries are made of: a film in one
language. Measured on 21 real monolingual films, decoding by region with the decoder
re-detecting each clip labelled a median 20% of the speech as another language -- one
line of dialogue is about a second, and language detection on a second of audio is
confidently wrong one time in five, almost always toward a neighbour (Russian as Ukrainian,
Norwegian as Swedish). Grouped into runs, with a block in another language needing 3 s of
confident speech before it counts (SEGMENT_RUN_MIN_SWITCH_SEC), that is 1.1% --
under the 2.7% of whole-file decoding -- and the language reported for a segment is the
language it was decoded in by construction.

Applies to every auto-detected request and to every translation. A translation comes out in
English whatever was spoken, so a language= on it names the main audio, not the output: a
subtitle client that sends the track's language and asks for English gets each scene
translated from the language it was spoken in. Only a transcription with an explicit
language= keeps the single-language path exactly as before -- that language is what the
caller asked to read.

A Language Per Segment

ASR_SEGMENT_LANGUAGES (default on) reports segment_languages per run -- one span per
stretch of speech decoded in one language, plus a span for any gap filled in another -- rather
than one entry for the whole file, and stamps each segment with the language of the span its
midpoint falls in (the file language where none does). No shipped engine offers this --
faster-whisper picks a language per window and never says which -- so it is measured directly,
at one encoder pass per clip, before the clips are grouped into runs.

It is deliberately not gated behind a whole-file "is this multilingual" check. Every such
signal was measured and reads a genuinely code-switching film as monolingual: the sampling
montage takes a handful of windows across two hours and the localised foreign passages fall
between them. Gating on one would label the synthetic fixture and miss every real film.

Force Transcription

ASR_FORCE_TRANSCRIPTION (default off), or force_transcription=true on a request:
one subtitle in the film's language for a film that switches. The runs in the file's
language -- the one the request named, or the detected one -- are transcribed as spoken;
every run in another language is translated into English, the only target Whisper has.
A Romanian film with Turkish scenes, requested as Romanian, comes back as Romanian dialogue
with the Turkish scenes in English, where a plain transcription decoded the Turkish under
the Romanian token into noise. Gaps follow the same rule as the run they sit in. Measured
leg by leg on the six code-switched clips (test_forced_transcription_keeps_the_named_language_and_translates_the_other).

Code-Switched Audio

A file whose two halves are different languages used to come back with one half missing. On
FASTER-WHISPER all six fixtures now return both halves:

clip before after
mix_en_es 0.38 0.75
mix_hi_en 0.31 0.96
mix_zh_en 0.21 0.88
mix_en_fr, mix_de_en, mix_ar_fr one leg each 1.00

A Long-Form Fixture Laid Out From Real Film

The synthetic fixtures had never been measured against the media they stand in for. Doing
so -- the same VAD the suite scores by, over nine excerpts from a real library, numbers only
-- showed the fixtures were wrong on every axis that matters: lines three times too long,
scenes three times too many lines, and a music-and-ambience bed 18 dB quieter than a
real film's, where the score sits 2.6 dB under the dialogue and sometimes above it. Every
quiet number to date was measured against near-silence, a case real media never presents.

longform_film is laid out from those measurements: 40 new one-line clips in short scenes
with a long tail, passages over a minute long, and a synthesized bed at a per-scene level
drawn from the measured range, calibrated by re-measuring until it landed where film has it
(3.4 dB). longform_film_mono is the same layout in one language -- the library's common
case, which no fixture had -- and both carry a new assertion: the language reported for
each line must be the language spoken. Two more are shaped from 54 further excerpts:
longform_film_bookends has a film's opening (105 s of logo and title music before the
first line, on a median film), a long passage inside and its credits (265 s), and
longform_episode a television episode's cold open, a title sequence and tighter scene
gaps -- the longest stretches of loud non-speech the decoder ever sees, which no fixture
had. All run alongside the stress grid and the natural profile; natural and stress are
byte-identical to before.

The film clip earned its place before shipping: it caught the first run design handing the
decoder the passage between two scenes, and the second dropping whole lines from run-sized
windows. Neither showed on the two older fixtures.

Tier-B Content Bars Are Now Enforced

All 78 long-tail language fixtures declared a min_word_overlap that no test read; a
tier-B language could have regressed to gibberish while the suite stayed green. The bar is
now asserted -- as a fraction of the score a flawless transcript can reach, because the
text normaliser replaces combining marks with spaces and fragments the reference in some
scripts: a perfect Tamil transcript scores 0.43, so its declared 0.5 was unreachable. Tier-A
and combined ceilings are all 1.0, so their validated bars do not move.

Bug Fixes

  • Per-window re-detection never ran on the default configuration. The API resolves an
    auto-detected language before transcription unless vocal separation is enabled, so the
    pipeline saw a concrete language and concluded the caller had asked for it. multilingual
    was therefore off for every request on a default install -- the feature shipped in v1.3.0
    worked only with --separation. The caller's intent is now carried explicitly.
  • Gap filling invented speech in the pauses between clips. It rescans at a looser VAD
    threshold than the decode uses, so it treated every deliberately-excluded silence as
    untranscribed speech and re-transcribed it, producing "Thank you very much." and "Bye-bye."
    in the gaps. Decoded spans now count as covered, and a gap is decoded in the language of
    the run it sits in rather than one detected on its own second of audio -- which, on real
    film, re-fractured a Japanese title from 8.7% to 19.9% foreign.
  • On a host with both a CUDA card and an Intel iGPU, every transcription ran on the CPU.
    The scheduler keeps the Intel unit in the pool so vocal isolation can use it, and hands
    out units in rotation. Each auto-detect request runs language detection first: that
    took the CUDA unit and returned it to the back of the queue, so the transcription took
    the Intel unit -- where FASTER-WHISPER has no backend and silently loaded a second model
    on the CPU. Twenty times slower than the card beside it, with the banner reporting CUDA.
    An idle unit the engine can drive is now preferred; the CPU fallback happens only when
    the CUDA unit is genuinely busy, which is the case the pool rule was designed for.
  • vad_filter was passed twice when clips applied -- a TypeError reachable only on that
    path, which no mocked test covered.
  • A priority language detection could deadlock a single-unit host. A transcription
    asked to pause paused where it was -- between two segments, inside the worker stream --
    and kept the worker channel; the detection that had asked for the pause then waited for
    that channel, forever. Measured on the Intel NUC with real Bazarr traffic: one
    /detect-language during a long transcription left 41 requests queued and the health
    check unanswered for seven hours. Present since v1.3.0's isolated workers; this release's
    per-region detection made the window minutes wide on a CPU. A pause now releases the
    worker: region detection runs in chunks with the check between them, a paused decode
    closes its stream and resumes on what is left from the last consumed segment, and a
    pause during an isolated UVR pass cancels the separation and starts it again afterwards
    rather than holding the preprocessing worker.

Known Limitations

WhisperX and OpenAI-Whisper Return One Language Per File

All six code-switched fixtures fail on ...

Read more

v1.3.0

Choose a tag to compare

@github-actions github-actions released this 08 Sep 19:46
6b73cd8

Release v1.3.0 - Process Isolation, Hardware-Independent Engine Selection, and a Real-Audio Validation Layer

This release moves every vendor runtime out of the API process, makes engine selection
independent of the hardware it runs on, and adds the multilingual test corpus and remote
validation tooling that found most of the defects fixed below.

The theme running through it is a single failure mode: a service that reports an
accelerator while quietly running on the CPU.
Several separate instances of that are
fixed here, and the guards added alongside them exist so it cannot happen silently again.


Highlights

Process Isolation (Architecture Change)

Engines and vocal separation now each run in their own worker process, behind a shared
duplex channel (modules/inference/engines/worker_channel.py).

Vocal separation is isolated on supported units only. Pre-Alchemist Intel graphics are the
exception: the UVR worker dies with SIGSEGV on Intel UHD, so isolation is gated on the
OpenVINO-reported GPU generation (isolation_policy.py) and separation stays in-process
there -- which means the crash containment described below does not apply on those hosts.

Three reasons, in order of weight:

  • Device-memory reclamation. Killing a process is the only way to return a
    CUDA/ROCm/OpenVINO context's memory to the OS. In-process teardown reclaims none of it:
    an idle purge logged CUDA VRAM=193 MB -> 193 MB (Delta: +0 MB).
  • Crash containment. A native segfault in CTranslate2, ROCm or the OpenVINO GPU plugin
    used to kill the API process. It now kills one worker, which respawns on the next call.
  • Mutually exclusive runtimes. One interpreter cannot hold a CUDA context and an
    OpenVINO GPU context, nor a CUDA torch build and a ROCm one. Separate processes are the
    only way to run them together — which is what lets a hybrid host drive both cards.

Controlled by ASR_ISOLATE_ENGINES and ASR_ISOLATE_PREPROCESSING (both on by default).
The channel handles generation stamping so a cached handle cannot outlive the worker that
issued it, segment streaming, and cooperative cancellation across the process boundary.

Engine Selection No Longer Depends on the Hardware

  • ASR_ENGINE=AUTO now resolves to FASTER-WHISPER on every host. Previously AUTO
    picked a different engine per accelerator, which made the decoding behaviour — and
    therefore the transcript — a property of whichever machine a request landed on. One
    engine everywhere makes a deployment reproducible across a fleet.
  • HYBRID_ENGINES is off by default and opt-in. On a host with both a CUDA/AMD GPU
    and an Intel GPU/NPU, true runs each unit's native engine in its own worker so both
    accelerators stay busy — at the cost of reintroducing per-unit engine variation.
  • ASR_DEVICE is now aligned with what the engine can actually drive. CTranslate2 has
    CUDA and CPU backends and nothing else, so on Intel or AMD the device is reported as CPU
    rather than naming a device it cannot address. The unit stays in the pool for vocal
    isolation, which reaches it through ONNX Runtime.

Accelerator-specific engines remain available; they are now asked for explicitly
(ASR_ENGINE=INTEL-WHISPER, or OPENAI-WHISPER with the amd-rocm-torch image).

Code-Switched Audio

  • Per-window language re-detection (multilingual=True) for auto-detected requests.
    An explicitly requested language keeps the single-language path, because the flag
    overrides the request and misreports what it returned.
  • Gap-filling re-transcription (modules/inference/runtime/gap_filling.py): speech VAD
    confirms but no segment covers is re-transcribed in its own detected language. Fixes the
    recorded dropped-code-switched-legs defect and, as a side effect, segments stopping short
    of the clip end. Costs one VAD pass and nothing further when there are no gaps.
  • segment_languages is reported per response, so a code-switched file says where each
    language was found.

Bug Fixes

  • Transcripts were being truncated on the way to the client. History truncation mutated
    task_data["result"] in place — the same object the request handler returns — while
    log_completed_task only shallow-copied afterwards. Measured on a 20-minute clip: 169
    segments reaching 1202s were delivered as 100 segments ending at 765s. This had been
    recorded as an ASR "coverage" defect for some time; it was never the ASR.
  • AMD acceleration was silently disabled in every image. ROCm pruning deleted
    librocsolver.so.0, which the ONNX Runtime ROCm provider links directly. ONNX Runtime
    treats a provider that fails to dlopen as merely unavailable — get_available_providers()
    still listed ROCMExecutionProvider while every model ran on the processor.
    scripts/docker/verify_ort_provider_links.sh now fails the build on an unmet provider
    dependency, so this class of fault cannot ship again.
  • OpenVINO reported an NVIDIA card as a plain Intel GPU, which registered it as an
    Intel unit, handed it INTEL-WHISPER, and returned 500 for every request routed there —
    31 failures across the real-audio suite on the full image. Vendor identity now comes
    from DEVICE_ARCHITECTURE's PCI vendor id.
  • The Intel NPU built a pipeline it could not execute. The service started healthy,
    printed ASR Runtime: OpenVINO (NPU), and failed every request. modules/core/device_probe.py
    inspects the OpenVINO IR for dynamic shapes — metadata, not a trial run — and ASR falls
    back to the CPU while the NPU keeps doing preprocessing, which it does run.
  • The ONNX variant was chosen from ASR_DEVICE before ASR_PREPROCESS_DEVICE. On a
    hybrid NVIDIA+Intel host this loaded onnxruntime-gpu, which carries no OpenVINO provider,
    so ASR_PREPROCESS_DEVICE=GPU ran UVR on CPUExecutionProvider while the logs named the
    iGPU — 0.48x against 2.40x, five times slower while claiming acceleration.
  • Runaway decoding on the Intel engine. repetition_penalty (not
    no_repeat_ngram_size, which WhisperGenerationConfig accepts and silently ignores)
    breaks the loop. Applied to greedy decoding only: OpenVINO GenAI rejects it under beam
    search with a hard error, which is the CPU path and the NPU-fallback path.
  • openai-whisper language detection failed on every short slice, because the audio was
    not padded to the encoder's 30-second window before the mel was built. Gap-filling detects
    on sub-second slices, so this recovered nothing on that engine while still returning 200.
  • A full temp volume aborted startup instead of falling back to persistent storage.
  • The inference chip on the dashboard was always a guess. FasterWhisperEngine never
    recorded the device it loaded on, so the isolated proxy had nothing to report and the chip
    fell back to predicting from configuration on the project's most common engine -- with
    isolation on, which is the default. It now reads the device back from the CTranslate2
    handle, which also catches a CUDA request quietly served on the CPU.
  • One transient UVR failure demoted a unit to CPU isolation for the life of the process.
    The CPU-fallback path restored the manager's device fields but not the separator it had
    built, so every later run reused the CPU one -- a performance fault and a reporting one at
    once, since the dashboard honestly reported CPU ever after.
  • VAD_THRESHOLD was ignored on INTEL-WHISPER. The pipeline sends the nested
    vad_parameters dict that faster-whisper's API takes; the Intel engine read only the flat
    names, so the value fell through to a hardcoded 0.35 that matched neither the request nor
    the configured default of 0.5. Intel ran a different VAD sensitivity from every other
    engine.
  • VAD_FFMPEG_TIMEOUT_SEC=0 meant "expire immediately", failing every decode, where the
    only sensible reading is "no limit".
  • A half-provisioned OpenVINO IR cleared the NPU. The probe skipped absent parts, so an
    export with its encoder written and its decoder still downloading inspected clean and
    logged "all statically shaped" on half the evidence. A missing part now counts as
    unverified, and a wholly absent IR is still reported differently from an incomplete one.
  • The Silero VAD checksum matched no artefact at its pinned tag, so the optional
    pre-baking path failed every fetch. Re-derived from the v5.1.2 bytes and verified by
    loading the model and running inference; the constant now carries that provenance.
  • A cancelled batch language detection leaked its worker stream, leaving the worker
    decoding windows into a pipe nobody would read while the channel lock was held to its
    deadline.
  • OpenVINO's DEVICE_ARCHITECTURE was trusted without a vendor id. A string carrying no
    vendor= field was read as Intel and could enable an isolated worker on silicon known to
    segfault in one. Only a confirmed Intel vendor id is now accepted.

Vocal Separation Is Off By Default

Measured on an RTX 5090, two runs per mode, byte-identical:

off on
clean speech overlap 0.9469 0.9469 no gain at all
harder tail languages 0.7994 0.7826 loses 1.7 points
window misses (of 118) 54 55
hallucinated quiet (of 25) 12 10 its one real win
long-form RTF 0.063 0.110 76% slower

76% more compute to remove two hallucinated windows in twenty-five. Still worth enabling
for music-heavy source material, which is not what the corpus represents.

Local-Path Reads Are Reviewable

local_path lets a client name a file for the service to open instead of uploading it, and
which paths are permitted is decided by the approved roots. Those roots include every
non-system bind mount the container has -- whic...

Read more

v1.2.2

Choose a tag to compare

@github-actions github-actions released this 28 Aug 16:54

Release v1.2.2 - WhisperX Process Isolation, CUDA/OpenVINO Conflict Fix, and a Real-Backend E2E Test Layer

This release isolates WhisperX into its own subprocess to resolve a hard dependency-version conflict, fixes a real CUDA/OpenVINO mixed-context crash/hang on Intel iGPU hardware, closes the one remaining gap in dashboard JS test coverage, and adds a second, real-backend Playwright test layer that runs the dashboard, analytics, /docs, and the Bazarr/OpenAI-compatible API against the actual FastAPI app instead of a mock. That real-backend layer surfaced two genuine, previously-undetected bugs, both fixed here.


Highlights

WhisperX Process Isolation (Architecture Change)

  • whisperx is no longer imported in the main service process. WhisperX 3.8.6 hard-pins a torch/torchaudio/torchvision/huggingface-hub stack incompatible with the rest of the application's dependency versions, and that stack cannot be safely reloaded inside one live interpreter.
  • New modules/inference/engines/whisperx_worker.py (child-process entrypoint, spawned via multiprocessing.get_context("spawn") against an isolated install at WHISPERX_LIB_PATH; app __main__ and package inits are spawn-safe so the child does not import the main torch stack before isolation) and whisperx_worker_client.py (parent-side, lock-serialized client that lazily owns the worker; RPC deadline disabled by default via WHISPERX_WORKER_CALL_TIMEOUT_SEC=0) replace direct in-process whisperx.* calls in whisperx_engine.py and diarization.py.
  • ALIGN_POOL/DIARIZE_POOL still track per-hardware-unit handles in the main process; the underlying models now live in the worker. Idle cleanup and unload_models() shut down and respawn the worker to actually reclaim VRAM/RAM, rather than dropping in-process references. A WhisperXWorkerError falls back to unlabeled segments instead of failing the whole transcription.
  • whisperx has been removed from pyproject.toml entirely; it's installed only inside the Dockerfile's isolated /app/libs/whisperx stage.

Bug Fixes

  • CUDA + OpenVINO mixed-context crash/hang on Intel iGPU. Eager per-unit preprocessing-manager construction could poison the CUDA-capable onnxruntime module by initializing an OpenVINO execution provider in the same process. modules/core/config.py now forces PREPROCESS_DEVICE to CUDA whenever DEVICE == "CUDA" and preprocessing would otherwise resolve to GPU/NPU/Intel/OpenVINO; modules/inference/pipeline/preprocessing/__init__.py and provider.py add matching guards (_ensure_openvino_onnxruntime skipped outright on CUDA, on-disk OpenVINO cache dropped for GPU/NPU providers, plus a last-resort _block_openvino_alongside_cuda redirect) so no code path can still trigger the conflict.
  • torch/torchvision import race on startup. UVR's per-request onnxruntime module reload could interleave with torchvision's first import from a request-handling thread, intermittently producing operator torchvision::nms does not exist errors. whisper_pro_asr.py now imports torch/torchvision once, single-threaded, during app startup (_warm_up_torch_stack()) before any request thread can race it.
  • response_format=text / response_format=verbose_json silently downgraded to SRT. The OpenAI-compatible /v1/audio/transcriptions and /v1/audio/translations endpoints only recognized {json, vtt, txt, tsv, srt} for output/response_format; a spec-following client requesting the documented text or verbose_json values got SRT-formatted output instead. modules/api/routes/asr.py now aliases text → txt and verbose_json → json.
  • prompt silently dropped on the OpenAI-compatible endpoints. The official OpenAI SDKs (and any spec-following client) send prompt; the route only ever read initial_prompt, so a caller's prompt was accepted with a 200 and then ignored. prompt is now accepted as an alias, with initial_prompt still taking precedence when both are sent.

Test Coverage — Dashboard JS, Bazarr/OpenAI Contract Research, and a Real-Backend E2E Layer

  • Closed the last dashboard JS coverage gap: modules/monitoring/templates/dashboard/features/audit.js (caller-info panel rendering, JSON normalization, media-path stripping) and features/runtime.js (the updateStats() polling loop: top stats, telemetry buffering, hardware-pool rendering and kind inference) previously had zero unit or e2e coverage. Added tests/js/dashboard_audit.test.js (23 tests) and tests/js/dashboard_runtime.test.js (29 tests).
  • Bazarr wire-format audit against Bazarr's actual source. Read morpheus65535/bazarr's real provider (subliminal_patch/providers/whisperai.py) directly rather than assuming from this repo's own prior test naming. Finding: real Bazarr never sends local_path — it always uploads pre-encoded raw s16le/16kHz/mono PCM as a multipart audio_file, with encode=false, task, language, output=srt, and an optional video_file (caller metadata only). This repo's local_path tests cover a real, intentional optimization this codebase separately supports, but were previously the de facto stand-in for "how Bazarr talks to us" — now re-labeled, and a new TestRealBazarrWireFormat class in tests/integration/test_bazarr_wire_format.py covers the actual multipart/raw-PCM contract.
  • OpenAI /v1/audio/* contract audit against OpenAI's documented API reference. Cross-checked every documented request field (file, model, language, prompt, response_format and all 5 spec values, temperature, timestamp_granularities[], stream) against the route implementation; the two real bugs above were found this way, along with the path-based task-inference logic (/v1/audio/translations forcing task=translate regardless of an explicit task param). ~30 new integration tests added covering the full parameter matrix, alias equivalence across /asr//v1/audio/transcriptions//v1/audio/translations, file vs audio_file field-name precedence, and a local_path access-control/path-traversal test.
  • New real-backend Playwright layer (tests/e2e/real/, npm run test:e2e:real): boots the actual FastAPI app (tests/e2e/real_backend/serve_real_app.py) with only ASR inference and language-detection voting patched to deterministic fakes — routing, history_manager, telemetry_manager, settings persistence, and the auth/admin-key middleware all run for real. 18 tests cover the full task lifecycle (a real /v1/audio/transcriptions submission through active-tasks → history → analytics), the Bazarr multipart wire format, settings persistence, auth (missing/wrong/correct admin key), the /docs Swagger UI (previously only string-asserted at the backend level, never loaded in a browser), and responsive/dark-theme rendering at the dashboard's real CSS breakpoints (768px/600px/480px), none of which any prior e2e spec exercised.
  • This real-backend layer is what surfaced the two response-format/prompt bugs above — bugs invisible to the existing fixture-mock e2e suite, which mocks the backend round trip rather than validating it.
  • Dashboard settings tab rehydrates from the backend on open. Opening Settings calls loadRetentionSettings() which GETs /system/settings and applies TELEMETRY_RETENTION_HOURS / LOG_RETENTION_DAYS to the sliders (and labels). Real-backend e2e asserts the values survive a full-page reload.

Design Gaps Flagged for Follow-Up (Not Implemented This Release)

  • npm run quality:frontend runs the fixture-mock Playwright project but not the new real-backend one; real-backend E2E must run through the Docker test image pipeline (Dockerfile.test target test, or scripts/ci/build-and-test.sh / scripts/ci/build-and-test.ps1, which invoke tests/run_suite.sh with optional SKIP_REAL_E2E=1). Do not run host-side npm run test:e2e:real as a quality gate.

Documentation Accuracy

  • docs/API.md: documented the prompt→initial_prompt and response_format→output aliases (including the text/verbose_json value mappings) and the OpenAI SDK compatibility fields (model, temperature, timestamp_granularities[], stream) that are accepted-but-ignored.
  • docs/ARCHITECTURE.md: added the WhisperX process-isolation explanation to the diarization pipeline section and the two new worker files to the source-tree listing.
  • README.md: documented the new npm run test:e2e:real real-backend Playwright layer alongside the existing fixture-mock npm run test:e2e.
  • .agent/skills/quality/frontend_quality_gates_skill.md: added the real-backend Playwright gate and noted it isn't yet folded into the quality:frontend aggregate script.
  • Audited docs/SETUP.md and docs/DOCKERHUB_DESCRIPTION.md against every production-code change in this release. Found and fixed two real gaps during a follow-up review pass: docker-compose.yml's commented Windows/WSL2 Intel block was missing the pid: host/privileged: true/cap_add/sysfs mounts that docs/SETUP.md's telemetry note already claimed it documented (added them, matching the equivalent docker run flags already shown in SETUP.md); and the HOST_INTEL_RENDER_GID derivation comment (docker-compose.yml, docs/SETUP.md, docs/DOCKERHUB_DESCRIPTION.md) piped stat -c '%g' /dev/dri/renderD* — which can print multiple lines on multi-GPU hosts — into a scalar group_add entry; all three now derive a single GID (| head -n 1, matching the pattern the AMD section already used correctly).
  • docs/SETUP.md's Docker Hub quickstart command unconditionally required /dev/dri//dev/accel and stat-ed /dev/dri/renderD128 directly, which fails outright on NVIDIA/AMD/CPU-only hosts despite the Prerequisites section listing those as supported. Split into a CPU-only default command (works everywhere) and a separate Intel-hardware variant.

Dependency Changes

  • Main: fastapi 0.139....
Read more

v1.2.1

Choose a tag to compare

@github-actions github-actions released this 22 Aug 21:32
42c9006

Release v1.2.1 - Orchestration/Scheduling End-to-End Test Coverage, Two Live Bug Fixes, and Docs Accuracy Corrections

This release closes a full end-to-end test-coverage audit across the seven core orchestration, scheduling, and delivery capabilities: semaphore-backed top-level hardware orchestration with non-locking nested stages, hybrid accelerator assignment, priority preemption, FIFO ordering, the dashboard task timeline, Bazarr-compatible subtitle output, and telemetry. Along the way it fixes two real runtime bugs the new tests uncovered and corrects two places where product documentation overstated what the scheduler and locking layer actually do.


Highlights

Bug Fixes

  • ETA no longer counts down during a preemption pause. speed_status.js was reusing a cached ETA/speed estimate whenever the processed position hadn't changed between polls, which made the remaining-time estimate shrink toward zero as if work continued even while a task sat paused under priority preemption. Estimate reuse is now bounded to a short poll-gap window; beyond it, a fresh calculation runs, correctly lowering the derived speed and growing the ETA while the task is stalled.
  • Crashed/killed tasks no longer show "active" forever on the dashboard. There was no reaping mechanism for task-registry entries left behind by a worker that never reaches normal completion. modules/monitoring/telemetry.py now treats an "active" entry older than a bounded staleness window as a stale ghost and reports it as failed instead of perpetually active.

Test Coverage — New Unit, Integration, and End-to-End Tests

  • Hardware locking: proved scheduler.STATE.model_lock is a single global permit semaphore (not a reentrant/thread-local primitive), with per-unit assignment tracked separately via STATE.hw_pool, and that nested sub-stages avoid re-locking structurally via dedicated non-locking _direct entry points, not via lock re-entry. (tests/inference/runtime/test_concurrency_reentrancy.py)
  • Hybrid accelerator assignment: GPU-side task throughput proven unaffected by continuous load on a separately-assigned unit, and a simulated mid-task device loss on one unit proven not to corrupt a concurrently running task's lock/registry state on another unit. (tests/integration/concurrency/test_e2e_hybrid_split_isolation.py)
  • Priority preemption: a 1.5-second pause-confirmation SLA bound now asserted on the wall clock; all-units-saturated-with-priority-tasks now proven to queue rather than self-preempt; the natural-completion-vs-preemption race forced deterministically via a thread barrier across repeated runs; both preemption wait paths proven to self-heal rather than hang under a simulated worker crash. (tests/inference/scheduler/priority/test_priority_preemption_sla.py, tests/inference/scheduler/priority/test_priority_preemption_self_heal.py)
  • FIFO with priority yielding: start_time tie-break proven non-flaky over 100 repeated runs; clock-skew resubmission proven to dispatch by start_time, not arrival order; a standard task proven not to starve behind 20 sequential priority arrivals; queued-task withdrawal proven not to corrupt remaining order. (tests/inference/scheduler/priority/test_priority_fifo_ordering_regressions.py, tests/integration/concurrency/test_e2e_traffic_volume.py)
  • Dashboard task timeline: introduced a shared JSON ordering fixture consumed by both the Python (_task_sort_key) and JS (_compareTaskOrder, _compareHistoryItems) comparators, closing the risk of the two implementations silently diverging, and proving active→history transitions order by start_time+task_id rather than completion time. (tests/fixtures/task_ordering_fixture.json, tests/monitoring/test_telemetry_loop.py, tests/js/dashboard_main.test.js)
  • Bazarr output formats: added a JSON response schema/contract pin, non-ASCII/CJK/RTL encoding round-trip tests, explicit out-of-order/overlapping timestamp behavior pinning, and a hand-written strict structural SRT/VTT validator standing in for third-party-parser round-trip verification. (tests/unit/test_subtitles_bazarr_contract.py, tests/integration/test_bazarr_integration.py)
  • Telemetry: speed-multiplier and ETA math tested directly against fixtures (including mid-run partial computation and the pause case above); telemetry's reported hardware-unit state now cross-checked against the scheduler's actual internal unit assignment for the same run, closing the risk of the two subsystems drifting apart silently. (tests/js/speed_status.test.js, tests/integration/concurrency/test_e2e_telemetry_ordering.py)

Documentation Accuracy

  • Corrected "Re-entrant Hardware Orchestration ... thread-local locking" language in README.md, docs/DOCKERHUB_DESCRIPTION.md, docs/ARCHITECTURE.md, docs/CONCURRENCY.md, and .agent/skills/runtime/concurrency_orchestration_skill.md to accurately describe the real mechanism: a single global permit semaphore for top-level task dispatch (with per-unit assignment tracked separately via STATE.hw_pool), with nested sub-stages routed through dedicated non-locking _direct entry points instead of re-acquiring the lock.
  • Corrected "Hybrid Split Architecture" language describing per-stage accelerator splitting within a single task to accurately describe what's actually implemented: per-task accelerator assignment, where the scheduler assigns each incoming task as a whole to whichever accelerator fits, and different tasks run concurrently and independently on different accelerators.

Design Gaps Flagged for Follow-Up (Not Implemented This Release)

  • No cancel/withdraw API exists anywhere in the scheduler for a queued-but-not-yet-dispatched task; the withdrawal test simulates it via direct registry removal.
  • Neither preemption wait path has a named wall-clock timeout constant — both self-heal by re-checking task-registry state on a short poll interval instead. Documented as the intended mechanism rather than changed, given the correctness sensitivity of the concurrency code.

Verification

Full Docker-parity CI gate (scripts/ci/build-and-test.sh) run to completion as part of release preparation, real process exit code confirmed via PIPESTATUS (not a tee-masked code):

  • Backend: pytest (with coverage) — 1180 passed, 0 failed. Coverage gate (tests/check_coverage.py, threshold 90%) — 96.04% total coverage, passed.
  • Frontend unit: vitest run tests/js — 105 passed.
  • Frontend E2E: Playwright — 25 passed.
  • Lint/format: Black, isort, Ruff (check + format), Flake8, Pylint — all clean, Pylint 10.00/10.
  • Complexity: Radon cyclomatic complexity, rank-A enforced repo-wide — zero violations.
  • Security/audit: Bandit, pip-audit, gitleaks, npm audit (low threshold) — zero findings.
  • Markdown/inline-ignore policy: markdownlint-cli2, scripts/ci/check-inline-ignores.py — zero violations.

Full scenario-by-scenario audit trail, coverage checklist, and priority rationale: docs/E2E_TEST_PLAN_ORCHESTRATION.md.

v1.2.0

Choose a tag to compare

@ventura8 ventura8 released this 19 Aug 18:22
fb7b186

GitHub Release v1.2.0

🚀 AMD GPU Support & Security Hardening

This release introduces automatic AMD GPU detection and hardware acceleration for UVR vocal isolation via onnxruntime-rocm, enabling heterogeneous dual-GPU pipelines (e.g., UVR on AMD, Whisper ASR on NVIDIA) with full dashboard monitoring support. It also adds a comprehensive defense-in-depth security layer with CORS allowlisting, dual-tier API key authentication, anti-CSRF protection, and model supply chain guarding.


✨ New Features

AMD GPU Hardware Acceleration

  • Automatic AMD Detection: Runtime automatically detects AMD GPUs via /dev/kfd, DRM vendor ID (0x1002), and ONNX Runtime execution provider availability. No manual device override required.
  • Segregated ONNX Runtime: onnxruntime-rocm==1.22.2.post3 is installed under /app/libs/amd, fully isolated from the Intel OpenVINO and CPU ONNX paths.
  • UVR on AMD GPU: Vocal isolation (UVR/MDX-NET) runs natively on the AMD GPU on native Linux ROCm hosts with /dev/kfd. WSL2 /dev/dxg still allows AMD adapter detection in this Linux container, but UVR falls back to CPU there.
  • Whisper ASR CPU Fallback: CTranslate2 does not support ROCm, so Whisper ASR inference automatically falls back to CPU with int8 compute type on AMD units. No manual configuration needed.
  • Dual-GPU Parallel Execution: When both NVIDIA and AMD GPUs are present, the runtime automatically assigns Whisper ASR to NVIDIA CUDA and UVR preprocessing to AMD GPU — leveraging both accelerators simultaneously.
  • AMD Scheduler Unit: AMD GPUs are registered as amd:0 hardware units in the resource pool, eligible for the standard priority queue alongside CUDA, Intel GPU, NPU, and CPU units.

Security & Access Control

  • Defense-in-Depth Security Layer: New modules/api/support/security.py implementing CORS allowlist, API key authentication, anti-CSRF protection, model supply chain guarding, and audit logging.
  • No Wildcard CORS by Default: Cross-origin access is denied unless explicitly configured via CORS_ORIGINS or CORS_ALLOW_ALL=true.
  • Dual-Tier Authentication: Separate API_KEY (general API) and ADMIN_API_KEY (administrative endpoints) with constant-time token comparison.
  • Anti-CSRF Origin Validation: State-modifying admin endpoints require Origin/Referer verification against the request host or CORS allowlist in unauthenticated mode.
  • Model Supply Chain Allowlist: Dynamic model loading validates against standard Whisper models, trusted HuggingFace repositories, and explicit ALLOWED_MODELS entries. Rejects path traversals and arbitrary repositories.

Dashboard AMD Pretty Printing

  • AMD GPU Label: AMD hardware units display as AMD GPU in the dashboard active card, history, and hardware pool.
  • Lightning Bolt Icon: AMD units use the bolt Material Icon (high-performance indicator) instead of the generic memory chip icon.
  • Utilization Charts: AMD GPU utilization tracking added to hardware charts — reports 100% when processing and 0% when idle.

🔧 Changes

Core

  • modules/core/bootstrap.py: Added _detect_amd_hardware, _has_amd_drm_vendor, and dual-GPU path selection logic. AMD targets /app/libs/amd, NVIDIA targets /app/libs/nvidia. When both are detected, AMD path is loaded for ONNX Runtime while CTranslate2 binds directly to NVIDIA CUDA.
  • modules/core/config_helpers.py: Added _update_amd_state — auto-sets prep_device = "AMD" when AMD hardware is detected and MAX_AMD_UNITS >= 1.
  • modules/core/config.py: Added MAX_AMD_UNITS environment variable parsing and AMD unit logging.
  • modules/core/engine_registry.py: Added "AMD" to AUTO_ENGINE_PRIORITY ordering (after CUDA, before Intel GPU).

Inference

  • modules/inference/engines/engine_factory.py: Added float16 → int8 coercion for Whisper/WhisperX engines initializing on CPU slots (AMD units). Extracted _create_whisperx_engine helper to maintain Radon Rank A complexity.

Monitoring & Telemetry

  • modules/monitoring/metrics_discovery.py: Added _resolve_amd_utilization and AMD branch in _resolve_unit_utilization. AMD utilization reports activity-based inference (100% busy / 0% idle) via _probe_activity_fallback. Refactored _resolve_unit_utilization to dictionary dispatch for Radon Rank A compliance.
  • modules/monitoring/templates/dashboard/core/utils.js: Fixed missing const source = id || type; variable declaration in _normalizeHardwareFamily (regression fix). Added AMD family normalization and bolt icon mapping.
  • modules/monitoring/templates/dashboard/features/runtime.js: Added _amdVisual renderer for AMD hardware units.
  • modules/monitoring/templates/dashboard/features/task_filter_history.js: Mapped AMD device type to bolt icon.

Docker & Infrastructure

  • Dockerfile: Added pip install onnxruntime-rocm==1.22.2.post3 --target /app/libs/amd stage (no-deps) for AMD path isolation.
  • docker-compose.yml: Added optional commented device mappings and configurations for NVIDIA (CUDA), Intel (NPU/iGPU/Arc), and AMD (ROCm/DirectML) hardware acceleration. Out-of-the-box configuration runs seamlessly on default CPU environment.
  • docker-compose.wsl.yml: Added WSL2-specific Docker Compose override for Windows 11 DirectX GPU bridge (/dev/dxg) and WSL library mounts.

Tests

  • tests/unit/test_config_amd.py: 83-line AMD hardware detection unit test file covering _detect_amd_hardware, _update_amd_state, AMD scheduler unit registration, and fallback behavior.

Security & Access Control Module

  • modules/api/support/security.py: New defense-in-depth security module implementing CORS allowlist (no wildcard by default), dual-tier API key authentication (API_KEY + ADMIN_API_KEY), anti-CSRF origin/referer verification for unauthenticated admin endpoints, model supply chain allowlisting (is_valid_model_name), device whitelisting, and audit logging for administrative mutations.
  • tests/unit/test_security.py: 289-line security test suite covering CORS resolution, API key verification, admin auth, CSRF origin checks, model allowlist, and audit logging.

Infrastructure

  • docker-compose.wsl.yml: New WSL2-specific Docker Compose override for Windows 11 DirectX GPU bridge (/dev/dxg) and WSL library mounts.
  • .gitattributes: Added line-ending normalization rules for cross-platform consistency.
  • Preprocessing refactor: modules/inference/pipeline/preprocessing/ refactored from single file to subpackage (__init__.py, execution.py, helpers.py, provider.py).
  • modules/inference/pipeline/openvino_provider_dispatch.py: Extended with AMD ROCm/DirectML provider resolution, WSL2 /dev/dxg detection, and dictionary-based dispatch for Radon Rank A compliance.

Documentation

  • README.md: Updated description, hardware matrix, quick start compose, telemetry, and security configuration. Moved project structure tree to docs/ARCHITECTURE.md.
  • docs/ARCHITECTURE.md: Updated silicon header, hardware matrix, transcription flow diagram, hardware interface section, security architecture section, and added full annotated project structure tree.
  • docs/DOCKERHUB_DESCRIPTION.md: Updated description, hardware matrix, quick start, and GPU/NPU Support section.
  • docs/SETUP.md: Replaced "AMD telemetry readiness note" (stating AMD was not supported) with full AMD GPU configuration instructions, device mapping guide, and engine resolution order update.
  • .agent/skills/runtime/amd_hardware_inference_skill.md: Created comprehensive AMD runtime skill documenting ONNX isolation, CPU fallback behavior, docker mapping, and verification procedure.

✅ Verification

Gate Status
Backend tests (908 tests) ✅ Passed
Playwright E2E (21 tests) ✅ Passed
Python coverage ≥ 90% ✅ Passed
JS frontend coverage ≥ 90% ✅ Passed
Pylint 10.00/10 ✅ Passed
Ruff + Flake8 + Black ✅ Passed
Radon Rank A (100%) ✅ Passed
Bandit + pip-audit ✅ No vulnerabilities
npm audit --audit-level=low ✅ No vulnerabilities
Hadolint + ShellCheck + PSScriptAnalyzer ✅ Passed
Live runtime test (NVIDIA + AMD) ✅ NVIDIA ASR used; AMD detected on WSL2 with UVR on CPU

Tested on: Dual-GPU host (NVIDIA GeForce RTX 5090 + AMD Radeon Graphics) under Windows 11 WSL2 Docker Desktop. NVIDIA handled ASR; AMD UVR acceleration requires native Linux /dev/kfd (not available in this WSL2 container).

v1.1.5

Choose a tag to compare

@ventura8 ventura8 released this 14 Jul 20:02
59f9d57

Release v1.1.5 - App CPU Normalization, System Memory Charting, Advanced Live Speed Estimation & Dependency Upgrades

This release introduces dashboard improvements, diagnostic charting, and dependency synchronization.


🚀 Key Improvements & Bug Fixes

📊 App CPU Normalization

  • Normalized Scale: Process CPU usage is now normalized relative to the host CPU core count (psutil.cpu_count() or 1). Both App CPU and System CPU widgets and charts now use the same 0-100% capacity scale.

📈 System Memory in Charts

  • Enhanced Telemetry: Telemetry snapshots now record mem_sys_gb alongside process memory metrics.
  • Unified Visuals: The Memory Allocation chart displays a new series for System Memory (GB) using a dedicated color palette entry, providing a comprehensive view of process vs. host memory pressure.

⏱️ Advanced Live Speed & ETA Estimation (Strategy 2)

  • Active Task Timeline Tracking: Implemented progress snapshot history caching (activeTaskTimeline) in the browser. Task timeline data is automatically pruned to prevent memory leaks.
  • Multi-Stage Progress Deconstruction: Refactored the Speed/ETA algorithm to treat Vocal Separation (UVR) and Whisper Inference (ASR) as distinct stages with unique performance profiles:
    • When UVR is active, the UVR ETA is computed from the live local progress timeline, while the ASR ETA is predicted from historical benchmarks.
    • When ASR is active, UVR is already finished, and ASR ETA is computed from live ASR progress.
    • Fallback logic checks for overall session speed, historical speeds, or default profiles (5x for ASR, 2x for UVR) if no points exist yet.

🛠️ Pinned & Upgraded Dependencies

  • Python Backend: Upgraded python dependencies in pyproject.toml to their latest final versions compatible with PyTorch/ONNX/OpenVINO constraints.
  • JS Frontend: Updated devDependencies in package.json to their latest final versions (Vitest 4, ESLint 10, Stylelint 17, and globals 17). Adjusted code coverage thresholds in vitest.config.cjs to 88% statement coverage.

✅ Python Lint Hardening (CI + Local Parity)

  • Flake8 Added to Lint Gate: CI lint stage and local parity lint paths now enforce Flake8 over modules, whisper_pro_asr.py, tests, and tests/check_coverage.py.
  • Strict Policy Enabled: Flake8 runs with max-line-length=140 and zero ignore directives.
  • Compatibility Fixes Applied: Resolved Ruff/Flake8 slice-formatting conflicts and cleaned test-style violations so Ruff, Flake8, and Pylint pass together.

🌐 Dashboard + Analytics E2E Hardening

  • Mandatory Playwright Coverage: Added deterministic Playwright end-to-end validation for dashboard endpoint filters, user operation flows, analytics page rendering, and charts-tab telemetry behavior.
  • User Scenario Validation: Added E2E coverage for high-value operator actions including refresh pause/resume, settings save, history/telemetry clearing, log download, and analytics JSON export.
  • Analytics Compatibility Guard: Added E2E and fixture validations to confirm analytics detect-language metrics remain visible when legacy isolations keys are present.

📱 Dashboard Mobile & UI Consistency Adaptation

  • Mobile Responsive Design: Added media queries (<768px, <600px, and <480px) to adjust body padding, stack header elements vertically, and configure stats metric cards into a neat 2-column layout.
  • Scrollable Navigation Tabs: Enabled touch-friendly horizontal swipe-scrolling for .tabs to prevent horizontal page overflow while keeping tabs in a single row on mobile screens.
  • Task Badge Overlap & Shrinkage Fix: Replaced absolute positioning of badges with a responsive flexbox wrapping layout that positions the status and language badges side-by-side on the row below the filename. Added min-width and flex-shrink parameters to enable proper filename ellipsis on narrow viewports.
  • Telemetry & Logs Wrapping: Enforced word-break: break-all on log buffers, JSON outputs, and result boxes, and set min-width: 0 constraints on CSS Grid components to prevent any element from causing horizontal overflow.
  • Consistent Live Refresh Dropdown: Redesigned the refresh interval select dropdown into a pill-shaped button matching the app's primary theme, including custom SVG arrow and option styling that respects light/dark modes.

🧪 Full Verification & Validation

  • 609/609 Python Tests Passing: All unit, integration, and performance tests pass successfully.
  • 66/66 JS Tests Passing: All vitest tests pass successfully, achieving 90.08% statement coverage on dashboard_main.js.
  • 94.83% Python Code Coverage: Exceeds the 90% build-gate threshold.
  • Flake8 Gate Passing: Strict Flake8 checks pass with no ignore directives.
  • Perfect Pylint score (10.0/10) on all Python files with zero suppressions.
  • Docker Production Image: Successfully compiled and verified to boot up cleanly with no errors, running Uvicorn and serving healthy status/ASR endpoints on port 9000.
  • Frontend Quality Gate Passing: npm run quality:frontend passes with lint, coverage thresholds, and extended Playwright scenarios.

v1.1.4

Choose a tag to compare

@ventura8 ventura8 released this 08 Jul 14:59
2daf9e3

Release v1.1.4 - Clean Architecture Reorganization, Endpoint-Separated Analytics, Templates Split, Plex AI Subtitle Tagging & Dependency Upgrades

This release introduces a major structural refactoring with a dedicated modules.core package for core runtime modules and elimination of compatibility wrappers, combined with endpoint-separated analytics metrics, modular UI template assets, and dependency upgrades. The HTTP API remains backward compatible, but Python import consumers must migrate to canonical modules.core.* imports.

This release also includes scheduler fairness and observability hardening: same-tier FIFO task acquisition with preserved priority yielding, a deadlock/stuck-state fix for mixed ASR and detect-language bursts on Intel accelerator setups, deterministic dashboard ordering by arrival time, and expanded regression coverage for these concurrency paths.

It also corrects Intel iGPU/Arc utilization reporting in the monitoring charts so saturated Intel GPU load now displays as 100% instead of capping at 99%.

The latest release validation also captured a vocal-separation liveness fix: long UVR preprocessing chunks now expose cooperative yield checkpoints earlier, reducing time-to-pause for queued priority work while keeping pause/resume semantics intact.

Subtitle output now carries Plex-compatible <language>-ai naming so tracks appear as <Language> (AI) in Plex for all transcription and translation languages, and a log-download race condition that caused Firefox to report a download failure has been resolved.


🚀 Key Improvements & Bug Fixes

🏗 Core Module Reorganization (Architecture Refactoring)

  • Dedicated Core Package: Consolidated all core runtime modules (config, constants, utils, logging_setup, bootstrap, subtitles) under a new modules.core sub-package for logical grouping and cleaner namespace management.
  • Eliminated Compatibility Wrappers (Breaking for Python Imports): Removed all top-level wrapper modules that previously re-exported from modules.core; Python code importing modules.config, modules.utils, etc. must switch to canonical modules.core.* paths.
  • Simplified Import Discipline: All application code (~80 files), tests (~25 files), and documentation now use direct imports from modules.core, eliminating the cognitive overhead of dual import paths and potential version mismatches.
  • Priority Test Grouping: Consolidated priority scheduling and preemption tests under a dedicated tests/inference/priority/ sub-package, improving test discoverability and logical organization.

📊 Endpoint-Separated Analytics Metrics

  • Granular Category Tracking: Implemented separate statistics aggregation for /asr requests, /detect-language (represented internally as detectlang), and OpenAI-compatible /v1/audio/... calls.
  • Categorization Engine: Added categorize_task() in history_manager.py to route completed tasks to their corresponding categories using endpoint path triggers, request parameters, or fallback types.
  • Automated Cache Rebuilding: Added rebuild_analytics_from_history() and automated backfilling logic to reconstruct segmented category metrics dynamically from persistent task_history.json logs when loading legacy analytics files on startup.

🎨 Modular UI Asset Split for Analytics

  • Maintainability Refactoring: Deconstructed the monolithic analytics.html dashboard into separate, cohesive components under a dedicated templates directory:
    • templates/analytics.html: Structured HTML markup utilizing dynamic inline replacement tokens.
    • templates/analytics.css: Sleek stylesheet variables and modern adaptive design rules.
    • templates/analytics.js: Unified chart render logic, data formats, and export hooks.
  • Dynamic Inlining Loader: Refactored analytics_ui.py to compile and inline these static assets on-the-fly, matching the modular pattern established for the main system dashboard.
  • Dashboard Enhancements: Added an Endpoint Cumulative Breakdown section with color-coded breakdown cards, custom table columns, and stacked ApexCharts series tracking counts and transcription volumes.

🛠 Dependency Upgrades & CI/CD

  • FastAPI Upgrade: Bumped the minimum FastAPI dependency constraint to >=0.138.0 in pyproject.toml to support the latest web service improvements.
  • Swagger UI Upgrade: Upgraded the offline Swagger UI source asset build target to v5.32.6 inside the Dockerfile to provide the newest interactive API documentation features.
  • Node.js Deprecation Patch: Upgraded peter-evans/dockerhub-description workflow action from v4 to v5 in .github/workflows/ci.yml. This forces the Docker Hub description synchronization runner to target the supported Node.js 24 runtime, eliminating GitHub runner warning logs.

🚦 Scheduler Fairness, Priority Yielding & Dashboard Ordering

  • Same-Tier FIFO Resource Acquisition: Introduced arrival-aware scheduling semantics so tasks only wait behind earlier tasks of the same priority tier that are still waiting for hardware.
  • No False Blocking Behind Active Tasks: Refined has_earlier_task() checks to avoid stalling later tasks behind earlier tasks that already hold a different hardware unit.
  • Priority Behavior Preserved: Detect-language tasks continue to preempt ASR under saturation, while detect-language requests themselves are processed FIFO.
  • Stuck "Waiting for Hardware" Regression Fix: Resolved sequence-specific deadlock/stuck behavior observed in mixed ASR + detect-language bursts on Intel NPU/GPU environments.
  • Deterministic Dashboard Ordering: Active and historical task lists are explicitly sorted by start_time then task_id in both telemetry payload and dashboard rendering.
  • Concurrency Regression Coverage: Added/updated tests in scheduler, priority orchestration, and telemetry ordering to lock in behavior.

🧵 Vocal-Separation Liveness Hardening

  • Early Cooperative Yielding: UVR preprocessing now emits a yield checkpoint at the start of each chunk as well as after completion, so long-running separation work becomes observable sooner by the scheduler.
  • Stage-Aware Pause Confirmation: Pause confirmation skips now avoid unnecessary waiting once the priority backlog has cleared and no detect-language task remains queued.
  • Single-Unit Resume Safety: ASR flows paused during vocal separation resume cleanly once priority work drains, without reintroducing stuck active/waiting states.
  • Thread-Local Progress Isolation: UVR segment progress metrics are now isolated inside thread-local contexts (utils.THREAD_CONTEXT). This prevents concurrently borrowing priority tasks from overwriting or unpatching the standard task's progress wrapper, resolving dashboard freeze bugs on resume.

🧱 Concurrency-First Reliability Hardening

  • Project Priority Policy: Concurrency correctness is now explicitly treated as priority #1 in project and developer documentation.
  • Unit-Scoped Priority Execution: Priority orchestration is enforced as single-permit sequencing per hardware unit to reduce preemption thrash risk under high contention while allowing parallel priority tasks across free units.
  • Cooperative Yielding & Same-Tier FIFO: Integrated cooperative yielding checks and same-tier FIFO ordering to resolve race conditions and enforce strict preemption boundaries.
  • Indefinite Waits with Periodic Logging: Handoff and pause confirmation paths wait indefinitely with periodic logging (every 30 seconds) to survive heavy load, rather than failing on short timeouts.
  • Lock-Safe FIFO Snapshotting: Same-tier FIFO checks were hardened to avoid nested lock-order inversion risk by using snapshot-based reads.
  • Governance and CI Guidance: Agent skills and quality-gate docs were updated to require lock-order review, liveness tests, and synchronized concurrency docs updates for scheduler-impacting changes.
  • Immediate Fallback Release: Priority tasks that fallback-borrow a different unit immediately release their preemption hold on their original target unit. This allows standard tasks on the target unit to resume executing immediately instead of waiting for the priority task to finish on the fallback unit.

🎬 Plex-Compatible AI Subtitle Tagging

  • Smart Subtitle Filenames: All subtitle responses (SRT, VTT, TXT, TSV) are now returned with the filename pattern <source>.<language>-ai.<format> (e.g. movie.en-ai.srt, episode.es-ai.vtt).
  • Plex Display: The -ai regional suffix uses the ISO 3166-1 country code for Anguilla (AI). Plex's regional layout parser maps this to display subtitle tracks as <Language> (AI) — e.g. English (AI), Spanish (AI), French (AI) — for every language and for both transcription and translation tasks.
  • No More xx (Unknown): Previously, unrecognized or plain subtitle filenames would fall back to xx (Unknown) in Plex. The new naming convention guarantees correct language identification at all times.
  • Language Auto-Detection: The language code is resolved from the Whisper inference result, falling back to the user-specified language parameter, ensuring the filename always carries the real detected language — not a hardcoded default.

🌟 Subtitle Word Highlighting

  • Active Word Highlighting: New subtitle_highlight_words parameter renders the currently-spoken word in a distinct highlight color (#E0E0E0) within SRT/VTT blocks, producing a karaoke-style display.
  • Auto-Enables Word Timestamps: Enabling word highlighting automatically activates word_timestamps=true for correct per-word timing data.
  • Speaker-Aware: Highlighting is applied correctly even in diarized output, preserving [SPEAKER_XX]: prefixes.

📣 Configurable Subtitle Promo Card

  • Intro Promo Card: Prepend a config...
Read more