ICU version changes a lot and the runtime version has to match the version built against, so we should go back to bundling a version we build ourselves for now.
Eventually we might consider making packages for various versions of Ubuntu/Debian, but this is the simplest fix
* Fix onnxruntime clash with BackgroundRemoval
* Fix formatting of FetchOnnxruntime.cmake to make the linter happy
---------
Co-authored-by: Tabitha Cromarty <tabby@brightmoon.online>
* Initial plan
* feat: add Flatpak packaging support for obs-localvocal
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
* fix: add disable-submodules: true to CTranslate2 git source in Flatpak manifest
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
* fix: explicitly set OPENBLAS_INCLUDE_DIR and OPENBLAS_LIBRARY for CTranslate2 in Flatpak manifest
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
* fix: correct OPENBLAS_INCLUDE_DIR to include/openblas subdirectory for CTranslate2
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/e3f2f7ef-fbe0-4462-b494-7ec90d19173a
* fix(flatpak): set ACCELERATION env var for obs-localvocal cmake configure
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/be96d349-07f2-4bf2-b6eb-17e6981b2c41
* feat(flatpak): add build.sh to make ACCELERATION configurable at build time
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/1d2428e1-3f26-4138-9bbd-7b1980a798fc
* fix(flatpak/cmake): resolve nvidia build failure - skip OpenCL and use local source
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/de149655-15b1-442a-9a1b-d443ef035fc1
* fix(flatpak/build.sh): replace Python heredoc with pure awk shell substitution
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/8e3820a8-3cb7-41d9-9d3f-87d2fac050c6
* fix(flatpak): pre-populate corrosion source to fix network-blocked sandbox build
cmake/BuildWebVTT.cmake uses FetchContent to clone corrosion-rs/corrosion
at configure time. The Flatpak sandbox blocks network access, causing the
clone to fail with "Could not resolve host: github.com".
Fix: add corrosion v0.5 as a pre-downloaded manifest source (dest: corrosion-src)
so flatpak-builder fetches it before entering the sandbox, and point CMake's
FetchContent at the pre-populated directory via FETCHCONTENT_SOURCE_DIR_CORROSION.
Also quote the ACCELERATION variable comparisons in BuildWhispercpp.cmake
for safer string comparison style.
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/65942026-4cfd-4684-92be-626897d87509
* fix(flatpak): add Rust SDK extension and vendor cargo dependencies for offline build
After the corrosion network-clone fix, the next error was:
rustc not found in PATH or /root/.cargo/bin
The Flatpak sandbox has no network access, so the Rust toolchain must be
provided via an SDK extension, and all cargo crate dependencies must be
pre-downloaded by flatpak-builder (before the sandbox starts).
Changes:
- flatpak/com.obsproject.Studio.Plugin.LocalVocal.yaml:
* Add sdk-extensions: org.freedesktop.Sdk.Extension.rust-stable//24.08
(KDE SDK 6.8 is based on freedesktop SDK 24.08; this provides rustc/cargo
at /usr/lib/sdk/rust-stable/bin)
* Add append-path for the Rust bin dir to obs-localvocal build-options
* Add CARGO_HOME=/run/build/obs-localvocal/cargo to env so cargo reads the
vendor config and locates the pre-populated crate archives
* Add inline source creating cargo/config.toml that redirects crates-io to
the pre-vendored directory (absolute path, avoids network)
* Reference new cargo-sources.json for the 67 crate archives
- flatpak/cargo-sources.json (new):
Generated by flatpak-cargo-generator from
deps/c-webvtt-in-video-stream/Cargo.lock.
134 entries (67 archives + 67 .cargo-checksum.json inlines).
The auto-generated cargo/config entry is removed since the manifest
provides a correct config.toml with an absolute vendor path instead.
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/a70f729f-6724-4ef8-9aab-3a54344fda02
* fix(flatpak): use base-extensions to mount rust-stable at branch 24.08
sdk-extensions always resolves extension branches from the SDK branch (6.8),
so org.freedesktop.Sdk.Extension.rust-stable//24.08 was turned into
org.freedesktop.Sdk.Extension.rust-stable//24.08/x86_64/6.8 - a ref that
does not exist.
Replace sdk-extensions with base/base-version/base-extensions:
base: org.freedesktop.Sdk
base-version: "24.08"
base-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
base-extensions resolves extension branches from base-version (24.08),
matching the only existing branch of the rust-stable extension.
KDE SDK 6.8 is itself built on org.freedesktop.Sdk//24.08, so using
that runtime as the base is fully compatible.
Local prerequisites:
flatpak install flathub org.freedesktop.Sdk//24.08
flatpak install flathub org.freedesktop.Sdk.Extension.rust-stable//24.08
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/a0eabff0-15c4-45be-b38b-0ada230bc17e
* fix(flatpak): install Rust toolchain as a module to avoid SDK branch mismatch
Remove base/base-version/base-extensions (the previous fix that caused
app/org.freedesktop.Sdk/x86_64/24.08 not installed because `base` resolves
refs as apps, not runtimes).
The underlying problem is that sdk-extensions always inherits the SDK branch
(6.8), but org.freedesktop.Sdk.Extension.rust-stable only exists at branch
24.08. There is no standard flatpak-builder mechanism to override the branch
for sdk-extensions.
Add a rust-toolchain module that installs Rust 1.89.0 directly to
/usr/lib/sdk/rust-stable/ using the same source (URL + SHA256) as
org.freedesktop.Sdk.Extension.rust-stable//24.08 on Flathub.
Benefits:
- Keeps sdk: org.kde.Sdk//6.8 (Qt6 headers remain available for ENABLE_QT=ON)
- No change needed to obs-localvocal build-options (append-path and CARGO_HOME
continue to work as-is)
- Files installed to /usr/ are build-environment-only, NOT exported in the
final extension package (prefix: /app/plugins/LocalVocal/)
- No manual flatpak install of any extension required before building
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/ecb4889b-352f-44a8-a681-0dc164fc4493
* fix(flatpak): install Rust toolchain under writable /app prefix, not read-only /usr
In a build-extension: true flatpak sandbox, /usr/ is the SDK mount and
is read-only. The previous iteration used --prefix=/usr/lib/sdk/rust-stable
which caused:
touch: cannot touch '/usr/lib/sdk/rust-stable/lib/rust-install-probe':
Read-only file system
Fix by installing to /app/plugins/LocalVocal/rust-toolchain instead, which
is inside the extension's writable overlay. Three changes:
1. rust-toolchain module: change --prefix to /app/plugins/LocalVocal/rust-toolchain
2. obs-localvocal build-options: update append-path accordingly
3. cleanup: add /rust-toolchain so the ~300 MB toolchain is stripped from
the final extension package (cleanup runs after all modules are built,
so rustc/cargo are available during the obs-localvocal build)
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/f844f598-0354-4a77-9ec7-3334d1485cd9
* fix(flatpak): add opencl-headers module and pre-bundle whispercpp prebuilt binary
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/b191ba1a-bad6-47a4-9b34-2fc1a738d919
* fix(flatpak): replace USE_SYSTEM_ONNXRUNTIME with FetchContent pre-bundle
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/23e8f01e-2866-404d-a181-d195b86406cf
* fix(flatpak): bypass ExternalProject git-clone failures for CTranslate2 and SentencePiece
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/eee2c356-902f-405a-b4c6-a976caa6c1bc
* fix(flatpak): fix post-install cpu_features path for builddir:true layout
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/fc306650-14f7-4a09-abc5-a84e083d6cda
* fix(flatpak/patches): fix malformed patch hunk headers — wrong line numbers and new-line count
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/06b4f42a-13b0-4d97-bc72-05737c028b7f
* fix(flatpak): prepend /app/lib to LD_LIBRARY_PATH so uic can find libicui18n.so.77
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/f3efa268-b29a-4ba5-9aea-1e1d816d8933
* fix(flatpak): add cmake-level uic wrapper to robustly fix libicui18n.so.77 error
cmake AutoUIC spawns /app/libexec/qt/uic as a child of ninja via
`cmake -E cmake_autogen`. LD_LIBRARY_PATH set by flatpak-builder's
prepend-ld-library-path may not propagate reliably through that
subprocess chain.
Add a thin uic-wrapper shell script module that hard-codes /app/lib
into LD_LIBRARY_PATH before exec-ing the real uic binary. cmake 3.14+
respects CMAKE_AUTOUIC_EXECUTABLE to override uic discovery; point it
at the wrapper so AutoUIC always uses the wrapper regardless of how
flatpak-builder sets up the environment.
Keep prepend-ld-library-path: /app/lib as belt-and-suspenders.
Add /uic-wrapper to cleanup so it is not shipped in the final package.
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/1af4d028-aa0b-4b05-a94d-90c8d636241b
* fix(flatpak): stage ICU 77 libraries at build time so uic-wrapper finds them
Root cause: /app/lib does NOT contain libicui18n.so.77 in the extension
build sandbox (OBS Studio may store ICU elsewhere, or the path is not
in the default dynamic-linker search path). Setting LD_LIBRARY_PATH to
/app/lib therefore never helped.
New approach in the qt-uic-wrapper module:
1. At module-build time, locate the three ICU 77 .so files by checking
six common installation directories (fast path) and falling back to
a depth-limited `find` search. Fail loudly if any library cannot
be located so the problem is immediately visible.
2. Copy the found libraries (dereferencing symlinks with cp -L) into
${FLATPAK_DEST}/icu-for-uic/ — a writable path inside our extension
prefix that is guaranteed to exist when obs-localvocal later builds.
3. Rewrite the wrapper to use `export LD_LIBRARY_PATH` (not `exec env
VAR=...`) and point at /app/plugins/LocalVocal/icu-for-uic.
Remove the now-unnecessary prepend-ld-library-path: /app/lib from
obs-localvocal build-options; add /icu-for-uic to cleanup.
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/c0ad4a75-639b-46db-a6fe-97f8ca13bc67
* fix(flatpak): use SDK's uic when available; ICU shim uses any version as fallback
The previous attempt staged libicui18n.so.77 copies but find returned nothing
because the library genuinely does not exist anywhere in the extension build
sandbox. Root cause: OBS Studio's uic requires libicui18n.so.77, but the
extension sandbox only mounts the SDK (/usr), not the OBS app's private ICU.
New strategy in qt-uic-wrapper:
Step 1 (primary): locate the KDE Platform SDK's own uic binary in /usr.
The SDK ships Qt 6.8 including uic, linked against the SDK's ICU. It has
no unsatisfied dependencies. Common paths checked first (fast), then a
broader find /usr fallback. If found, write a one-line wrapper with no ICU
setup needed at all.
Step 2 (fallback, only if no SDK uic exists): use OBS Studio's uic at
/app/libexec/qt/uic with an ICU shim. Instead of searching only for
.so.77, search for ANY version of libicuXXX in the SDK (/usr), stage it
as .so.77, and keep a copy under the original name so intra-ICU DT_NEEDED
entries (e.g. libicuuc.so.74) also resolve from our staging dir.
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/502a8cf1-54ef-466d-b500-a1642ca1e11f
* fix(flatpak): always set LD_LIBRARY_PATH=/app/lib in uic wrapper; fix ICU .so.77.1 detection
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/ff0038ad-dbc2-4c9b-acff-f995229274e6
* fix(flatpak): use for-loop glob for ICU detection; guard uic path against shell injection
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/ff0038ad-dbc2-4c9b-acff-f995229274e6
* Fix flatpak uic: lazy-stage ICU 77 in wrapper, no /app/lib in LD_LIBRARY_PATH
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/5e50645b-1a3f-4437-9a15-b9666fb90e5d
* flatpak: uic-wrapper searches SDK /usr/lib* paths first for ICU 77
Co-authored-by: FlorentPoinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorentPoinsaut/obs-localvocal/sessions/9665b858-6bf0-4b37-b496-1de0faff41b7
* Fix ICU compatible version + doc
* Use org.freedesktop.Sdk//25.08
* Use local dir for localvocal in flatpak and remove cmake patches
* Get dep with archive in flatpak
* Add DICU_HASH_OVERRIDE
* Fix cmake format
* Fix bis cmake format
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* Make multiple MacOS variants targeting different Metal versions
Different MacOS versions support different maximum Metal versions. As we build on MacOS 14, it's
likely that when embedding the Metal shaders into the Metal backend they're being built for
Metal 3.1, the maximum supported version on MacOS 14. This may be why users are seeing crashes
when trying to use Metal on older versions of MacOS
This will also allow users of MacOS 15 and newer to take advantage of improvements from Metal 3.2
* Fix checking incorrect env var for MacOS version
* Update Whispercpp deps to 0.0.12
Updates Vulkan on Windows to 1.4.328.1 and fixes ROCm/HIP by building for all available GPU architectures
* Reorder acceleration options alphabetically for Windows and Linux
Makes life easier when updating checksums for whisper deps updates
* Update Whisper.cpp and add Linux acceleration (source builds only)
Update Whisper.cpp from v1.6.2 to v1.8.1
Supported Linux acceleration methods:
* CUDA
* hipblas
* Vulkan
* OpenCL
If suitable development libraries are installed for any of the above when building from source, then support for them
will be built into both whisper.cpp and the LocalVocal plugin
* Test behaviour with combinations of multiple backends
* Use found dependencies to decide which acceleration features to enable
Also try to build Whispercpp from source on Windows with acceleration (not working)
* Add GPU device selection option in plugin settings
Allows the selection of which GPU backend to use if more than one is
available, as well as disabling GPU backends in case the only
available ones don't work or are somehow slower than the CPU alone
* Add OpenCL support for Linux source build
* Comment out seemingly unused DISABLE_ONNX_RUNTIME_GPU option
* Update prebuilt Whisper deps to 0.0.9 (Whisper 1.8.2) and refactor cmake file
* Handle new GGML IGPU device type
* Bump whisper deps to 0.0.9-1 to fix hipblas
* Try to avoid running apt in CI when packages are cached
* Add option to enable/disable flash attention
* Install Vulkan SDK properly for CI build and try adding OpenCL and hip dev libs
* Build with shared libs on linux and allow use of dynamic backends
* Update deps to 0.0.10 (runtime module linking/importing is likely broken)
* Update deps to 0.0.10-2; try to fix linking & other platform specific issues
* Bump version number to 0.5.0
* Fix Ubuntu packaging
* Fix dynamic linking on MacOS
* Update README
* Cleanup CMake files a bit and make prebuilt build on Linux the default over full source build
* Fix Linux full source build
* Download CoreML models on MacOS if possible
When using CoreML with Whispercpp, it needs additional encoder models so attempt to download the appropriate model and
symlink it to the location where whisper expects it to be
* Try fix windows build
* Remove erroneous entry in models registry
* Try caching ICU build prefix to speed up CI times
* Don't bother with Linux ICU cache
The Linux build spends most of its time installng packages with apt not building ICU
* Reduce ICU cache size by not including src dir
* Try caching linux apt packages
* Find cached ICU correctly
* Use specific version of cache-apt-packages-action
* Format CMakeLists.txt
* Fix checking of find_library vars
* Empty commit to check improved build times after caching
* Add qt base dev packages to cached CI packages
* Fix crash when using translations with buffered output
When using buffered output with the output type set to character, split strings by unicode characters instead of bytes
to avoid causing a crash by trying to send invalid UTF-8 strings to the text output source
* Windows has to be special v.v
* Update buffer thread output sources when changed
* Format
* Fix local translation being overwritten by transcription
* Refactor
* Make custom translation API placeholders match default config
* Clear translation text sources when changed
* Format code
* Add token buffer thread for cloud translations
* Temporarily disable buffered output for translations
It causes a crash v.v
* Enable some CT2 backends on Linux
* Might as well enable OpenBLAS for whisper too
* Format cmake files
* Update README to add info about OpenBLAS now being a required dependency
* Fix OpenBLAS dependencies and linking for Ubuntu package