tvjon
Posts: 538
Joined: Mon Jan 07, 2013 9:11 am

Re: New text-to-speech (TTS) engine

Fri Jun 26, 2015 9:01 am

Initially I tried following mascal's link procedure, seemingly to me, odd way of building pico, resulting in:

dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: source package svox
dpkg-buildpackage: source version 1.0+git20110131-2
dpkg-buildpackage: source changed by Samuel Thibault <sthibault@debian.org>
dpkg-buildpackage: host architecture armhf
dpkg-source --before-build svox-1.0+git20110131
fakeroot debian/rules clean
dh clean --sourcedirectory=pico
dh_testdir -O--sourcedirectory=pico
debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/pi/svox-1.0+git20110131'
rm pico/pico2wave.1 ||:
rm: cannot remove `pico/pico2wave.1': No such file or directory
cd pico && test -f Makefile && make clean ||:
chmod +x ./pico/autogen.sh
cd pico && ./autogen.sh clean
make[1]: Leaving directory '/home/pi/svox-1.0+git20110131'
dh_clean -O--sourcedirectory=pico
dpkg-source -b svox-1.0+git20110131
dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../svox_1.0+git20110131.orig.tar.{bz2,gz,lzma,xz}
dpkg-buildpackage: error: dpkg-source -b svox-1.0+git20110131 gave error exit status 255
pi@pi2 ~/svox-1.0+git20110131 $


So, as I've no idea what's going on there, I decided to try building pico using the traditional route :)

Unsure if the previous operation upset anything, but I had to use sudo for these procedures, usually unnecessary up until install.
You can check your own build against these lines.


pi@pi2 ~/svox-1.0+git20110131/pico $ sudo ./autogen.sh
libtoolize: putting auxiliary files in `.'.
libtoolize: linking file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: linking file `m4/libtool.m4'
libtoolize: linking file `m4/ltoptions.m4'
libtoolize: linking file `m4/ltsugar.m4'
libtoolize: linking file `m4/ltversion.m4'
libtoolize: linking file `m4/lt~obsolete.m4'
configure.in:10: installing `./config.guess'
configure.in:10: installing `./config.sub'
configure.in:7: installing `./install-sh'
configure.in:7: installing `./missing'
Makefile.am: installing `./depcomp'
Now run ./configure and then make.

So I did as suggested...

pi@pi2 ~/svox-1.0+git20110131/pico $ sudo ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
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 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
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
checking for poptGetContext in -lpopt... yes


pi@pi2 ~/svox-1.0+git20110131/pico $ sudo make -j4

...

Note here that pico doesn't like being built in a parallel fashion (pity, much quicker that way)

Makefile:550: recipe for target 'picobase.lo' failed
make: *** [picobase.lo] Error 1
make: *** Waiting for unfinished jobs....
libtool: compile: gcc -DPACKAGE_NAME=\"svox\" -DPACKAGE_TARNAME=\"svox\" -DPACKAGE_VERSION=\"1.0\" "-DPACKAGE_STRING=\"svox 1.0\"" -DPACKAGE_BUGREPORT=\"math.parent@gmail.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"svox\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -g -O2 -MT picoextapi.lo -MD -MP -MF .deps/picoextapi.Tpo -c lib/picoextapi.c -o picoextapi.o >/dev/null 2&1
mv -f .deps/picocep.Tpo .deps/picocep.Plo
libtool: compile: gcc -DPACKAGE_NAME=\"svox\" -DPACKAGE_TARNAME=\"svox\" -DPACKAGE_VERSION=\"1.0\" "-DPACKAGE_STRING=\"svox 1.0\"" -DPACKAGE_BUGREPORT=\"math.parent@gmail.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"svox\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -g -O2 -MT picodata.lo -MD -MP -MF .deps/picodata.Tpo -c lib/picodata.c -o picodata.o >/dev/null 2>&1
mv -f .deps/picoextapi.Tpo .deps/picoextapi.Plo
mv -f .deps/picodata.Tpo .deps/picodata.Plo

