Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37537909
en ru br
ALT Linux repos
S:1.48.04-alt3
5.0: 1.44.05-alt0.M50.1
4.1: 1.44.05-alt0.M41.2
4.0: 1.44.05-alt0.M40.1

Group :: Sound
RPM: espeak

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%def_with portaudio

# do not enable;

# a part of msp at work in progress for 1.45;
# should be adopted first to espeak 1.48
# to be used together with pulseaudio (a-la runtime)
%def_without libao

Name: espeak
Version: 1.48.04
Release: alt1

Summary: %name is a software speech synthesizer for English and other languages
Summary(ru_RU.UTF-8): Программный синтезатор речи для английского и других языков
Group: Sound
License: %gpl3plus
URL: http://espeak.sourceforge.net

Requires: tts-base

# Automatically added by buildreq on Fri Aug 21 2009

BuildRequires: gcc-c++ unzip

BuildRequires: rpm-macros-tts rpm-build-licenses

Source0: http://downloads.sourceforge.net/%{name}/%name-%version-source.zip
Source1: %name.replacements
Source2: russian_data.zip
Source3: wave_ao.cpp
Source4: espeak.voiceman
Source5: espeak-ru.voiceman

# found in fedora espeak 1.48.04-21.fc35

# Upstream ticket: https://sourceforge.net/p/espeak/patches/10/
Source7:        espeak.1
Patch0:         espeak-1.47-makefile-nostaticlibs.patch
Patch1:         espeak-1.47-ftbs-ld-libm.patch
# Upstream ticket: https://sourceforge.net/p/espeak/patches/10/
Patch2:         espeak-1.48-help-fix.patch
# Upstream ticket: https://sourceforge.net/p/espeak/bugs/105/
Patch3:         espeak-1.47-wav-close.patch
Patch4:         espeak-1.48-gcc-6-fix.patch
# Upstream-accepted patch (to the new fork espeak-ng)
# https://github.com/espeak-ng/espeak-ng/commit/7659aaa2e88cc0401d032d04602731ca45070fab
Patch5:         espeak-1.48-read-fifo.patch

Patch11: %name-1.48-alt-libao.patch

BuildRequires:  libpulseaudio-devel
%define backend pulseaudio
%if_with portaudio
BuildRequires:  libportaudio2-devel
%define backend runtime
%endif
%if_with libao
BuildRequires: libao-devel
%define backend ao
%endif

%description
%name is a software text-to-speech tool. It produces speech in enlish
and other languages. Currently it contains the preliminary
implementation of Russian text processing. It uses a different
synthesis method from other open source TTS engines, and sounds quite
different.  It's perhaps not as natural or "smooth", but the
articulation clearer and easier to listen to for long periods.

%description -l ru_RU.UTF-8
Espeak - программный синтезатор речи, подготовленный разработчиком из
Великобритании - Джонатаном Даддингтоном. В основе этого синтезатора
лежат наиболее удачные алгоритмы других свободных разработок. Espeak
способен синтезировать речь на анг. и других языках. Поддержка
русского языка присутствует в начальном варианте.

%package -n lib%name
License: %gpl3plus
Summary: This is a shared library which contains the espeak's text to speech engine
Summary(ru_RU.UTF-8): Динамически подключаемая библиотека с реализацией системы синтеза речи espeak
Group: Sound
Requires: %name-data = %version-%release
%description -n lib%name
This package contains the shared library with text-to-speech
engine. This library is used in 'speak' TTS tool.

%description -l ru_RU.UTF-8 -n lib%name
Динамически подключаемая библиотека, содержащая
реализацию синтеза речи проекта espeak.

%package -n lib%name-devel
Summary: Library headers for libespeak
License: %gpl3plus
Group: Development/C++
Requires: lib%name = %version-%release

%description -n lib%name-devel
Library headers for libespeak.
Install this package if you want
to build applications with libespeak.

%package data
Group: Sound
Summary: Data files used to generate speech by espeak
Summary(ru_RU.UTF-8): Вспомогательные данные для работы синтезатора espeak
BuildArch: noarch
License: %gpl3plus

%description data
This package contains  architecture-independent
data used by espeak speech synthesizer.

%description -l ru_RU.UTF-8 data
Вспомогательные данные о языках, используемые
в работе синтезатором %name.

%prep
%setup -q -n %name-%version-source

# Fix file permissions in upstream tarball

find . -type f -exec chmod 0644 {} \;

mv docs html
sed -i 's/\r//' License.txt

# To enable portaudio19 and newer using instead of portaudio18;

rm -f ./src/portaudio.h
mv ./src/portaudio19.h ./src/portaudio.h

# Don't use the included binary voice dictionaries; we compile these from source

rm -f espeak-data/*_dict

%patch0 -p1 -b .nostaticlibs
%patch1 -p1 -b .ftbs-ld-libm
%patch2 -p1 -b .help-fix
%patch3 -p1 -b .wav-close
%patch4 -p1 -b .1.48-gcc-6-fix
%patch5 -p1 -b .read-fifo

%if_with libao
%patch11 -p1
cp %SOURCE3 ./src
%endif

unzip %SOURCE2
mv russian_data/ru_listx dictsource/

%build
cd src
%make_build CXXFLAGS="%optflags" AUDIO=%backend

# Compile the TTS voice dictionaries

export ESPEAK_DATA_PATH=%_builddir/espeak-%{version}-source
cd ../dictsource
# Strange sed regex to parse ambiguous output from 'speak --voices', filled upstream BZ 3608811
for voice in $(../src/speak --voices | \
LANG=C sed -n '/Age\/Gender/ ! s/ *[0-9]\+ *\([^ ]\+\) *M\? *[^ ]\+ *\(\((\|[A-Z]\)[^ ]\+\)\? *\([^ ]\+\).*/\1 \4/ p' | \
sort | uniq); do \
   ../src/speak --compile=$voice; \
done
# for ru_listx above; no need, for we compile all langs
#../src/speak --compile=ru

%install
cd src
make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%_libdir install
cd ..
install -pD -m 644 %SOURCE4 %buildroot%_ttsdir/espeak.voiceman
install -pD -m 644 %SOURCE5 %buildroot%_ttsdir/espeak-ru.voiceman
install -pD -m 644 %SOURCE1 %buildroot%_datadir/espeak-data/replacements
install -pD -m 644 %SOURCE7 %buildroot%_man1dir/espeak.1

%preun
%tts_unregister espeak
%tts_unregister espeak-ru

%files
%doc ChangeLog.txt License.txt ReadMe html
%_bindir/espeak
%_man1dir/espeak.1*
%_ttsdir/*

%files data
%_datadir/espeak-data

%files -n lib%name
%_libdir/libespeak.so.*

%files -n lib%name-devel
%_includedir/espeak
%_libdir/libespeak.so

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin