How To Configure Espeak on Debian 11.3
- 00:32 lsb_release -a
- 00:45 apt list --installed | grep git
- 01:08 apt list --installed | grep make
- 01:29 git clone https://github.com/espeak-ng/espeak-ng.git
- 02:10 apt install autoconf automake pkg-config libgtk-3-dev dh-autoreconf
- 03:10 cd espeak-ng/
- 03:25 ./autogen.sh
- 03:46 ./configure --prefix=/usr
- 04:14 make
- 04:25 make install
- 04:43 espeak-ng -v en-us --stdout "hai how are you" -s 100 > /home/linuxhelp/Music/test.mp3
To Configure Espeak On Debian 11.3
Introduction:
Espeak is an open-source, portable speech synthesizer software tool for English and other languages, which is available in a compact size for Linux and Windows. The voice is clear, and the speed is high, but it's not as smooth or natural as larger synthesizers that mimic human speech.
Installation Procedure:
Step 1: Check the OS version by using the below command
root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Step 2: Check the dependency package GIT by using the below command
root@linuxhelp:~# apt list --installed | grep git
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
dash/stable,now 0.5.11+git20200708+dd9ef66-5 amd64 [installed]
gedit-plugin-git/stable,now 3.38.1-1 amd64 [installed,automatic]
gir1.2-ggit-1.0/stable,now 0.99.0.1-1+b1 amd64 [installed,automatic]
git-man/stable,now 1:2.30.2-1 all [installed,automatic]
git/stable,now 1:2.30.2-1 amd64 [installed]
goldendict/stable,now 1.5.0~rc2+git20200409+ds-2 amd64 [installed,automatic]
xserver-xorg-video-intel/stable,now 2:2.99.917+git20200714-1+deb11u1 amd64 [installed,automatic]
xserver-xorg-video-qxl/stable,now 0.1.5+git20200331-1 amd64 [installed,automatic]
ycmd/stable,now 0+20201028+git1d415c5+ds-1+b2 amd64 [installed,automatic]
Step 3: Check dependency package make by using the below command
root@linuxhelp:~# apt list --installed | grep make
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
automake/stable,now 1:1.16.3-2 all [installed,automatic]
libpagemaker-0.0-0/stable,now 0.0.4-1 amd64 [installed,automatic]
make/stable,now 4.3-4.1 amd64 [installed,automatic]
Step 4: Clone the Espeak repository by using the below command
root@linuxhelp:~# git clone https://github.com/espeak-ng/espeak-ng.git
Cloning into 'espeak-ng'...
remote: Enumerating objects: 45153, done.
remote: Counting objects: 100% (64/64), done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 45153 (delta 25), reused 50 (delta 19), pack-reused 45089
Receiving objects: 100% (45153/45153), 51.09 MiB | 5.35 MiB/s, done.
Resolving deltas: 100% (31205/31205), done.
Updating files: 100% (2517/2517), done.
Step 5: Install the dependency Packages by using the below command
root@linuxhelp:~# apt install autoconf automake pkg-config libgtk-3-dev dh-autoreconf
eading package lists... Done
Building dependency tree... Done
Reading state information... Done
autoconf is already the newest version (2.69-14).
autoconf set to manually installed.
automake is already the newest version (1:1.16.3-2).
automake set to manually installed.
dh-autoreconf is already the newest version (20).
dh-autoreconf set to manually installed.
pkg-config is already the newest version (0.29.2-1).
pkg-config set to manually installed.
Step 6: Change to the Espeak directory by using the below command
root@linuxhelp:~# cd espeak-ng/
Step 7: Install the Espeak by using the below command
root@linuxhelp:~/espeak-ng# ./autogen.sh
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:4: installing './compile'
configure.ac:4: installing './config.guess'
configure.ac:4: installing './config.sub'
configure.ac:3: installing './install-sh'
configure.ac:3: installing './missing'
Makefile.am:487: warning: '%'-style pattern rules are a GNU make extension
Makefile.am:498: warning: '%'-style pattern rules are a GNU make extension
Makefile.am:509: warning: '%'-style pattern rules are a GNU make extension
Makefile.am:512: warning: *F: non-POSIX variable name
Makefile.am:1056: warning: '%'-style pattern rules are a GNU make extension
Makefile.am: installing './INSTALL'
Makefile.am: installing './depcomp'
Step 8: Configure the installation by using the below command
root@linuxhelp:~/espeak-ng# ./configure --prefix=/usr
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
Step 9: Run the “make” command to update dependencies by using the below command
root@linuxhelp:~/espeak-ng# make
Makefile:2846: warning: ignoring prerequisites on suffix rule definition
make all-am
make[1]: Entering directory '/root/espeak-ng'
Makefile:2846: warning: ignoring prerequisites on suffix rule definition
CC src/speak-ng.o
In file included from src/speak-ng.c:23:
src/espeak-ng.c: In function ‘main’:
src/espeak-ng.c:744:3: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
744 | fread(p_text, 1, filesize, f_text);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC src/ucd-tools/src/libespeak_ng_la-case.lo
CC src/ucd-tools/src/libespeak_ng_la-categories.lo
CC src/ucd-tools/src/libespeak_ng_la-ctype.lo
CC src/ucd-tools/src/libespeak_ng_la-proplist.lo
CC src/ucd-tools/src/libespeak_ng_la-scripts.lo
CC src/ucd-tools/src/libespeak_ng_la-tostring.lo
CC src/libespeak-ng/la-compiledata.lo
src/libespeak-ng/compiledata.c: In function ‘LoadDataFile.part.0.isra’:
src/libespeak-ng/compiledata.c:1034:40: warning: ‘%s’ directive output may be truncated writing up to 199 bytes into a region of size 180 [-Wformat-truncation=]
1034 | snprintf(filename, sizeof(filename), "%s/%s", phsrc, path);
| ^~ ~~~~~
In file included from /usr/include/stdio.h:866,
from src/include/compat/stdio.h:30,
from src/libespeak-ng/compiledata.c:27:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output 2 or more bytes (assuming 201) into a destination of size 180
src/libespeak-ng/compiledata.c: In function ‘espeak_ng_CompilePhonemeDataPath’:
src/libespeak-ng/compiledata.c:2559:20: warning: ‘/phonemes’ directive writing 9 bytes into a region of size between 1 and 200 [-Wformat-overflow=]
Mbrola translation file: /root/espeak-ng/espeak-ng-data/mbrola_ph/us_phtrans -- 50 phonemes
mkdir -p espeak-ng-data/mbrola_ph
ESPEAK_DATA_PATH=/root/espeak-ng src/espeak-ng --compile-mbrola=phsource/mbrola/us3
Mbrola translation file: /root/espeak-ng/espeak-ng-data/mbrola_ph/us3_phtrans -- 47 phonemes
mkdir -p espeak-ng-data/mbrola_ph
ESPEAK_DATA_PATH=/root/espeak-ng src/espeak-ng --compile-mbrola=phsource/mbrola/vz
Mbrola translation file: /root/espeak-ng/espeak-ng-data/mbrola_ph/vz_phtrans -- 94 phonemes
make[1]: Leaving directory '/root/espeak-ng'
Step 10: Run “make install” to compile the programs by using the below command
root@linuxhelp:~/espeak-ng# make install
Makefile:2846: warning: ignoring prerequisites on suffix rule definition
make[1]: Entering directory '/root/espeak-ng'
Makefile:2846: warning: ignoring prerequisites on suffix rule definition
/usr/bin/mkdir -p '/usr/lib'
/bin/bash ./libtool --mode=install /usr/bin/install -c src/libespeak-ng.la '/usr/lib'
libtool: install: /usr/bin/install -c src/.libs/libespeak-ng.so.1.1.51 /usr/lib/libespeak-ng.so.1.1.51
libtool: install: (cd /usr/lib && { ln -s -f libespeak-ng.so.1.1.51 libespeak-ng.so.1 || { rm -f libespeak-ng.so.1 && ln -s libespeak-ng.so.1.1.51 libespeak-ng.so.1; }; })
libtool: install: (cd /usr/lib && { ln -s -f libespeak-ng.so.1.1.51 libespeak-ng.so || { rm -f libespeak-ng.so && ln -s libespeak-ng.so.1.1.51 libespeak-ng.so; }; })
libtool: install: /usr/bin/install -c src/.libs/libespeak-ng.lai /usr/lib/libespeak-ng.la
libtool: install: /usr/bin/install -c src/.libs/libespeak-ng.a /usr/lib/libespeak-ng.a
libtool: install: chmod 644 /usr/lib/libespeak-ng.a
/usr/bin/mkdir -p '/usr/bin'
/bin/bash ./libtool --mode=install /usr/bin/install -c src/speak-ng src/espeak-ng '/usr/bin'
libtool: install: /usr/bin/install -c src/speak-ng /usr/bin/speak-ng
libtool: install: /usr/bin/install -c src/.libs/espeak-ng /usr/bin/espeak-ng
make install-exec-hook
make[2]: Entering directory '/root/espeak-ng'
Makefile:2846: warning: ignoring prerequisites on suffix rule definition
cd /usr/bin && rm -f espeak && ln -s espeak-ng espeak
cd /usr/bin && rm -f speak && ln -s speak-ng speak
cd /usr/lib && rm -f libespeak.la && ln -s libespeak-ng.la libespeak.la
make[2]: Leaving directory '/root/espeak-ng'
/usr/bin/mkdir -p '/usr/include/espeak'
/usr/bin/install -c -m 644 src/include/espeak/speak_lib.h '/usr/include/espeak'
/usr/bin/mkdir -p '/usr/include/espeak-ng'
/usr/bin/install -c -m 644 src/include/espeak-ng/encoding.h src/include/espeak-ng/espeak_ng.h src/include/espeak-ng/speak_lib.h '/usr/include/espeak-ng'
make[2]: Entering directory '/root/espeak-ng'
Makefile:2846: warning: ignoring prerequisites on suffix rule definition
rm -rf /usr/share/espeak-ng-data
mkdir -p /usr/share/espeak-ng-data
cp -prf espeak-ng-data/* /usr/share/espeak-ng-data
make[2]: Leaving directory '/root/espeak-ng'
make[1]: Leaving directory '/root/espeak-ng'
Step 11: Run the following command to convert the text to speech by using the below command
root@linuxhelp:~/espeak-ng# espeak-ng -v en-us --stdout "hai how are you" -s 100 > /home/linuxhelp/Music/test.mp3
Step 12: Play the audio as shown in the below image


Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps required to configure Espeak on Debian 11.3. Your feedback is much welcome.
Comments ( 0 )
No comments available