So continue the build serially:


pi@pi2 ~/svox-1.0+git20110131/pico $ sudo make

...


libtool: link: ( cd ".libs" && rm -f "libttspico.la" && ln -s "../libttspico.la" "libttspico.la" )
gcc -DPACKAGE_NAME=\"svox\" -DPACKAGE_TARNAME=\"svox\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"svox\ 1.0\" -DPACKAGE_BUGREPORT=\"math.parent@gmail.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"svox\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIBH=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -Wall -Dpicolangdir=\"/usr/local/share/pico/lang\" -I lib -g -O2 -MT pico2wave-pico2wave.o -MD -MP -MF .deps/pico2wave-picowave.Tpo -c -o pico2wave-pico2wave.o `test -f 'bin/pico2wave.c' || echo './'`bin/pico2wave.c
mv -f .deps/pico2wave-pico2wave.Tpo .deps/pico2wave-pico2wave.Po
/bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Dpicolangdir=\"/usr/local/share/pico/lang\" -I lib -g -O2 -o pico2wave pico2wave-pico2wave.o libttspico.la -lm -lpopt
libtool: link: gcc -Wall -Dpicolangdir=\"/usr/local/share/pico/lang\" -I lib -g -O2 -o .libs/pico2wave pico2wave-pico2wave.o ./.libs/libttspico.so -lm /usr/lib/arm-linux-gnueabihf/libpopt.so


which all worked nicely.

pi@pi2 ~/svox-1.0+git20110131/pico $ sudo make install

make[1]: Entering directory '/home/pi/svox-1.0+git20110131/pico'
/bin/mkdir -p '/usr/local/lib'
/bin/bash ./libtool --mode=install /usr/bin/install -c libttspico.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libttspico.so.0.0.0 /usr/local/lib/libttspico.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libttspico.so.0.0.0 libttspico.so.0 || { rm -f libttspico.so.0 && ln -s libttspico.so.0.0.0 libttspico.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libttspico.so.0.0.0 libttspico.so || { rm -f libttspico.so && ln -s libttspico.so.0.0.0 libttspico.so; }; })
libtool: install: /usr/bin/install -c .libs/libttspico.lai /usr/local/lib/libttspico.la
libtool: install: /usr/bin/install -c .libs/libttspico.a /usr/local/lib/libttspico.a
libtool: install: chmod 644 /usr/local/lib/libttspico.a
libtool: install: ranlib /usr/local/lib/libttspico.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/bin/mkdir -p '/usr/local/bin'
/bin/bash ./libtool --mode=install /usr/bin/install -c pico2wave '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/pico2wave /usr/local/bin/pico2wave
/bin/mkdir -p '/usr/local/include'
/usr/bin/install -c -m 644 lib/picoacph.h lib/picoapid.h lib/picoapi.h lib/picobase.h lib/picocep.h lib/picoctrl.h lib/picodata.h lib/picodbg.h lib/picodefs.h lib/picodsp.h lib/picoextapi.h lib/picofftsg.h lib/picokdbg.h lib/picokdt.h lib/picokfst.h lib/picoklex.h lib/picoknow.h lib/icokpdf.h lib/picokpr.h lib/picoktab.h lib/picoos.h lib/picopal.h lib/picopam.h lib/picopltf.h lib/picopr.h lib/picorsrc.h lib/picosa.h lib/picosig2.h lib/picosig.h lib/picospho.h lib/picotok.h lib/picotrns.h lib/picowa.h '/usr/local/include'
/bin/mkdir -p '/usr/local/share/pico/lang'
/usr/bin/install -c -m 644 lang/de-DE_gl0_sg.bin lang/de-DE_ta.bin lang/en-GB_kh0_sg.bin lang/en-GB_ta.bin lang/en-US_lh0_sg.bin lang/en-US_ta.bin lang/es-ES_ta.bin lang/es-ES_zl0_sg.bin lang/fr-FR_nk0_sg.bin lang/fr-FR_ta.bin lang/it-IT_cm0_sg.bin lang/it-IT_ta.bin '/usr/local/sharepico/lang'
make[1]: Leaving directory '/home/pi/svox-1.0+git20110131/pico'

