From 31672de8768bf5f22b5c9567b221b7c6e3ae430a Mon Sep 17 00:00:00 2001 From: mudler <2420543+mudler@users.noreply.github.com> Date: Wed, 12 Aug 2026 20:16:31 +0000 Subject: [PATCH 1/4] :arrow_up: Update NVIDIA/NeMo-Speech.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- backend/go/nemo-speech-cpp/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/go/nemo-speech-cpp/Makefile b/backend/go/nemo-speech-cpp/Makefile index 9ec3431492ec..9a22843bba9b 100644 --- a/backend/go/nemo-speech-cpp/Makefile +++ b/backend/go/nemo-speech-cpp/Makefile @@ -12,7 +12,7 @@ # runs 'make -C backend/go/$(BACKEND) build' and then copies package/), so it # has to produce the binary and the package, not just the shared libraries. -NEMO_SPEECH_VERSION?=2e12e2def8a98ed06666f7ee3ca94e7193e04be4 +NEMO_SPEECH_VERSION?=9bc876635af36df537d9bc6d3f57ad1b76e4f74a NEMO_SPEECH_REPO?=https://github.com/NVIDIA/NeMo-Speech.cpp GOCMD?=go From 0c81d0ee3290eca70ac0f4b4750372fb3f6b489e Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Date: Sun, 9 Aug 2026 23:09:08 +0000 Subject: [PATCH 2/4] fix(nemo-speech-cpp): build required sentencepiece The updated runtime uses SentencePiece for RNNT context biasing even when Flashlight and text normalization are disabled. Build upstream's pinned static archive before configuring the engine so every backend variant has the newly required library and headers. Assisted-by: Codex:gpt-5 --- backend/go/nemo-speech-cpp/Makefile | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/backend/go/nemo-speech-cpp/Makefile b/backend/go/nemo-speech-cpp/Makefile index 9a22843bba9b..cbd67c87c2a9 100644 --- a/backend/go/nemo-speech-cpp/Makefile +++ b/backend/go/nemo-speech-cpp/Makefile @@ -88,6 +88,18 @@ ITN_LIB_DIR=$(ITN_PREFIX)/lib ITN_MARKER=$(ITN_LIB_DIR)/libsparrowhawk.so ITN_FST_HEADER=$(ITN_PREFIX)/include/fst/fst.h +# SentencePiece became a core ASR dependency in 5be7bfb: RNNT context biasing +# uses it even when Flashlight and text normalization are disabled. Build the +# pinned static archive provided by upstream so every platform gets the same +# dependency instead of relying on an undeclared system package. +SENTENCEPIECE_PREFIX=sources/NeMo-Speech.cpp/.deps/sentencepiece +SENTENCEPIECE_MARKER=$(SENTENCEPIECE_PREFIX)/lib/libsentencepiece.a + +# Linux's ASR CMake block looks in NEMO_SPEECH_DEPENDENCY_PREFIX directly, but +# the Apple branch uses generic find_library()/find_path(). Put the same private +# prefix on CMake's search path so Darwin consumes the archive built above too. +CMAKE_ARGS+=-DCMAKE_PREFIX_PATH=$(abspath $(SENTENCEPIECE_PREFIX)) + ITN_CC?=gcc-12 ITN_CXX?=g++-12 @@ -152,7 +164,7 @@ else endif CMAKE_ARGS+=-DNEMO_SPEECH_GGML_PATCHED=$(GGML_PATCHED) -.PHONY: nemo-speech-cpp-grpc package build clean purge test all stage-libs patch-ggml engine itn patch-itn-headers +.PHONY: nemo-speech-cpp-grpc package build clean purge test all stage-libs patch-ggml engine itn sentencepiece patch-itn-headers all: nemo-speech-cpp-grpc package @@ -266,11 +278,17 @@ patch-itn-headers: itn: $(ITN_MARKER) +$(SENTENCEPIECE_MARKER): | sources/NeMo-Speech.cpp + cd sources/NeMo-Speech.cpp && JOBS=$(JOBS) scripts/build_sentencepiece_static.sh + +sentencepiece: $(SENTENCEPIECE_MARKER) + # Only a WITH_NORM=ON build needs the ITN stack, and it must exist before cmake # configures, since the WITH_NORM cmake block find_library()s into the prefix # with REQUIRED. +NEMO_RUNTIME_PREREQS=$(SENTENCEPIECE_MARKER) ifeq ($(WITH_NORM),ON) -NEMO_RUNTIME_PREREQS=$(ITN_MARKER) +NEMO_RUNTIME_PREREQS+=$(ITN_MARKER) endif # Upstream sets CMAKE_LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_BINARY_DIR}/bin, so the From 18bbfe7097a563fe1799eab3a557c4abb044cacf Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Date: Thu, 13 Aug 2026 00:05:46 +0000 Subject: [PATCH 3/4] fix(nemo-speech-cpp): support BSD install The pinned SentencePiece helper uses GNU install's -D option. macOS ships BSD install, so the Darwin backend exits after compilation. Create the license directory and remove the unsupported option before the helper runs on Darwin. Assisted-by: Codex:gpt-5.6 [Codex] --- backend/go/nemo-speech-cpp/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/go/nemo-speech-cpp/Makefile b/backend/go/nemo-speech-cpp/Makefile index cbd67c87c2a9..bb56326a1451 100644 --- a/backend/go/nemo-speech-cpp/Makefile +++ b/backend/go/nemo-speech-cpp/Makefile @@ -279,6 +279,13 @@ patch-itn-headers: itn: $(ITN_MARKER) $(SENTENCEPIECE_MARKER): | sources/NeMo-Speech.cpp + # The pinned helper uses GNU install's -D option, which BSD install on macOS + # does not support. Create the directory explicitly and keep the helper's + # four license installs otherwise unchanged. +ifeq ($(shell uname -s),Darwin) + mkdir -p $(SENTENCEPIECE_PREFIX)/share/licenses/nemo-speech/third_party/sentencepiece + sed -i.bak 's/install -Dm0644/install -m 0644/' sources/NeMo-Speech.cpp/scripts/build_sentencepiece_static.sh +endif cd sources/NeMo-Speech.cpp && JOBS=$(JOBS) scripts/build_sentencepiece_static.sh sentencepiece: $(SENTENCEPIECE_MARKER) From 16dbd6c00f36d81258de94a8db2c431da90ee2ea Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Date: Thu, 13 Aug 2026 02:04:10 +0000 Subject: [PATCH 4/4] fix(nemo-speech-cpp): support CMake 4 Homebrew CMake 4 rejects the pinned SentencePiece project because it requests compatibility below version 3.5. Pass the supported policy floor when Darwin runs the upstream helper. Assisted-by: Codex:gpt-5.6 [Codex] --- backend/go/nemo-speech-cpp/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/go/nemo-speech-cpp/Makefile b/backend/go/nemo-speech-cpp/Makefile index bb56326a1451..7eac899dfeb8 100644 --- a/backend/go/nemo-speech-cpp/Makefile +++ b/backend/go/nemo-speech-cpp/Makefile @@ -284,7 +284,10 @@ $(SENTENCEPIECE_MARKER): | sources/NeMo-Speech.cpp # four license installs otherwise unchanged. ifeq ($(shell uname -s),Darwin) mkdir -p $(SENTENCEPIECE_PREFIX)/share/licenses/nemo-speech/third_party/sentencepiece - sed -i.bak 's/install -Dm0644/install -m 0644/' sources/NeMo-Speech.cpp/scripts/build_sentencepiece_static.sh + sed -i.bak \ + -e 's/install -Dm0644/install -m 0644/' \ + -e 's/-DCMAKE_BUILD_TYPE=Release \\/-DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \\/' \ + sources/NeMo-Speech.cpp/scripts/build_sentencepiece_static.sh endif cd sources/NeMo-Speech.cpp && JOBS=$(JOBS) scripts/build_sentencepiece_static.sh