# Contributor: Bart Ribbers # Maintainer: Bart Ribbers pkgname=py3-speechrecognition pkgver=3.10.0 pkgrel=2 pkgdesc="Library for performing speech recognition, with support for several engines and APIs, online and offline" url="https://github.com/Uberi/speech_recognition/" # s390x blocked by failing tests arch="noarch !s390x" license="BSD-3-Clause AND GPL-2.0-only" depends=" flac py3-pyaudio py3-requests " makedepends=" py3-gpep517 py3-setuptools py3-wheel " checkdepends=" py3-pocketsphinx py3-pytest " subpackages="$pkgname-pyc" source="$pkgname-$pkgver.tar.gz::https://github.com/Uberi/speech_recognition/archive/refs/tags/$pkgver.tar.gz" builddir="$srcdir/speech_recognition-$pkgver" prepare() { default_prepare # Remove pre-built flac binaries, we want to use system ones instead rm speech_recognition/flac* } build() { gpep517 build-wheel \ --wheel-dir .dist \ --output-fd 3 3>&1 >&2 } check() { python3 -m venv --clear --without-pip --system-site-packages .testenv .testenv/bin/python3 -m installer .dist/*.whl .testenv/bin/python3 -m pytest -k 'not test_whisper and not test_google' } package() { python3 -m installer -d "$pkgdir" \ .dist/*.whl } sha512sums=" 702c8e0738ee80081dad5cd749ad61325d38bf57faf71ebacb9a317462a741a3e19d3120fab4f2a309f583ff461d26f9e648cfac0dcc767a1eb8bf620683bfb9 py3-speechrecognition-3.10.0.tar.gz "