]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
Provide patched whisper-talk-llama
authorMathieu Baudier <redacted>
Wed, 22 Jan 2025 08:04:36 +0000 (09:04 +0100)
committerMathieu Baudier <redacted>
Wed, 22 Jan 2025 08:04:36 +0000 (09:04 +0100)
debian/control
debian/patches/0002-talk-llama-use-library.patch [new file with mode: 0644]
debian/patches/series

index cd9b17a0f3d32ac25e356c95f24e366318175c7b..f17ab4c1306858117d3d1e6f3992f23018904951 100644 (file)
@@ -48,15 +48,16 @@ Depends: ${shlibs:Depends},
 Description: Inference of Whisper in pure C/C++ (stream)
  Whisper.cpp inference of Whisper in pure C/C++ (stream).
 
-#Package: whisper-cpp-talk-llama
-#Architecture: any
-#Priority: optional
-#Depends: ${shlibs:Depends},
-# libwhisper, libllama,
-# espeak-ng,
-# libsdl2-2.0-0, libswresample4, libavcodec59, libavformat59, 
-#Description: Inference of Whisper in pure C/C++ (talk-llama)
-# Whisper.cpp inference of Whisper in pure C/C++ (talk-llama).
+Package: whisper-cpp-talk-llama
+Architecture: any
+Priority: optional
+Depends: ${shlibs:Depends},
+ libwhisper, libllama,
+ espeak-ng,
+ libswresample4, libavcodec59, libavformat59,
+ libsdl2-2.0-0
+Description: Inference of Whisper in pure C/C++ (talk-llama)
+ Whisper.cpp inference of Whisper in pure C/C++ (talk-llama).
 
 Package: whisper-cpp-dev
 Architecture: any
diff --git a/debian/patches/0002-talk-llama-use-library.patch b/debian/patches/0002-talk-llama-use-library.patch
new file mode 100644 (file)
index 0000000..e308bf2
--- /dev/null
@@ -0,0 +1,49 @@
+From: Mathieu Baudier <mbaudier@argeo.org>
+Date: Wed, 22 Jan 2025 09:01:06 +0100
+Subject: talk-llama-use-library
+
+Use llama.cpp library to build whisper-talk-llama.
+---
+ examples/CMakeLists.txt            |  2 +-
+ examples/talk-llama/CMakeLists.txt | 11 +++--------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
+
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index 6435959..5d66015 100644
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -110,7 +110,7 @@ else()
+     if (WHISPER_SDL2)
+         add_subdirectory(stream)
+         add_subdirectory(command)
+-        #add_subdirectory(talk-llama)
++        add_subdirectory(talk-llama)
+         #add_subdirectory(lsp)
+         if (GGML_SYCL)
+             #add_subdirectory(sycl)
+diff --git a/examples/talk-llama/CMakeLists.txt b/examples/talk-llama/CMakeLists.txt
+index ce51660..829c4f6 100644
+--- a/examples/talk-llama/CMakeLists.txt
++++ b/examples/talk-llama/CMakeLists.txt
+@@ -1,18 +1,13 @@
+ if (WHISPER_SDL2)
+     set(TARGET whisper-talk-llama)
+-    add_executable(${TARGET} talk-llama.cpp
+-        llama.cpp
+-        llama-vocab.cpp
+-        llama-grammar.cpp
+-        llama-sampling.cpp
+-        unicode.cpp
+-        unicode-data.cpp)
++    add_executable(${TARGET} talk-llama.cpp)
+     target_include_directories(${TARGET} PRIVATE ${SDL2_INCLUDE_DIRS})
+     if (WHISPER_CLBLAST)
+         set(CLBLAST_LIBNAME clblast)
+     endif ()
+-    target_link_libraries(${TARGET} PRIVATE common common-sdl whisper ${SDL2_LIBRARIES} ${CLBLAST_LIBNAME} ${CMAKE_THREAD_LIBS_INIT})
++    target_link_libraries(${TARGET} PRIVATE common common-sdl whisper llama ${SDL2_LIBRARIES} ${CLBLAST_LIBNAME} ${CMAKE_THREAD_LIBS_INIT})
++    install(TARGETS ${TARGET} RUNTIME)
+     if(WIN32)
+         # It requires Windows 8.1 or later for PrefetchVirtualMemory
index 2bf362d67005aabce4453a943fb7e215e2009a48..29237a9b95b912279df1077c3e47484031fd7fe0 100644 (file)
@@ -1 +1,2 @@
 0001-filter-examples.patch
+0002-talk-llama-use-library.patch