%define upstream_name vosk-api Name: python-vosk-api Summary: Speech recognition toolkit Version: 0.3.31 Release: %mkrel 1 Source0: https://github.com/alphacep/%{upstream_name}/archive/refs/tags/v%{version}.tar.gz URL: https://github.com/alphacep/%{upstream_name} License: ASL 2.0 Group: Development/Python Patch0: vosk-shared-links-instead-of-static-31.patch BuildRequires: pkgconfig(python3) BuildRequires: python3dist(cffi) BuildRequires: kaldi-lookahead-devel BuildRequires: openblas-devel BuildRequires: libatomic-devel BuildRequires: blas-devel BuildRequires: lapack-devel BuildRequires: openfst-devel Requires: kaldi-lookahead Requires: openblas Requires: lapack Requires: libatomic Requires: blas Recommends: vosk-model %description Vosk is an offline open source speech recognition toolkit. It enables speech recognition models for 18 languages and dialects. Vosk models provide continuous large vocabulary transcription, zero-latency response with streaming API, reconfigurable vocabulary and speaker identification. This package provides Python bindings. %global debug_package %{nil} %package -n python3-%{upstream_name} Summary: Vosk-api bindings for Python 3 %{?python_provide:%python_provide python3-%{upstream_name}} %description -n python3-%{upstream_name} Vosk-api bindings for Python. %prep %autosetup -n %{upstream_name}-%{version} -p1 rm -rf %{upstream_name}.egg-info %build pushd src %ifarch i586 sed -i -e "s/CFLAGS=-g -O2 -std=c++17 -fPIC -DFST_NO_DYNAMIC_LINKING/CFLAGS=-g -O2 -std=c++17 -msse2 -mfpmath=sse -fPIC -DFST_NO_DYNAMIC_LINKING/g" Makefile %endif make popd pushd python %py3_build popd %install pushd python %py3_install popd %files -n python3-%{upstream_name} %doc README.md %license COPYING %{python3_sitelib}/*