From 9c6f99be5eb2c31ac28d801aeb7c01f39c427a07 Mon Sep 17 00:00:00 2001
From: j1nx
Date: Mon, 11 Jan 2021 13:33:20 +0100
Subject: [PATCH] Add jarbas-stt-plugin-vosk plugin
---
buildroot-external/Config.in | 1 +
buildroot-external/configs/rpi4_64-gui_defconfig | 1 +
.../package/python-jarbas-stt-plugin-vosk/Config.in | 6 ++++++
.../python-jarbas-stt-plugin-vosk.hash | 2 ++
.../python-jarbas-stt-plugin-vosk.mk | 12 ++++++++++++
5 files changed, 22 insertions(+)
create mode 100644 buildroot-external/package/python-jarbas-stt-plugin-vosk/Config.in
create mode 100644 buildroot-external/package/python-jarbas-stt-plugin-vosk/python-jarbas-stt-plugin-vosk.hash
create mode 100644 buildroot-external/package/python-jarbas-stt-plugin-vosk/python-jarbas-stt-plugin-vosk.mk
diff --git a/buildroot-external/Config.in b/buildroot-external/Config.in
index 770aa296..2baecf65 100644
--- a/buildroot-external/Config.in
+++ b/buildroot-external/Config.in
@@ -170,6 +170,7 @@ menu "Mycroft A.I. Personal Assistant"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-splash/Config.in"
menu "Mycroft A.I. Plugins"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/python-jarbas-stt-plugin-chromium/Config.in"
+ source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/python-jarbas-stt-plugin-vosk/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/python-jarbas-wake-word-plugin-precise/Config.in"
endmenu
endmenu
diff --git a/buildroot-external/configs/rpi4_64-gui_defconfig b/buildroot-external/configs/rpi4_64-gui_defconfig
index 9bda3460..c3bf738c 100644
--- a/buildroot-external/configs/rpi4_64-gui_defconfig
+++ b/buildroot-external/configs/rpi4_64-gui_defconfig
@@ -558,4 +558,5 @@ BR2_PACKAGE_MYCROFT_EMBEDDED_SHELL=y
BR2_PACKAGE_MYCROFT_GUI=y
BR2_PACKAGE_MYCROFT_SERVICE=y
BR2_PACKAGE_PYTHON_JARBAS_STT_PLUGIN_CHROMIUM=y
+BR2_PACKAGE_PYTHON_JARBAS_STT_PLUGIN_VOSK=y
BR2_PACKAGE_PYTHON_JARBAS_WAKE_WORD_PLUGIN_PRECISE=y
diff --git a/buildroot-external/package/python-jarbas-stt-plugin-vosk/Config.in b/buildroot-external/package/python-jarbas-stt-plugin-vosk/Config.in
new file mode 100644
index 00000000..8f82ba59
--- /dev/null
+++ b/buildroot-external/package/python-jarbas-stt-plugin-vosk/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PYTHON_JARBAS_STT_PLUGIN_VOSK
+ bool "python-jarbas-stt-plugin-vosk
+ help
+ Mycroft STT plugin for Vosk
+
+ https://github.com/JarbasLingua/jarbas-stt-plugin-vosk
diff --git a/buildroot-external/package/python-jarbas-stt-plugin-vosk/python-jarbas-stt-plugin-vosk.hash b/buildroot-external/package/python-jarbas-stt-plugin-vosk/python-jarbas-stt-plugin-vosk.hash
new file mode 100644
index 00000000..32db7ba2
--- /dev/null
+++ b/buildroot-external/package/python-jarbas-stt-plugin-vosk/python-jarbas-stt-plugin-vosk.hash
@@ -0,0 +1,2 @@
+# md5, sha256 from https://pypi.org/pypi/jarbas-stt-plugin-vosk/json
+sha256 2f662ab79d512380748e20fe82852970a570d6029a52e6f62a2ae01d3056137f jarbas-stt-plugin-vosk-0.1.3.tar.gz
diff --git a/buildroot-external/package/python-jarbas-stt-plugin-vosk/python-jarbas-stt-plugin-vosk.mk b/buildroot-external/package/python-jarbas-stt-plugin-vosk/python-jarbas-stt-plugin-vosk.mk
new file mode 100644
index 00000000..7318b179
--- /dev/null
+++ b/buildroot-external/package/python-jarbas-stt-plugin-vosk/python-jarbas-stt-plugin-vosk.mk
@@ -0,0 +1,12 @@
+################################################################################
+#
+# python-jarbas-stt-plugin-vosk
+#
+################################################################################
+
+PYTHON_JARBAS_STT_PLUGIN_VOSK_VERSION = 0.1.3
+PYTHON_JARBAS_STT_PLUGIN_VOSK_SOURCE = jarbas-stt-plugin-vosk-$(PYTHON_JARBAS_STT_PLUGIN_VOSK_VERSION).tar.gz
+PYTHON_JARBAS_STT_PLUGIN_VOSK_SITE = https://files.pythonhosted.org/packages/c1/82/5a3a041d602c511cd9a611d274b9e8ce38272bb2e03a67c0aff299d7a689
+PYTHON_JARBAS_STT_PLUGIN_VOSK_SETUP_TYPE = setuptools
+
+$(eval $(python-package))