Skip to content

Commit

Permalink
snowboy: add recipe
Browse files Browse the repository at this point in the history
KittAI's snowboy Wakeword Engine is required to detect
wake word "Alexa" to trigger further speach communication
towards Alexa Voice Service. The recipe is taken from the
following source and modified.

https://github.com/alexa/aac-sdk/blob/1.5/builder/meta-aac/recipes-wakeword/snowboy/

Signed-off-by: Tariq Ansari <tansari@luxoft.com>
  • Loading branch information
TSAnsari committed Mar 22, 2019
1 parent 9a2e36b commit e9ab3cb
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions recipes-alexa/snowboy/snowboy_1.3.0.bb
@@ -0,0 +1,47 @@
#
# Copyright (c) 2019 Amazon.com, Inc.
# Copyright (c) 2019 Luxoft Sweden AB
#
# SPDX-License-Identifier: Apache-2.0
#

SUMMARY = "Snowboy Hotword Detection by KITT.AI"
HOMEPAGE = "https://snowboy.kitt.ai/"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8d385adc93db3f7e5d092b82fb2c9353"

SRC_URI = "https://github.com/Kitt-AI/snowboy/archive/v${PV}.tar.gz"
SRC_URI[md5sum] = "e16e117914f76f4a35facb16b0fcd61b"
SRC_URI[sha256sum] = "93658cc5d4d83dd7a6e954d0dc1e18d1c70b1dd8623181850c4804d3aca19e96"

COMPATIBLE_MACHINE = "(machine-native|android|intel-corei7-64|raspberrypi3)"

INSANE_SKIP_${PN} += "already-stripped"

def get_snowboy_arch(d):
machine = d.getVar('MACHINE')
if machine == "androidarm":
return "android/armv7a"
elif machine == "androidarm64":
return "android/armv8-aarch64"
elif machine == "intel-corei7-64":
return "ubuntu64"
elif machine == "raspberrypi3":
return "rpi"
else:
return "ubuntu64"

SNOWBOY_ARCH ?= "${@get_snowboy_arch(d)}"

do_install() {
mkdir -p ${D}${libdir}
cp ${S}/lib/${SNOWBOY_ARCH}/libsnowboy-detect.a ${D}${libdir}
mkdir -p ${D}${includedir}
cp ${S}/include/snowboy-detect.h ${D}${includedir}

install -d ${D}${datadir}/snowboy
install -m 0755 ${S}/resources/common.res ${D}${datadir}/snowboy/
install -m 0755 ${S}/resources/alexa/alexa-avs-sample-app/alexa.umdl ${D}${datadir}/snowboy/
}

FILES_${PN} = "${datadir}/snowboy/alexa.umdl ${datadir}/snowboy/common.res"

0 comments on commit e9ab3cb

Please sign in to comment.