aboutsummaryrefslogtreecommitdiffstats
path: root/meta-offline-voice-agent/recipes-python
diff options
context:
space:
mode:
authoramanarora_09 <aman.arora9848@gmail.com>2023-03-28 22:27:17 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2023-08-08 20:38:17 +0200
commit8eb3ea414f84d3f28c14231ee8dda7876295e48e (patch)
treee11001ae1228054657ec475add06f1278d7a900a /meta-offline-voice-agent/recipes-python
parentfe8c4a516b3bff5f531caebd43c1f1ac137b9959 (diff)
Rework and update offline voice agent
This brings the voice agent to the state shown at AMM and EW. Change-Id: I31ac4adc874a206e6e598ba116523ecc7eb99fc9 Signed-off-by: amanarora_09 <aman.arora9848@gmail.com> Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-offline-voice-agent/recipes-python')
-rw-r--r--meta-offline-voice-agent/recipes-python/python3-vosk-websocket-server/python3-vosk-websocket-server_git.bb25
-rw-r--r--meta-offline-voice-agent/recipes-python/python3-wavio/python3-wavio_0.0.4.bb19
-rw-r--r--meta-offline-voice-agent/recipes-python/vosk-grpc-custom-server/vosk-grpc-server_git.bb36
3 files changed, 65 insertions, 15 deletions
diff --git a/meta-offline-voice-agent/recipes-python/python3-vosk-websocket-server/python3-vosk-websocket-server_git.bb b/meta-offline-voice-agent/recipes-python/python3-vosk-websocket-server/python3-vosk-websocket-server_git.bb
index 1a77f7d2..1cdf89c5 100644
--- a/meta-offline-voice-agent/recipes-python/python3-vosk-websocket-server/python3-vosk-websocket-server_git.bb
+++ b/meta-offline-voice-agent/recipes-python/python3-vosk-websocket-server/python3-vosk-websocket-server_git.bb
@@ -11,23 +11,18 @@ SRCREV = "70f3d5321a40f2f5dffe9c833bc1fac4b3b451e7"
S = "${WORKDIR}/git"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install () {
+ install -d ${D}${bindir}
+ cp ${S}/websocket/asr_server.py ${D}${bindir}/vosk-websocket-python.py
+ chmod a+x ${D}${bindir}/vosk-websocket-python.py
+}
+
RDEPENDS:${PN} += " \
vosk \
python3-vosk-api \
python3-websockets \
virtual/vosk-model \
-"
-
-do_configure () {
- :
-}
-
-do_compile () {
- :
-}
-
-do_install () {
- install -d ${D}${bindir}
- cp ${S}/websocket/asr_server.py ${D}${bindir}/vosk-websocket-python.py
- chmod a+x ${D}${bindir}/vosk-websocket-python.py
-}
+" \ No newline at end of file
diff --git a/meta-offline-voice-agent/recipes-python/python3-wavio/python3-wavio_0.0.4.bb b/meta-offline-voice-agent/recipes-python/python3-wavio/python3-wavio_0.0.4.bb
new file mode 100644
index 00000000..6fbb22c7
--- /dev/null
+++ b/meta-offline-voice-agent/recipes-python/python3-wavio/python3-wavio_0.0.4.bb
@@ -0,0 +1,19 @@
+SUMMARY = "A Python module for reading and writing WAV files using numpy arrays."
+HOMEPAGE = "https://github.com/WarrenWeckesser/wavio"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/git/README.rst;beginline=48;endline=48;md5=bc752f76db0a3e24c17afcc8dda3d553"
+# License listed in README.rst at https://github.com/WarrenWeckesser/wavio
+
+SRC_URI = "git://github.com/WarrenWeckesser/wavio;protocol=https;branch=master"
+
+PV = "0.0.4+git${SRCPV}"
+SRCREV = "54699acdde2cb4f68fbe3dc5847a74ab796662e1"
+
+S = "${WORKDIR}/git"
+
+inherit setuptools3
+
+DEPENDS += "python3-numpy"
+
+RDEPENDS:${PN} += "python3-audio python3-core python3-numpy"
diff --git a/meta-offline-voice-agent/recipes-python/vosk-grpc-custom-server/vosk-grpc-server_git.bb b/meta-offline-voice-agent/recipes-python/vosk-grpc-custom-server/vosk-grpc-server_git.bb
new file mode 100644
index 00000000..0a32a0cc
--- /dev/null
+++ b/meta-offline-voice-agent/recipes-python/vosk-grpc-custom-server/vosk-grpc-server_git.bb
@@ -0,0 +1,36 @@
+DESCRIPTION = "WebSocket, gRPC and WebRTC speech recognition server based on Vosk and Kaldi libraries"
+SUMMARY = "This is a server for highly accurate offline speech recognition using Kaldi and Vosk-API."
+HOMEPAGE = "https://github.com/alphacep/vosk-server"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=13e8863a069f2c314d9251336e4afcbf"
+
+SRC_URI = "git://github.com/amanarora9848/voicerecognizer-gst-grpc;protocol=https;branch=master"
+
+PV = "1.0+git${SRCPV}"
+SRCREV = "d28da4cd89a5dfff823f1358816d0ff4791f8d28"
+
+S = "${WORKDIR}/git/python-server"
+
+RDEPENDS:${PN} += " \
+ vosk \
+ python3-vosk-api \
+ python3-grpcio \
+ python3-protobuf \
+ virtual/vosk-model \
+ python3-pycairo \
+ python3-pygobject \
+"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install () {
+ install -d ${D}${libdir}/vosk-grpc-server
+ cp ${S}/record_server_grpc.py ${D}${libdir}/vosk-grpc-server/
+ cp ${S}/recognize_pb2_grpc.py ${D}${libdir}/vosk-grpc-server/
+ cp ${S}/recognize.proto ${D}${libdir}/vosk-grpc-server/
+ cp ${S}/recognize_pb2.py ${D}${libdir}/vosk-grpc-server/
+ chmod a+x ${D}${libdir}/vosk-grpc-server/record_server_grpc.py
+}
+
+FILES:${PN} += " /usr/lib/vosk-grpc-server " \ No newline at end of file