blob: 2bc34785800dc0299a7a00975e2729467278e3a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{13..14} )
inherit cmake distutils-r1
ESPEAK_NG_COMMIT="212928b394a96e8fd2096616bfd54e17845c48f6"
DESCRIPTION="Fast and local neural text-to-speech engine"
HOMEPAGE="https://github.com/OHF-Voice/piper1-gpl"
SRC_URI="
https://github.com/OHF-Voice/piper1-gpl/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/espeak-ng/espeak-ng/archive/${ESPEAK_NG_COMMIT}.tar.gz -> espeak-ng-1.52.0_p20250322.tar.gz
"
S="${WORKDIR}/piper1-gpl-${PV}"
ESPEAK_NG="${WORKDIR}/espeak-ng-${ESPEAK_NG_COMMIT}"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64"
IUSE="server"
RDEPEND="
dev-python/pathvalidate[${PYTHON_USEDEP}]
media-libs/sonic
sci-libs/onnxruntime[python,${PYTHON_USEDEP}]
server? ( dev-python/flask[${PYTHON_USEDEP}] )
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-python/scikit-build[${PYTHON_USEDEP}]
"
# Both of the packages below install `/usr/bin/piper`, and
# `app-misc/piper` also installs a Python module with the same name
DEPEND+="
!!app-misc/piper
!!net-proxy/piper
"
EPYTEST_DESELECT=(
tests/test_piper.py::test_load_include_alignments_in_memory
)
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
src_prepare() {
distutils-r1_src_prepare
# See https://github.com/espeak-ng/espeak-ng/issues/2048
sed 's/160/1024/' -i "${ESPEAK_NG}/src/libespeak-ng/speech.h" || die
sed \
-e "s|GIT_REPOSITORY.*|SOURCE_DIR ${ESPEAK_NG}|" \
-e 's|GIT_TAG.*|DOWNLOAD_COMMAND ""|' \
-i CMakeLists.txt || die
}
src_install() {
distutils-r1_src_install
rm "${ED}/usr/COPYING" || die
}
|