summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLumaku2020-10-04 19:48:03 +0200
committerLumaku2020-10-04 19:48:03 +0200
commitce8d972b4c89b7760672fe8dcfa0d012e7b7de42 (patch)
tree9fa8efd21f9bbf394189077c07b8a107694d40ef
downloadaur-ce8d972b4c89b7760672fe8dcfa0d012e7b7de42.tar.gz
Ported from python-ctc-segmentation
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD46
2 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..725037697211
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = python-ctc-segmentation-git
+ pkgdesc = Determine and align utterance segments within audio files using CTC
+ pkgver = 1.0.6.r18
+ pkgrel = 1
+ url = https://github.com/lumaku/ctc-segmentation
+ arch = any
+ license = Apache License 2.0
+ makedepends = git
+ makedepends = cython
+ makedepends = python-setuptools
+ depends = python>=3.7
+ depends = python-numpy
+ depends = cython
+ optdepends = sox: listen to audio segments
+ provides = python-ctc-segmentation
+ conflicts = python-ctc-segmentation
+ conflicts = python-ctc-segmentation-git
+ source = python-ctc-segmentation-git::git+https://github.com/lumaku/ctc-segmentation
+ md5sums = SKIP
+
+pkgname = python-ctc-segmentation-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..11043254f2c3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Lumaku <lumaku@mailbox.org>
+pkgname=python-ctc-segmentation-git
+pkgver=1.0.6.r18
+pkgrel=1
+pkgdesc='Determine and align utterance segments within audio files using CTC'
+arch=('any')
+url='https://github.com/lumaku/ctc-segmentation'
+license=('Apache License 2.0')
+depends=('python>=3.7' 'python-numpy' 'cython')
+optdepends=('sox: listen to audio segments')
+makedepends=('git' 'cython' 'python-setuptools')
+provides=('python-ctc-segmentation')
+conflicts=("python-ctc-segmentation" "${pkgname}")
+source=(
+ "${pkgname}::git+${url}")
+md5sums=(
+ 'SKIP')
+
+
+pkgver() {
+ cd "${pkgname}"
+ printf "%s.r%s" "$(python setup.py --version)" "$(git rev-list --count HEAD)"
+}
+
+
+build() {
+ cd "${pkgname}"
+ cythonize -3 ctc_segmentation/ctc_segmentation_dyn.pyx
+ python setup.py build
+ # echo " --> Warnings of a deprected numpy API can be safely ignored."
+}
+
+
+package() {
+ cd "${pkgname}"
+ export PYTHONHASHSEED=0
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+}
+
+
+check() {
+ cd "${pkgname}"
+ python -c "import tests.test_ctc_segmentation as test; test.test_ctc_segmentation()"
+ python -c "import tests.test_ctc_segmentation as test; test.test_determine_utterance_segments()"
+ python -c "import tests.test_ctc_segmentation as test; test.test_prepare_text()"
+}