summaryrefslogtreecommitdiffstats
path: root/meta-offline-voice-agent/recipes-whisper/whisper-cpp
diff options
context:
space:
mode:
authorAnuj Solanki <anuj603362@gmail.com>2024-09-30 23:39:02 +0200
committerAnuj Solanki <anuj603362@gmail.com>2024-10-06 16:25:15 +0200
commit8949e1b030da7067da206a580c5124ca85ec9fbc (patch)
tree9eec1daea3ded33862a310aa66e83864acf8abc2 /meta-offline-voice-agent/recipes-whisper/whisper-cpp
parent1feb55631bea43bf7745921e247706303db4d6fc (diff)
Remove OpenAI's Whisper AI and its dependencies
- Remove OpenAI's Whisper AI recipes and all its dependencies. - Add recipes for whisper-cpp, whisper-cpp-base and whisper-cpp-tiny model. - Add recipe for python-mpd. - Add voice-agent-config to /etc/default and update config path in agl-service-voiceagent.service Bug-AGL: SPEC-5200 Change-Id: Iaebd9c46930144b41659710202e9b737dbe9f60b Signed-off-by: Anuj Solanki <anuj603362@gmail.com>
Diffstat (limited to 'meta-offline-voice-agent/recipes-whisper/whisper-cpp')
-rw-r--r--meta-offline-voice-agent/recipes-whisper/whisper-cpp/whisper-cpp_git.bb39
1 files changed, 39 insertions, 0 deletions
diff --git a/meta-offline-voice-agent/recipes-whisper/whisper-cpp/whisper-cpp_git.bb b/meta-offline-voice-agent/recipes-whisper/whisper-cpp/whisper-cpp_git.bb
new file mode 100644
index 00000000..0e3e9a17
--- /dev/null
+++ b/meta-offline-voice-agent/recipes-whisper/whisper-cpp/whisper-cpp_git.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Whisper.cpp - Port of OpenAI's Whisper model in C++ for faster and smaller inference"
+HOMEPAGE = "https://github.com/ggerganov/whisper.cpp"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1539dadbedb60aa18519febfeab70632"
+
+SRC_URI = "git://github.com/ggerganov/whisper.cpp.git;protocol=https;branch=master"
+
+SRCREV = "81c999fe0a25c4ebbfef10ed8a1a96df9cfc10fd"
+
+DEPENDS = "ffmpeg openblas"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+do_configure:prepend() {
+ sed -i 's/-march=native//g' ${S}/Makefile
+ sed -i 's/-mtune=native//g' ${S}/Makefile
+}
+
+
+# Specify the model you want to download
+WHISPER_MODEL ?= "base.en"
+
+do_compile() {
+ export CXXFLAGS="${CXXFLAGS} -I${STAGING_INCDIR}/openblas"
+ export LDFLAGS="${LDFLAGS} -lopenblas"
+ cd ${S}
+ oe_runmake GGML_OPENBLAS=1
+}
+
+do_install() {
+ # Install the main binary
+ install -d ${D}${bindir}
+ install -m 0755 ${S}/main ${D}${bindir}/whisper-cpp
+}
+
+FILES_${PN} += "${datadir}/whisper-cpp/models/* ${datadir}/* ${bindir}/* /usr/share "
+RDEPENDS:${PN} += "openblas ffmpeg"