feat: ggml-speech#4 (iOS Metal NULL-safety) + tts-cpp 2026-05-20 (Android dynamic backends)#159
Merged
Merged
Conversation
Picks up the iOS Metal NULL-safety hardening from tetherto/qvac-ext-ggml#10 (PR-10's 3 commits f21ff9a0 + b7dc01c7 + 0f54d9f7) now merged into the `speech` branch as PR-10 merge 08d39f0c. Android backend stack unchanged: GGML_CPU_ALL_VARIANTS=ON + GGML_CPU_REPACK=ON shape introduced in port-version 3 stays. Only the Apple Metal init path changes -- transient `MTLCreateSystemDefaultDevice` / `ggml_metal_library_init` / buffer- alloc failures now surface as a clean `ggml_backend_metal_init: error: Metal device init failed - falling back to CPU` log line + NULL return, instead of crashing inside AGXMetalG17P.bundle with EXC_BAD_ACCESS (observed on iPhone 16 / iOS 26.4 warm relaunches). Co-authored-by: Cursor <cursoragent@cursor.com>
Pulls in the Android dynamic-backend selection landed on tetherto/qvac-ext-lib-whisper.cpp@master via PR #29 (merge 60dc1504, content commit 907f3151): registry-only `init_gpu_backend()` (Adreno 700+ -> OpenCL, every other GPU -> Vulkan / Metal / CUDA), new EngineOptions::backends_dir / opencl_cache_dir fields wired through to `tts_cpp::detail::set_backends_directory` / `tts_cpp::detail::set_opencl_cache_dir`, and the GGML_BACKEND_DL=ON Android CMake defaults so `ggml_backend_load_all_from_path()` discovers per-arch CPU + Vulkan + OpenCL .so files installed alongside the bare module. Also tightens the ggml-speech dependency to `version>=: 2026-04-09#4` so consumers without an explicit constraint of their own pull ggml-speech port-version 4 (PR-10 iOS Metal NULL-safety) instead of the registry baseline #1. tts-cpp's new `init_gpu_backend()` walks the registry blindly and a NULL-from-Metal-init is now handled cleanly thanks to PR-10, so #4 is the lowest version this port is safe against. Co-authored-by: Cursor <cursoragent@cursor.com>
freddy311082
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
tts-cppis behind upstream: The registry still pinstts-cppat2026-05-07#1/f5f914b9, before qvac-ext-lib-whisper.cpp#29 landed Android registry-only backend selection (init_gpu_backend, Adreno tier policy,EngineOptions::backends_dir/opencl_cache_dir,GGML_BACKEND_DL=ONCMake defaults). Consumers cannot pick up that stack via vcpkg until this bump.ggml-speechneeds iOS Metal hardening for registry init: tts-cpp’s newinit_gpu_backend()walks every registered GPU backend, including Metal on Apple targets. Without qvac-ext-ggml#10 (merged as08d39f0con@speech), transientMTLCreateSystemDefaultDevice/ggml_metal_library_initfailures could crash (e.g.EXC_BAD_ACCESSon warm iOS relaunch) instead of returningNULLand falling back to CPU.ggml-speechfloor ontts-cpp:version>=: 2026-04-09#1allows ancient prebuilds that lack both the Android per-arch CPU variant layout (pv3) and the Metal NULL-safety fix (pv4).How does it solve it?
ggml-speech→ port-version 408d39f0contetherto/qvac-ext-ggml@speech(PR-10 merge: iOS Metal NULL propagation throughggml_metal_device_init/ggml_metal_buffer_initand backend registration).GGML_BACKEND_DL=ON,GGML_CPU_ALL_VARIANTS=ON,GGML_CPU_REPACK=ON, Vulkan + OpenCL MODULE.soinstall — only the ggml source revision moves forward from9562ed04.tts-cpp→2026-05-20#060dc1504(Merge pull request #29ontetherto/qvac-ext-lib-whisper.cpp@master; content commit907f3151).ggml-speech >= 2026-04-09#1to>= 2026-04-09#4, so manifest resolutions pull the Metal-safe ggml build this port is validated against.Breaking changes
None for consumers that already rebuild from the registry baseline. Version ordering:
ggml-speech2026-04-09#32026-04-09#4tts-cpp2026-05-07#12026-05-20#0Android installs continue to require staging
libqvac-speech-ggml-*.sonext to the host.baremodule (unchanged since pv3).Consumer impact
@qvac/tts-ggmltts-cpp >= 2026-05-20#0once the registry baseline updates; follow-up PR should wirebackendsDir/openclCacheDirintoEngineOptions(mirror@qvac/transcription-parakeet).@qvac/transcription-parakeetggml-speech#4automatically. Optional follow-up: tighten manifest toggml-speech >= 2026-04-09#4for explicit iOS safety.parakeet-cpp/whisper-cppbenefit fromggml-speech#4on the next vcpkg refresh.