summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Holthuis2015-06-21 19:41:43 +0200
committerJan Holthuis2015-06-21 19:41:43 +0200
commitb64aca545ce4c60ab6daba095c711937f6aecc86 (patch)
treeac6d00521a9575243e1f2dce9039085297d63257
downloadaur-b64aca545ce4c60ab6daba095c711937f6aecc86.tar.gz
Initial import
-rw-r--r--.AURINFO34
-rw-r--r--.SRCINFO34
-rw-r--r--PKGBUILD77
-rw-r--r--jasper-voice-control.install15
-rw-r--r--jasper-voice-control.service11
-rw-r--r--profile.yml3
6 files changed, 174 insertions, 0 deletions
diff --git a/.AURINFO b/.AURINFO
new file mode 100644
index 000000000000..cce9b3d2ab90
--- /dev/null
+++ b/.AURINFO
@@ -0,0 +1,34 @@
+pkgbase = jasper-voice-control-git
+ pkgdesc = Jasper is an open source platform for developing always-on, voice-controlled applications.
+ pkgver = 0.0.0
+ pkgrel = 2
+ url = https://jasperproject.github.io
+ install = jasper-voice-control.install
+ arch = any
+ license = MIT
+ makedepends = git
+ depends = python2
+ depends = python2-apscheduler
+ depends = python2-argparse
+ depends = python2-mock
+ depends = python2-pip
+ depends = python2-pyaudio
+ depends = python2-requests
+ depends = python2-yaml
+ optdepends = jasper-plugins: Jasper standard plugins
+ optdepends = jasper-stt-pocketsphinx: Pocketsphinx STT engine for Jasper
+ optdepends = jasper-tts-espeak: espeak TTS engine for Jasper
+ optdepends = jasper-tts-google: Google TTS engine for Jasper
+ optdepends = jasper-tts-festival: Festival TTS engine for Jasper
+ optdepends = jasper-tts-pico: Pico TTS engine for Jasper
+ provides = jasper-voice-control
+ conflicts = jasper-voice-control
+ source = git+https://github.com/jasperproject/jasper-client.git
+ source = jasper-voice-control.service
+ source = profile.yml
+ sha256sums = SKIP
+ sha256sums = dd0b0170aad21e7ed94bd8e46287473bfaa1939a7361bc21b63637235b019bc6
+ sha256sums = 13616f4a72a618a8e3a9206bd7dfeefcd443af968191193709c25eaf13d6eed8
+
+pkgname = jasper-voice-control-git
+
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..cce9b3d2ab90
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,34 @@
+pkgbase = jasper-voice-control-git
+ pkgdesc = Jasper is an open source platform for developing always-on, voice-controlled applications.
+ pkgver = 0.0.0
+ pkgrel = 2
+ url = https://jasperproject.github.io
+ install = jasper-voice-control.install
+ arch = any
+ license = MIT
+ makedepends = git
+ depends = python2
+ depends = python2-apscheduler
+ depends = python2-argparse
+ depends = python2-mock
+ depends = python2-pip
+ depends = python2-pyaudio
+ depends = python2-requests
+ depends = python2-yaml
+ optdepends = jasper-plugins: Jasper standard plugins
+ optdepends = jasper-stt-pocketsphinx: Pocketsphinx STT engine for Jasper
+ optdepends = jasper-tts-espeak: espeak TTS engine for Jasper
+ optdepends = jasper-tts-google: Google TTS engine for Jasper
+ optdepends = jasper-tts-festival: Festival TTS engine for Jasper
+ optdepends = jasper-tts-pico: Pico TTS engine for Jasper
+ provides = jasper-voice-control
+ conflicts = jasper-voice-control
+ source = git+https://github.com/jasperproject/jasper-client.git
+ source = jasper-voice-control.service
+ source = profile.yml
+ sha256sums = SKIP
+ sha256sums = dd0b0170aad21e7ed94bd8e46287473bfaa1939a7361bc21b63637235b019bc6
+ sha256sums = 13616f4a72a618a8e3a9206bd7dfeefcd443af968191193709c25eaf13d6eed8
+
+pkgname = jasper-voice-control-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ee0fd0e0ef66
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,77 @@
+# Maintainer: Jan Holthuis <holthuis.jan@googlemail.com>
+
+pkgname=jasper-voice-control-git
+pkgver=0.0.0
+pkgrel=2
+pkgdesc="Jasper is an open source platform for developing always-on, voice-controlled applications."
+arch=('any')
+url="https://jasperproject.github.io"
+license=('MIT')
+depends=('python2'
+ 'python2-apscheduler'
+ 'python2-argparse'
+ 'python2-mock'
+ 'python2-pip'
+ 'python2-pyaudio'
+ 'python2-requests'
+ 'python2-yaml')
+makedepends=('git')
+optdepends=('jasper-plugins: Jasper standard plugins'
+ 'jasper-stt-pocketsphinx: Pocketsphinx STT engine for Jasper'
+ 'jasper-tts-espeak: espeak TTS engine for Jasper'
+ 'jasper-tts-google: Google TTS engine for Jasper'
+ 'jasper-tts-festival: Festival TTS engine for Jasper'
+ 'jasper-tts-pico: Pico TTS engine for Jasper')
+conflicts=('jasper-voice-control')
+provides=('jasper-voice-control')
+source=('git+https://github.com/jasperproject/jasper-client.git'
+ 'jasper-voice-control.service'
+ 'profile.yml')
+sha256sums=('SKIP'
+ 'dd0b0170aad21e7ed94bd8e46287473bfaa1939a7361bc21b63637235b019bc6'
+ '13616f4a72a618a8e3a9206bd7dfeefcd443af968191193709c25eaf13d6eed8')
+install='jasper-voice-control.install'
+
+pkgver() {
+ cd "${srcdir}/jasper-client"
+ # Use the tag of the last commit
+ git describe --long | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "${srcdir}"
+
+ # Patch broken audio engine
+ sed -i "s/'-D', 'hw:1,0', //" jasper-client/client/tts.py
+
+ # create wrappers
+ printf '#!/bin/sh\npython2 /usr/share/jasper-voice-control/jasper.py $@\n' > "jasper-voice-control.sh"
+ printf '#!/bin/sh\npython2 /usr/share/jasper-voice-control/client/populate.py $@\n' > "jasper-voice-control-populate.sh"
+}
+
+build() {
+ python2 -O -m compileall "${srcdir}/jasper-client"
+}
+
+package() {
+ # install shell wrappers
+ install -m 755 -d "${pkgdir}/usr/bin/" || return 1
+ install -D -m 755 "${srcdir}/jasper-voice-control.sh" "${pkgdir}/usr/bin/jasper-voice-control"
+ install -D -m 755 "${srcdir}/jasper-voice-control-populate.sh" "${pkgdir}/usr/bin/jasper-voice-control-populate"
+
+ # install jasper
+ install -m755 -d "${pkgdir}/usr/share/" || return 1
+ cp -dr --no-preserve=owner "${srcdir}/jasper-client" "${pkgdir}/usr/share/jasper-voice-control" || return 1
+
+ # install readme
+ install -m 755 -d "${pkgdir}/usr/share/doc/jasper-voice-control" || return 1
+ install -D -m 644 "${srcdir}/jasper-client/README.md" "${srcdir}/jasper-client/CONTRIBUTING.md" "${pkgdir}/usr/share/doc/jasper-voice-control/"
+
+ # install service file
+ install -m 755 -d "${pkgdir}/usr/lib/systemd/system" || return 1
+ install -D -m 644 "${srcdir}/jasper-voice-control.service" "${pkgdir}/usr/lib/systemd/system/jasper-voice-control.service"
+
+ # create config dir and add default config
+ install -m 755 -d "${pkgdir}/var/lib/jasper/.jasper" || return 1
+ install -D -m 644 "${srcdir}/profile.yml" "${pkgdir}/var/lib/jasper/.jasper/profile.yml"
+}
diff --git a/jasper-voice-control.install b/jasper-voice-control.install
new file mode 100644
index 000000000000..0b3e6b5016c6
--- /dev/null
+++ b/jasper-voice-control.install
@@ -0,0 +1,15 @@
+post_install() {
+ getent group jasper &>/dev/null || groupadd -r jasper >/dev/null
+ getent passwd jasper &>/dev/null || useradd -r -g jasper -d /var/lib/jasper -s /bin/false -c jasper jasper >/dev/null
+ chown -R jasper:jasper /var/lib/jasper
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ getent passwd jasper &>/dev/null && userdel jasper >/dev/null
+ getent group jasper &>/dev/null && groupdel jasper >/dev/null
+ true
+}
diff --git a/jasper-voice-control.service b/jasper-voice-control.service
new file mode 100644
index 000000000000..48e1f4aaadf3
--- /dev/null
+++ b/jasper-voice-control.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Jasper Voice Control
+
+[Service]
+Type=simple
+User=jasper
+Group=jasper
+ExecStart=/usr/bin/jasper-voice-control
+
+[Install]
+WantedBy=multi-user.target
diff --git a/profile.yml b/profile.yml
new file mode 100644
index 000000000000..773c150cea6b
--- /dev/null
+++ b/profile.yml
@@ -0,0 +1,3 @@
+pocketsphinx:
+ hmm_dir: '/usr/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k'
+ fst_model: '/usr/share/phonetisaurus/scripts/g014b2b/g014b2b.fst' \ No newline at end of file