Commit 427a83673 for llama.cpp

commit 427a836734e6a4f9c267c396551ca798c085b649
Author: Aleksander Grygier <aleksander.grygier@gmail.com>
Date:   Fri Nov 20 19:42:49 2026 +0100

    ui: stage Llama Voice's sources for CMake and Docker UI builds (#32680)

    Llama Chat compiles @ggml-org/llama-voice from ui/lib/voice/src, but the
    CMake stage and the Docker UI stages copied only ui/lib/ui, so their npm
    build could not resolve the voice imports. Stage ui/lib/voice/src next to
    Llama UI and track it as an input of the CMake build.

    Assisted-by: Claude (Opus 5.5 Medium)

diff --git a/.devops/cann.Dockerfile b/.devops/cann.Dockerfile
index 83df40950..791b583ca 100644
--- a/.devops/cann.Dockerfile
+++ b/.devops/cann.Dockerfile
@@ -25,9 +25,10 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
-# the app compiles Llama UI from its source next to it
+# the app compiles Llama UI and Llama Voice from their sources next to it
 COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
 COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
+COPY ui/lib/voice/src/ /app/ui/lib/voice/src/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM ${CANN_BASE_IMAGE} AS build
diff --git a/.devops/cpu.Dockerfile b/.devops/cpu.Dockerfile
index e195b5ac8..f63e005ec 100644
--- a/.devops/cpu.Dockerfile
+++ b/.devops/cpu.Dockerfile
@@ -15,9 +15,10 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
-# the app compiles Llama UI from its source next to it
+# the app compiles Llama UI and Llama Voice from their sources next to it
 COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
 COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
+COPY ui/lib/voice/src/ /app/ui/lib/voice/src/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM docker.io/ubuntu:$UBUNTU_VERSION AS build
diff --git a/.devops/cuda.Dockerfile b/.devops/cuda.Dockerfile
index 20501c1be..cf1715d43 100644
--- a/.devops/cuda.Dockerfile
+++ b/.devops/cuda.Dockerfile
@@ -23,9 +23,10 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
-# the app compiles Llama UI from its source next to it
+# the app compiles Llama UI and Llama Voice from their sources next to it
 COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
 COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
+COPY ui/lib/voice/src/ /app/ui/lib/voice/src/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM ${BASE_CUDA_DEV_CONTAINER} AS build
diff --git a/.devops/intel.Dockerfile b/.devops/intel.Dockerfile
index 16326ebbd..0783ef738 100644
--- a/.devops/intel.Dockerfile
+++ b/.devops/intel.Dockerfile
@@ -17,9 +17,10 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
-# the app compiles Llama UI from its source next to it
+# the app compiles Llama UI and Llama Voice from their sources next to it
 COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
 COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
+COPY ui/lib/voice/src/ /app/ui/lib/voice/src/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM docker.io/intel/deep-learning-essentials:$ONEAPI_VERSION AS build
diff --git a/.devops/musa.Dockerfile b/.devops/musa.Dockerfile
index dbf9e0b41..3ae62a676 100644
--- a/.devops/musa.Dockerfile
+++ b/.devops/musa.Dockerfile
@@ -21,9 +21,10 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
-# the app compiles Llama UI from its source next to it
+# the app compiles Llama UI and Llama Voice from their sources next to it
 COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
 COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
+COPY ui/lib/voice/src/ /app/ui/lib/voice/src/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM ${BASE_MUSA_DEV_CONTAINER} AS build
diff --git a/.devops/openvino.Dockerfile b/.devops/openvino.Dockerfile
index c88cc2bbb..fb8cb4c61 100644
--- a/.devops/openvino.Dockerfile
+++ b/.devops/openvino.Dockerfile
@@ -34,9 +34,10 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
-# the app compiles Llama UI from its source next to it
+# the app compiles Llama UI and Llama Voice from their sources next to it
 COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
 COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
