# # spec file for package espeak # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # Name: espeak %define _major_version 1.48 Version: %{_major_version}.04 Release: 6.5 %define _version %{version}-source Summary: Software speech synthesizer (text-to-speech) License: GPL-3.0+ Group: Productivity/Other Url: http://espeak.sourceforge.net Source: http://sourceforge.net/projects/espeak/files/espeak/espeak-%{_major_version}/espeak-%{_version}.zip Source1: espeak.1 Source2: mb-lt1 Source3: mb-lt2 Patch: easpeak-fix-bufferoverflow-strncpy.patch Patch1: gcc6-char-cast.patch BuildRequires: gcc-c++ BuildRequires: portaudio-devel BuildRequires: pulseaudio-devel BuildRequires: unzip BuildRoot: %{_tmppath}/%{name}-%{version}-build %description eSpeak is a compact open source software speech synthesizer for English and other languages. eSpeak uses a "formant synthesis" method. This allows many languages to be provided in a small size. The speech is clear, and can be used at high speeds, but is not as natural or smooth as larger synthesizers which are based on human speech recordings. %package devel Summary: Software speech synthesizer (text-to-speech) -- Development Files Group: Development/Languages/C and C++ Requires: espeak = %{version} %description devel eSpeak is a compact open source software speech synthesizer for English and other languages. eSpeak uses a "formant synthesis" method. This allows many languages to be provided in a small size. The speech is clear, and can be used at high speeds, but is not as natural or smooth as larger synthesizers which are based on human speech recordings. %prep # Probably a mistake from upstream %setup -q -n %{name}-%{version}-source %patch -p1 %patch1 -p1 # Don't use the included binary voice dictionaries; we compile these from # source %{__rm} espeak-data/*_dict # Build against portaudio v19 (see ReadMe) %{__cp} -f src/portaudio19.h src/portaudio.h # Remove executable bits of documentation chmod a-x docs/*.html chmod a-x docs/speak_lib.h %{__cp} %{SOURCE2} espeak-data/voices/mb/ %{__cp} %{SOURCE3} espeak-data/voices/mb/ %build cd src make %{?_smp_mflags} CXXFLAGS="%{optflags}" cd .. # Compile the TTS voice dictionaries export ESPEAK_DATA_PATH=$RPM_BUILD_DIR/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 %install cd src make LIBDIR=%{_libdir} DESTDIR=%{buildroot} install cp %{_builddir}/%{name}-%{version}-source/src/speak %{buildroot}%{_bindir}/ strip -s %{buildroot}%{_bindir}/*speak strip -s %{buildroot}%{_libdir}/libespeak.so* %{buildroot}%{_libdir}/libespeak.a cd .. # Remove static libraries #%{__rm} %{buildroot}%{_libdir}/*.a # Install manpage %{__install} -D -m 0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/espeak.1 # Rename docs subdir for installation with %doc %{__mv} docs/ html/ # Fix wrong-script-end-of-line-encoding rpmlint warning sed -i 's/\r$//' %{buildroot}%{_datadir}/espeak-data/voices/other/lfn %pre # Support for seamless update # Remove when 13.1 is out of update scope # or when this is directory again test -d %{_datadir}/espeak-data/voices/en && rm -rf %{_datadir}/espeak-data/voices/en exit 0 %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr (-,root,root,755) %doc ChangeLog.txt License.txt ReadMe html/ %{_bindir}/espeak %{_bindir}/speak %{_libdir}/libespeak.so.* %{_datadir}/espeak-data/ %{_mandir}/man1/espeak.1.* %files devel %defattr (-,root,root,755) %{_includedir}/espeak/ %{_libdir}/libespeak.a %{_libdir}/libespeak.so %changelog * Tue May 24 2016 martin.liska@suse.com - gcc6-char-cast.patch: Fix GCC6 errors. * Sat Feb 27 2016 mgorse@suse.com - Add %%{version} to -devel requires * Fri Dec 19 2014 opensuse.lietuviu.kalba@gmail.com - Add missing mbrola files for Lithuanian language * Wed Apr 9 2014 p.drouand@gmail.com - Update to version 1.48.04 + Corrections to languages en, nl, ta (rules, list, and dict files) - Changes from version 1.48.03 + Fix bug, use of the command-line "espeakedit --compile" produced phoneme data in which vowels started at full amplitude instead of gradual increase. + Fix bug: SSML with values greater than 23 seconds were ignored due to arithmetic overflow. + Added new function: ChangeNextPhoneme(). + Language changes include: da, en, fa, gu, hu, it, nl, pt, ta + Started new language: eu (Basque). + Allow $p_alt1, $p_alt2, etc in pre-conditions. The rule matches if the characters before the current point in the word occur as an entry in the *_list file with the corresponding $alt attibute. + Added condition $list. This is similar to $p_alt etc, but examines all words in the *_list file which don't have the $only attribute. - Fix various rpmlint warnings * Sat Mar 1 2014 p.drouand@gmail.com - Update to version 1.48.02 + Added rule attribute $noprefix. The rule is not used if a prefix has been removed from the word. + Program changes to enable audio output from Windows DLL. + Added attribute 'dictdialect' to specify en-us voice for words marked with _^_EN. + Superscripts and subscripts are spoken as single letters and numbers during normal speech, and with "superscript" and "subscript" also spoken when spelling. + Change function call espeak_TextToPhonemes(). + Klatt synthesizer: Fix parallel formant parameters. + Update translations * Wed Jan 8 2014 tchvatal@suse.com - Remove voices/en directory to avoid cpio rename error that is caused by dir -> file conversion. This makes the package updateable again. * Sun Dec 15 2013 p.drouand@gmail.com - Update to version 1.47.11 + No changelog entry - Changes from 1.47.10 + Data change only. + Revert 't' sound in Spanish to version 1.47.07. - Changes from 1.47.09 + Bug fix (lookup in *_list occasionally found the wrong word). - Changes from 1.47.08 + Automatically generate character names for subscript and superscript characters. + Use internal ctype data for character codes up to U+024F. + Add API function espeak_TextToPhonemes(). + Add test language az, Azerbaijani. - Changes from 1.47.07 + Language data changes only. - Changes from 1.47.06 + Fix for systems which have 44010Hz but not 22050Hz audio. + Now runs OK in ARMv7 mode. - Changes from 1.47.05 + Bug fixes. + Phoneme definitions: add conditions prev2PhW(), next3PhW(). + Added language: ms (Malay) Command line: - -voices= lists the voices in the specified subdirectory. - Changes from 1.47.03 + Bug fixes. - Changes from 1.47.01 + Added languages: - an Aragonese. - fa Farsi. - ga Irish. - lt Lithuanian. - pa Punjabi. + Many language improvements, including American English, Danish, Dutch, Portuguese, Tamil. + Command-line program. - Added -version option. - Added optional value to --ipa option. - -ipa=1 adds a 'tie' character to link letters in a multi-letter phoneme name. - -ipa=2 adds a zero-width joiner to link letters in a multi-letter phoneme name. - -X option now lists the names of attributes from *_list files. + Speak the names of Braille Dot characters, U+2800 to U+28FF. + Speak names of characters in some non-native alphabets. + Automatic switch to a different language for text in non-native   alphabets. + Improved speaking of text from a non-native alphabet after automatically switching to a different language voice. + Break words with characters from different alphabets into separate words. + Ignore soft-hyphen (U+00AD) in text. + Klatt vioices, improved nasal vowels. + espeak-data can be compiled using a different sample rate than the default 22050Hz. eSpeak will then generate speech at that sample rate. + Change the structure of the espeak-data/voices directory to use subdirectories for europe, asia, and others. + Add suffix option 'm' to allow multiplr suffixes to be removed from a word. + Allow $text attribute when a text translation is given in a different alphabet. + Phoneme definitions. - Add NOT operator in conditions. - Add prevVowel() and nextPh2W() - Ignore UTF8-BOM sequence at the start of phoneme definition files. + espeakedit application. - Use wxWidgets 2.8 on Linux. - Use wxNotebook for prosody and vowel pages. - Add an option to compile the phoneme data at a specified sample rate (uses the 'sox' program for the conversion of WAV file data). - Add easpeak-fix-bufferoverflow-strncpy.patch; fix a bufferoverflow from dictionnary sources files * Sat Sep 15 2012 schwab@linux-m68k.org - Use %%{optflags}. * Sat Jul 7 2012 embar@super.lt - Update to version 1.46.02 * Sun Sep 18 2011 jengelh@medozas.de - Remove redundant/obsolete tags/sections from specfile (cf. packaging guidelines) * Tue Mar 22 2011 tiwai@suse.de - Fix full-volume reset problem with PulseAudio (bnc#679975) * Wed Apr 7 2010 vuntz@opensuse.org - Update to version 1.43.03: + Fix crash when embedded control codes are followed by numbers of 5 or more digits. + Fix lang=hu, First character of an abbreviation is missed after an ordinal number (eg."2. cd") + Fix XML tag not recognized after "..." when announce punctuation is enabled. + Fix lang=zh-yue, 'p' 't' 'k' after a vowel give a long pause. + Fix lang=ru, "o" missing in unstressed syllables. - Changes from version 1.43.02: + Language improvements including Danish. + Fix: " 50000" with leading spaces was spoken as "50". + Don't consider multiple spaces as a thousands separator (eg. "2 000"). + Fixed phoneme [n^] for klatt synthesizer. + Lang=Hungarian, don't allow dot as thousands separator. - Changes from version 1.43: + New format for phoneme definitions, including conditional statements for more flexibility. + Added voice variants which use the Klatt synthesizer rather than the eSpeak synthesizer: klatt, klatt2, klatt3 + Fixes to the Klatt synthesizer. + Updated phoneme data for use in the Klatt synthesizer. + Allow optional .txt filename suffix for *_rules and *_list files. + HTML tags should not insert a space when they are removed. This could cause a break inside a word (eg. , ). + Fixes to correctly recognise space as a thousands separator in some languages. - Changes from version 1.42: + Improvements to languages including Hungarian, Portuguese, Tamil + Changes to intonation when announcing punctuation (--punct option). + Recognise key names in and allow translation into the current language. + *_list files, added attribute $hasdot for abbreviations. The rule only applies if the word is followed by a dot. + SSML (as used by Speech Dispatcher), fix problems where a tag after a dot meant that end-of-sentence and ordinal numbers were not recognized correctly. - Changes from version 1.41: + Added language: da Danish + Language: it Italian, added dictsource/it_listx with data for stress positions and open/close "e" and "o" vowels. + Languages: pt, it: Fixed a crash when speaking some numbers. + Fixed numbers greater than 1000000 for Indian languages. + -m option now ignores XML comments. + -b option now has a value (4) to specify 16 bit character input text. + -g option (word gap) fixed for Windows. + --punct option. Fix some unnecessary pauses when speaking punctuation names. + SSML: fixed bug where was ignored before some punctuation characters. + Changed the format of formant data in espeak-data/phondata, to add extra parameters for use by a Klatt synthesizer. Changed the formant dialogue in espeakedit to include these. + F7 and F8 formants are now fixed at 7800Hz and 90000Hz. + "Text position" in callback events is no longer limited to 16 bits. + Fixed problems with word-length indications in callback events. + Some changes to allow compilation on WinCE/Windows Mobile, with notes in platforms/windowsMobile. + *_list files: - Add feature for ordinal numbers (for some languages). - Allow hyphenated word groups to start with a number. - Allow "words" of symbols to contain brackets. - Changes from version 1.40: + Added languages: lv Latvian, ca Catalan, sq Albanian, hy Armenian. + Adjusted the tonal quality of the speech to reduce the harshness slightly. + Language improvements include: English/US, Esperanto. + Windows SAPI5 installer: Remove the limit on the number of eSpeak voices which can be installed. + -m command option: Ignore text within