diff options
author | amanarora_09 <aman.arora9848@gmail.com> | 2022-07-22 15:58:23 +0200 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2022-07-28 13:58:18 +0000 |
commit | eda84d25d819824d641cf89af1e4d61a5e946744 (patch) | |
tree | 38f4b7c34a5b91257518bcbcdc6b96d24f0641b2 /meta-offline-voice-agent/recipes-vosk/vosk-kaldi/vosk-kaldi_git.bb | |
parent | f206eab5753bd9ee2d5b1126c6ec5a18e75cac89 (diff) |
meta-offline-voice-agent: Enable layer for offline voice recognition
- This enables offline voice recognition in AGL
- Can successfully run vosk API and vosk websocket server
Changes:
- Create a new layer: meta-offline-voice-recognition
- Create recipes for the the Vosk library, API, websocket server and model
- Create feature template for the layer (agl-offline-voice-agent)
- Add all required packages to IMAGE_INSTALL
- ptest enable recipe python3-vosk-api
- Few fixes
Bug-AGL: SPEC-4497
Change-Id: Icb290ceee22e2c3a51cbd67f7431701795f1201b
Signed-off-by: amanarora_09 <aman.arora9848@gmail.com>
Diffstat (limited to 'meta-offline-voice-agent/recipes-vosk/vosk-kaldi/vosk-kaldi_git.bb')
-rw-r--r-- | meta-offline-voice-agent/recipes-vosk/vosk-kaldi/vosk-kaldi_git.bb | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/meta-offline-voice-agent/recipes-vosk/vosk-kaldi/vosk-kaldi_git.bb b/meta-offline-voice-agent/recipes-vosk/vosk-kaldi/vosk-kaldi_git.bb new file mode 100644 index 00000000..b3e021f3 --- /dev/null +++ b/meta-offline-voice-agent/recipes-vosk/vosk-kaldi/vosk-kaldi_git.bb @@ -0,0 +1,63 @@ +SUMMARY = "Kaldi Speech Recognition Toolkit" +HOMEPAGE = "http://kaldi-asr.org/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://../COPYING;md5=a10e448a64dbd3723ff3fb2f397fba2e \ + file://doc/legal.dox;md5=3cba845003f27e67da70faa5da924c1e" + +SRC_URI = "git://github.com/alphacep/kaldi.git;protocol=https;branch=vosk \ + file://0001-Fixes-for-shared-library-compilation.patch \ + " + +PV = "1.0+git${SRCPV}" +SRCREV = "76cd51d44c0a61e3905c35cadb2ec5f54f3e42d1" + +S = "${WORKDIR}/git/src" + +DEPENDS += "openblas vosk-openfst" +inherit python3native + +ALLOW_EMPTY_${PN} = "1" + +MYCONF = "--mathlib=OPENBLAS --static --shared --use-cuda=no --fst-root=${STAGING_INCDIR}/../ --fst-version=1.8.0 --openblas-root=${STAGING_INCDIR}/../ " + +do_configure() { + + ./configure ${MYCONF} + +} + +do_compile() { + + make ${PARALLEL_MAKE} + +} + +do_install() { + + install -d ${D}${libdir} + + for i in lib/*.so ; do + install -m 0644 ${i} ${D}${libdir}/ + done + + for i in */*.a ; do + install -m 0644 ${i} ${D}${libdir}/ + done + + for j in base chain decoder feat fstext gmm gst-plugin hmm itf ivector kws lat lm matrix nnet nnet2 nnet3 online online2 rnnlm sgmm2 tfrnnlm transform tree util cudadecoder cudadecoderbin cudafeat cudamatrix ; do + install -d ${D}${includedir}/kaldi/$j + for i in $j/*.h ; do + install -m 0644 $i ${D}${includedir}/kaldi/$j/ + done + done + + # make sure we have the package vosk-kaldi + + install -d ${D}/usr/share/kaldi + echo "This is vosk-kaldi" > ${D}/usr/share/kaldi/README + +} + +FILES:${PN} += " /usr/share/kaldi /usr/share/kaldi/README" +ERROR_QA:remove = "rpaths" +ERROR_QA:remove = "dev-elf" |