WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Has anybody installed espeak-ng?  (Read 9632 times)

Offline labeas

  • Sr. Member
  • ****
  • Posts: 266
Has anybody installed espeak-ng?
« on: July 10, 2018, 10:11:38 PM »
=> App > Download+Load:  espeak-ng.tcz
-> which espeak-ng ==  /usr/local/bin/espeak =ok
-> espeak -h == espeak: error while loading shared libraries:
libasound.so.2: cannot open shared object file: No such file or directory
=> fetch libasound.tcz
-> tce-load -i ./libasound.tcz
libasound.tcz: OK

->  espeak-ng  -h == ok
-> espeak-ng "the rain in Spain" ==
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/local/etc/als
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
error: No such file or directory
=> Copy alsa.conf from T4/Slak: installation
== ALSA lib conf.c:3544:(snd_config_hook_load) cannot stat file/directory
  /usr/local/etc/alsa/cards/aliases.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.default
error: No such file or directory

??????????

aus9

  • Guest
Re: Has anybody installed espeak-ng?
« Reply #1 on: July 11, 2018, 01:17:12 AM »
Hi

until you get a better reply.....

first I have a quirk or fix required to get sound.....so I have a .local/bin/sound script that reads

Code: [Select]
#!/bin/sh
tce-load -i alsa-config alsa
sudo rmmod snd_hda_intel
sudo modprobe snd_hda_intel position_fix=1
sudo alsactl restore -f /home/tc/sound.levels

(2) then check your mixer levels such as command= alsamixer   or alternatively test for sound output with = speaker-test [-Ddefault:1] -c2 -t wav -l1

as per info from alsa-config.......as we need sound output before we can test text to speak

(3) for me txt to output works 
Code: [Select]
espeak-ng "the rain in Spain" == 
also works without the ==

Maybe we look at getting sound working first?

I would suggest you ensure alsa-config is loaded and not use another distro's file at this stage
« Last Edit: July 11, 2018, 01:19:44 AM by aus9 »

Offline labeas

  • Sr. Member
  • ****
  • Posts: 266
