File piper-tts.spec of Package piper-tts

#
# spec file for package piper-tts
#
# Copyright (c) 2024 Andreas Schneider
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

%global piper_version 2023.11.14
%global piper_extra_version 2

Name:           piper-tts
Version:        %{piper_version}.0%{?piper_extra_version}
Release:        1
Summary:        A fast, local neural text to speech system
License:        MIT
URL:            https://github.com/rhasspy/piper
Source0:        %{url}/archive/refs/tags/%{piper_version}-%{piper_extra_version}/piper-%{piper_version}-%{piper_extra_version}.tar.gz
Source1:        speech-dispatcher.conf
Source2:        README.speech-dispatcher.md
Patch0:         piper-cmake.patch
BuildRequires:  cmake
BuildRequires:  espeak-ng-devel
BuildRequires:  fmt-devel
BuildRequires:  gcc-c++
BuildRequires:  libpiper-phonemize-devel
BuildRequires:  onnxruntime-devel
BuildRequires:  spdlog-devel
Recommends:     piper-voices

%description
A fast, local neural text to speech system that sounds great and is optimized
for the Raspberry Pi 4.

%prep
%autosetup -p1 -n piper-%{piper_version}-%{piper_extra_version}

cp %{SOURCE2} .

%build
%cmake
%cmake_build

%install
%cmake_install

install -d -m 0755 %{buildroot}%{_sysconfdir}/speech-dispatcher/modules
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/speech-dispatcher/modules/piper-generic.conf

%files
%license LICENSE.md
%doc README.md README.speech-dispatcher.md
%{_bindir}/piper-tts
%dir %{_sysconfdir}/speech-dispatcher/
%dir %{_sysconfdir}/speech-dispatcher/modules
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/piper-generic.conf

%changelog

openSUSE Build Service is sponsored by