pi@pi2 ~/svox-1.0+git20110131/pico $ sudo ldconfig


Finally, to test it:


pi@pi2 ~ $ pico2wave -w test.wav "it works! "

pi@pi2 ~ $ omxplayer -o local test.wav

Audio codec pcm_s16le channels 1 samplerate 16000 bitspersample 16
Subtitle count: 0, state: off, index: 1, delay: 0
have a nice day ;)
pi@pi2 ~ $


HTH

folded output
Posts: 3
Joined: Sat Aug 29, 2015 12:22 am

Re: New text-to-speech (TTS) engine

Sat Oct 10, 2015 12:49 am

A newbie here. As per a post over at elinux.org

http://elinux.org/RPi_Text_to_Speech_%2 ... _to_Speech

the pico section being
Pico Text to Speech

Google Android TTS engine.

sudo apt-get install libttspico-utils
pico2wave -w lookdave.wav "Look Dave, I can see you're really upset about this." && aplay lookdave.wav
Having listened to a sampling from Pico on an android tablet, and preferring it to espeak and festival, I therefore tried to do what that post said to do... first doing an update and upgrade, without problems, on Raspbian. Here is the attempt to then install Pico...

Code: Select all

$ sudo apt-get install libttspico-utils

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libttspico-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libttspico-utils' has no installation candidate
$ 
Short of compiling from source, I'm requesting help with what needs to be done in order to resolve this issue. Some hints to explore would be greatly appreciated, in the event that I encounter anything similar to this in the future, with other packages. And of course, is Pico still available and is it deemed *safe* and malware free?

Thank you.

AnzaShaikh
Posts: 13
Joined: Mon Apr 06, 2015 5:15 pm

Re: New text-to-speech (TTS) engine

Sun Nov 01, 2015 3:48 pm

Could anyone please tell me how to use pico TTS to read text files? I have tried everything but in vain.

This is what I have been using:
pico2wave -l en-US -w record.wav "Hello"

the above works fine.Now I want to send the text file to pico TTS such that it opens it and reads whatever is in the file.

Can anyone please help me with that?

Thank you!

pompiduskus
Posts: 7
Joined: Sun Mar 15, 2015 12:16 am

Re: New text-to-speech (TTS) engine

Tue Nov 17, 2015 9:17 pm

AnzaShaikh wrote:Could anyone please tell me how to use pico TTS to read text files? I have tried everything but in vain.

This is what I have been using:
pico2wave -l en-US -w record.wav "Hello"

the above works fine.Now I want to send the text file to pico TTS such that it opens it and reads whatever is in the file.

Can anyone please help me with that?

Thank you!
like this:
$ pico2wave -l en-US -w record.wav "$(cat file_name)" :)

Can some body help. I can't compile test binary.

It throw error:
"com_svox_picottsengine.cpp: No such file or directory"
Where can i get this file.

Or maybe some one has forked repo before modification ?

pompiduskus
Posts: 7
Joined: Sun Mar 15, 2015 12:16 am

Re: New text-to-speech (TTS) engine

Thu Nov 19, 2015 2:12 am

For every one who is looking for this util. See my repo.
it compiles 2 bin
1) text to wav file
2)text to std | aplay (direct play) for saving SD-live

https://github.com/ch3ll0v3k/picoPi2

abk41
Posts: 1
Joined: Thu Dec 01, 2016 5:56 am

Re: New text-to-speech (TTS) engine

Thu Dec 01, 2016 6:06 am

Hey, is there a way to test this on a mac ?

Return to “Graphics, sound and multimedia”

Who is online

Users browsing this forum: No registered users and 18 guests