Re: Has anybody installed espeak-ng?
« Reply #2 on: July 13, 2018, 11:42:20 AM »
>   Maybe we look at getting sound working first?
----
Yes, of course. eg. `aplay sample.wav'
I was concentrating on the complexity of TC's download & install OR install at boot..?
Also, I: lame $1.wav $1.mp3; and listen to [TextToSpeech] on a different device.
TC64 is good to fetch the text [by links URL] and `wily` to <clean> it.
For TextToSpeech I've been using `festival`, but not via TC.
TC's espeak-ng doesn't sound any better than 10 years ago; and although
the <data files> for the MBROLA improvement were d/l-ed, I get:
"The specified espeak-ng voice does not exist."
   Since the "specified espeak-ng voice" to see if MBROLA is any better
than plain-espeak, has a name, and possibly a non-default Path-to-the-file,
I'm wondering if TC's having the files <sym-linked to loop-devices> is a
problem.
  Can we assume that espeak-ng was only added to our repetoire AFTER it was
confirmed as running on TC ?
.... OK, I've noted the script to control the SoundPlayer,
after the driver has been downloaded. But my priority is to
get the claimed speech improvement from MBROLA.
   Thanks.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14848
Re: Has anybody installed espeak-ng?
« Reply #3 on: July 13, 2018, 12:13:05 PM »
Can we assume that espeak-ng was only added to our repetoire AFTER it was
confirmed as running on TC ?

affirmative

Offline labeas

  • Sr. Member
  • ****
  • Posts: 266
Re: Has anybody installed espeak-ng?
« Reply #4 on: July 13, 2018, 01:59:54 PM »
>]   Can we assume that espeak-ng was only added to
>] our repetoire AFTER it was
>]  confirmed as running on TC ?

>   affirmative

I should have asked if the included mbrola refinements
have been confirmed ?
My understanding is that although mbrola's <translator>
is not included: its data [which gives better results] is.
-> ls /usr/local/share/espeak-ng-data/mbrola_ph ==
af1_phtrans  ee1_phtrans  hn1_phtrans  it3_phtrans ...
   Trying to use mbrola, I use 2 args [after many tries]:
-v <voice name> Use voice file of this name from espeak-ng-data/voices
--path="<path>"
      Specifies the directory containing the espeak-ng-data directory
but always get <-v arg not found>.
I was hoping that improved quality via mbrola-data, would allow
me to avoid needing to: `chroot <slakware partition to run> festival`
Thanks.



aus9

  • Guest
Re: Has anybody installed espeak-ng?
« Reply #5 on: July 13, 2018, 10:44:55 PM »
maybe you could build festival for TC?

http://festvox.org/packed/festival/2.5/
voices
http://festvox.org/packed/festival/2.5/voices/

and there is a git too
https://github.com/festvox/festival

I realize I have drifted off topic to espeak but you appear to use festival

Offline labeas

  • Sr. Member
  • ****
  • Posts: 266
Re: Has anybody installed espeak-ng?
« Reply #6 on: July 28, 2018, 12:45:48 AM »
> maybe you could build festival for TC?
...
I'm afraid to get bogged-down. Festival is a monster, needing to be matched to the hardware
and system. Only my RPi version ran directly from binaries.

aus9

  • Guest
Re: Has anybody installed espeak-ng?
« Reply #7 on: July 28, 2018, 08:27:29 AM »
ok well I looked at some online sound files claiming they are from various packages.

I played them thru my web browser and not natively....so that might explain some distortion?

see what you make of this if you have time to play them
blogger date Jan2018
http://blog.michaelamerz.com/wordpress/the-state-of-the-art-linux-text-to-speech-tts/

the blogger has elected to "we settled for Pico2Wave – with a few updates"

2) Have you explored the use of a web browser plugin/addon ?

3) What input file format must TTS be able to handle?

4) Do you need a certain language?

some quick reading suggests some langs prefer certain TTS software
« Last Edit: July 28, 2018, 08:55:09 AM by aus9 »

Offline labeas

  • Sr. Member
  • ****
  • Posts: 266
Re: Has anybody installed espeak-ng?
« Reply #8 on: August 16, 2018, 06:56:15 AM »
Sorry I've been away for a while.
Am I seriously "outdated" ?            -> uname -a ==
Linux box 4.2.9-tinycore64 #1999 SMP Mon Jan 18 19:59:34 UTC 2016
 x86_64 GNU/Linux
Summarising this thread so far:
 I use Festival TTS everyday, but from a mobile, while lying down, and not
from a computer, hence no need for <install/test alsa...etc.>
Probably espeak was originaly intended for operating at the computer.
Of course TTS quality is very subjective, and comprehension changes while
learning. Because I want to keep TC minimalist, I don't want to get
involved in <building & gcc>. So under TC, I must <chroot non-TC Festival>.
RPi having the advantage that it's not <forked>: has a binary/pre-compiled
newer, version which seemed a bit better than my x86 ver2.1.

> .... see what you make of this
> http://blog.michaelamerz.com/wordpress/
>   the-state-of-the-art-linux-text-to-speech-tts/
> ...the blogger has elected to "we settled for Pico2Wave - with
>  a few updates"

OK, the 3 *.mp3 heard are inferior to my Festival 2.1, but usable.

The best quality that I've got is [here's an example of what these
Micro$pook users can't appreciate the need to be able to do - I'll
now look into my M$ partition to get the info; and do it from INSIDE,
wily where I'm NOW composing this]:
 mount /dev/sda4 ; find /mnt/sda4/Users/Public/CRG -name TTS
=> /mnt/sda4/Users/Public/CRG/Speech finds:---------"
Description

   This program uses SAPI voices for Text to speech from the
   commandline.
   its a simple tool written in C#
   Samples included for English and Japanese, but you will need a
   Japanese voice installed on your PC

   [34]cmdSayIt Web Site
"---------------
This is an example of the power/use of `wily`: the ability to
branch-off and search [or even build/compile] other partitions
to get data for the text being composed, all seen on the
 SAME SCREEN.
================
> 3) What input file format must TTS be able to handle?

This is vitally important for proper text [not just short phrases]!
Many, including the <Japanese-one> pause at each end-of-line, which
is intolerable. So I needed to delete all EOL, also some M$ special
chars [perhaps:$, %] which terminated the text, need to be removed,
by a <text cleaning program>.

I use a sequence of sed to solve the problem of ASCII's <quote chars>
being replaced by the <cursed-MODERN 3 bytes>,eg:
   cat $1 |sed 's/\xc2\x80/\x22/g' |...text2wave...
but under TC:
-> echo "EU .s" |hexdump -C == 45 55 c2 80 73 0a
-> echo "EU .s" |sed 's/\xc2\x80/\x22/g' |hexdump -C
 == STILL: 45 55 c2 80 73 0a
So apparently TC's busybox sed doesn't handle hex-chars; but
 <chroot Slakware> for my Festival does.
 

aus9

  • Guest
Re: Has anybody installed espeak-ng?
« Reply #9 on: August 16, 2018, 09:16:26 PM »
Quote
So apparently TC's busybox sed doesn't handle hex-chars

then download and try sed.tcz ?

You may then need to run that command as

Code: [Select]
/usr/local/bin/sed etc
« Last Edit: August 16, 2018, 09:23:03 PM by aus9 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Has anybody installed espeak-ng?
« Reply #10 on: August 16, 2018, 09:42:41 PM »
Hi aus9
You may then need to run that command as

Code: [Select]
/usr/local/bin/sed etc
Just using  sed  will find it since  /usr/local/bin/  shows up before  /bin/  in the  PATH  environmental variable. The  sed  link
to  busybox  is in  /bin/.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14848
Re: Has anybody installed espeak-ng?
« Reply #11 on: August 17, 2018, 04:14:27 AM »
Hmm - I think it depends..

If you have first run /bin/sed using "sed" and then load the sed extension, "sed" will still run /bin/sed - due to hashing?

aus9

  • Guest
Re: Has anybody installed espeak-ng?
« Reply #12 on: August 17, 2018, 05:32:39 AM »
thanks guys and I forgot that OP has asked
Quote
Am I seriously "outdated" ?            -> uname -a ==
Linux box 4.2.9-tinycore64 #1999 SMP Mon Jan 18 19:59:34 UTC 2016

While I am on TC 9 which shows
Code: [Select]
uname -a
Linux box 4.14.10-tinycore64 #2018 SMP Mon Jan 1 16:07:42 UTC 2018 x86_64 GNU/Linux

and labeas....can I suggest you use code boxes please

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Has anybody installed espeak-ng?
« Reply #13 on: August 17, 2018, 08:33:44 AM »
Hi Juanito
Hmm - I think it depends..

If you have first run /bin/sed using "sed" and then load the sed extension, "sed" will still run /bin/sed - due to hashing?
Yes, you are correct. I had forgotten about  hashing  and some of the subtle symptoms it can produce.

If you run  sed,  then install  sed.tcz,  then run  sed  again in the same terminal, the first version of  sed  will be run again. To get
the newly installed version to run, either execute  hash -r  , or open a new terminal to run it. Here is a thread from 6 years ago
that covered this:
http://forum.tinycorelinux.net/index.php/topic,13162.0.html

Offline labeas

  • Sr. Member
  • ****
  • Posts: 266
Re: Has anybody installed espeak-ng?
« Reply #14 on: September 04, 2018, 08:24:00 PM »
Summary. I:
 Started by asking if espeak-ng had been installed on TC. Since espeak is small compared to the monster-Festival that I use.
 Pointed that the text input to the TTS must be <clean> so that "can't" doesn't sound like "sea aye en tea", and related:
 Discovered that TC's sed [used to clean the text] is problematic.
 My 32bit compiled/build of Flite [the more compact version of Festival] only speaks the last <utterances>, was
  reported by a GoogSearch as: "we've fixed that problem now". Thanks for wasting my time !!
I was going to ask about installing TC64's gcc to be able to compile/build the latest 64bit flite,
 but if [mere] sed is a problem: a big compile-build is unrealistic.
If I want TC64 to be small [without even Xorg] I must forget TTS ?