+COPY ui/lib/voice/src/ /app/ui/lib/voice/src/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 ## Build Image
diff --git a/.devops/rocm.Dockerfile b/.devops/rocm.Dockerfile
index 9e667660f..ba9e85a0e 100644
--- a/.devops/rocm.Dockerfile
+++ b/.devops/rocm.Dockerfile
@@ -23,9 +23,10 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
-# the app compiles Llama UI from its source next to it
+# the app compiles Llama UI and Llama Voice from their sources next to it
 COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
 COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
+COPY ui/lib/voice/src/ /app/ui/lib/voice/src/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 ### Build image
diff --git a/.devops/vulkan.Dockerfile b/.devops/vulkan.Dockerfile
index dc8a87667..023847628 100644
--- a/.devops/vulkan.Dockerfile
+++ b/.devops/vulkan.Dockerfile
@@ -15,9 +15,10 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
-# the app compiles Llama UI from its source next to it
+# the app compiles Llama UI and Llama Voice from their sources next to it
 COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
 COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
+COPY ui/lib/voice/src/ /app/ui/lib/voice/src/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM docker.io/ubuntu:$UBUNTU_VERSION AS build
diff --git a/.devops/zendnn.Dockerfile b/.devops/zendnn.Dockerfile
index cbc3696ed..e49df81ca 100644
--- a/.devops/zendnn.Dockerfile
+++ b/.devops/zendnn.Dockerfile
@@ -15,9 +15,10 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
-# the app compiles Llama UI from its source next to it
+# the app compiles Llama UI and Llama Voice from their sources next to it
 COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
 COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
+COPY ui/lib/voice/src/ /app/ui/lib/voice/src/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM docker.io/ubuntu:$UBUNTU_VERSION AS build
diff --git a/scripts/ui-assets.cmake b/scripts/ui-assets.cmake
index 90d0bdf33..a3b4f16d7 100644
--- a/scripts/ui-assets.cmake
+++ b/scripts/ui-assets.cmake
@@ -20,10 +20,12 @@ set(LLAMA_UI_GZIP     "" CACHE STRING "Apply gzip compress to assets to save ban
 set(DIST_DIR     "${UI_BINARY_DIR}/dist")
 set(SRC_DIST_DIR "${UI_SOURCE_DIR}/dist")
 # The stage keeps the layout of ui/: the app in apps/chat, with the sources of
-# Llama UI that it compiles next to it in lib/ui (see ui/apps/chat/scripts/llama-ui.js).
+# Llama UI that it compiles next to it in lib/ui (see ui/apps/chat/scripts/llama-ui.js),
+# and those of Llama Voice in lib/voice (see ui/apps/chat/vite.config.ts).
 set(STAGE_DIR    "${UI_BINARY_DIR}/ui-src")
 set(WORK_DIR     "${STAGE_DIR}/apps/chat")
 set(UI_LIB_DIR   "${UI_SOURCE_DIR}/../../lib/ui")
+set(UI_VOICE_DIR "${UI_SOURCE_DIR}/../../lib/voice")
 set(STAMP_FILE   "${UI_BINARY_DIR}/.ui-stamp")
 set(EMBED_STAMP  "${UI_BINARY_DIR}/.ui-embed.sha256")
 set(UI_CPP       "${UI_BINARY_DIR}/ui.cpp")
@@ -356,6 +358,12 @@ function(stage_sources)
         DESTINATION "${STAGE_DIR}/lib/ui/src"
         NO_SOURCE_PERMISSIONS
     )
+
+    # and of Llama Voice, its sources only: they import nothing from outside them
+    file(COPY "${UI_VOICE_DIR}/src"
+        DESTINATION "${STAGE_DIR}/lib/voice"
+        NO_SOURCE_PERMISSIONS
+    )
 endfunction()

 function(npm_build out_var)
diff --git a/ui/apps/chat/sources.cmake b/ui/apps/chat/sources.cmake
index 7e506c0ec..d3daee6c9 100644
--- a/ui/apps/chat/sources.cmake
+++ b/ui/apps/chat/sources.cmake
@@ -5,6 +5,8 @@ set(UI_SOURCE_GLOBS
     static/*
     # Llama UI, which the app compiles from source
     ../../lib/ui/src/lib/*
+    # Llama Voice, also compiled from source
+    ../../lib/voice/src/*
 )

 set(UI_SOURCE_FILES