rooneyl has asked for the wisdom of the Perl Monks concerning the following question:

Hello,
I am trying to write a perl program that will help my child with their spelling. As I will make it work through the web browser I am looking for a way to convert the text input into some sort of sound file. This will get played when they click on a button.
From my original research I was going to use epeak (there is a cpan module for it), but it doesn't want to install on my system. Many others that I have found are for window based machines using MicrosoftSam voice, this is no good for me as I use a Sun box (OS solaris).
Any suggestions or help would be gratefully received, I am beginning to think I might not be able to do it.
Thank you all.
--UPDATE FROM HERE --
Tried to install festival, and failed. It doesn't like my OS (solaris10). I would like to persevere with the espeak. I know the next bit is a bit off-subject for perlmonks but could anyone help me with these error messages.
g++ -shared -Wl,h,libespeak.so.1 -o libespeak.so x_speak_lib.o x_compi +ledict.o x_dictionary.o x_intonation.o x_readclause.o x_setlengths.o +x_numbers.o x_synth_mbrola.o x_synthdata.o x_synthesize.o x_translate +.o x_tr_english.o x_tr_languages.o x_voices.o x_wavegen.o x_phonemeli +st.o x_espeak_command.o x_event.o x_fifo.o x_wave.o x_debug.o -lstdc+ ++ -lpthread ld: fatal: file h: open failed: No such file or directory ld: fatal: file libespeak.so.1: open failed: No such file or directory ld: fatal: File processing errors. No output written to libespeak.so collect2: ld returned 1 exit status make: *** [libespeak.so] Error 1
My OS is sunOS, and I am using gcc3.4.6.
Thanks

Replies are listed 'Best First'.
Re: Text to Speech
by marto (Cardinal) on Nov 07, 2008 at 10:05 UTC
Re: Text to Speech
by Fletch (Bishop) on Nov 07, 2008 at 13:40 UTC

    Seconding the recommendation of Festival if you could get it working (I wouldn't think it should take that much monkeying to get it going on solaris10, but as you're having problems diagnosing your linking problems you just may not be the person to do that :).

    As for your linking problem, -Wl,foo tells gcc to pass the foo after the comma to the the linker; "h,libespeak.so.1" isn't a valid linker option so it's griping. Whatever made your Makefile is either confuzzled about the compiler toolchain it's using or just broken. I'd imagine it should be more like -Wl,libespeak.so.1 instead but that's just a WAG. Your best bet is to find your local sysadmin or C programmer and ply them with pizza and/or skittles and/or brewed beverages; alternately see if there's a support mailing list for the package in question and google through its archives before sending the list a copy of the problem (with relevant details like what platform this is occurring on) asking for help there.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Re: Text to Speech
by almut (Canon) on Nov 07, 2008 at 15:08 UTC
    ... -Wl,h,libespeak.so.1 ...

    That's a typo in the Makefile in the Solaris options... It should be -Wl,-h,... (note the dash). I.e., change SONAME_OPT to read:

    SONAME_OPT=-Wl,-h,

    Also, I had to add -lrt (realtime lib) to the final linker call, i.e.

    LIBS3=-lstdc++ -L . -lespeak -lrt

    (otherwise, a number of symbols like sem_wait etc. could not be resolved...)

    But with those changes I got it to compile on Solaris 10 (`uname -a`: SunOS solaris10 5.10 Generic sun4u sparc SUNW,Sun-Blade-2500) with gcc 3.4.6.  Good luck!

      Thank you for help, that info worked.
      Just wondering if you can help me with what I hope to be the final problem. I get a make install error of:
      # Install espeak executable install -m 755 espeak /usr/local/bin gmake: install: Command not found gmake: *** [install] Error 127
      Any ideas? Is there something wrong with my makefile?
      install: all # Create directories rm -rf $(DESTDIR)$(DATADIR) $(MKDIR) $(DESTDIR)$(BINDIR) $(MKDIR) $(DESTDIR)$(LIBDIR) $(MKDIR) $(DESTDIR)$(INCDIR) $(MKDIR) $(DESTDIR)$(DATADIR) # Install espeak executable $(INSTALL) -m 755 $(BIN2_NAME) $(DESTDIR)$(BINDIR) # Install shared library $(INSTALL) -m 755 $(LIB_NAME).$(LIBTAG) $(DESTDIR)$(LIBDIR) # Install static library $(INSTALL) -m 755 $(STATIC_LIB_NAME) $(DESTDIR)$(LIBDIR) $(LN_SF) $(LIB_NAME).$(LIBTAG) $(DESTDIR)$(LIBDIR)/$(LIB_NAME) +.$(LIB_VERSION) $(LN_SF) $(LIB_NAME).$(LIB_VERSION) $(DESTDIR)$(LIBDIR)/$(LIB_ +NAME) # Install development headers $(INSTALL) -pm 644 speak_lib.h $(DESTDIR)$(INCDIR) # Install data files cp -prf ../espeak-data/* $(DESTDIR)$(DATADIR)

      Thanks for all your help.
        gmake: install: Command not found

        install is a little utility to copy files and set attributes. It doesn't come with all flavors of Unix, so you might want to install the GNU version (from the coreutils package) into some place where it's found along $PATH.  If all else fails, you should also be able to fake its functionality with a combination of cp, chmod and chown put into a little script. Or even simply copy the files manually...

Re: Text to Speech
by zentara (Cardinal) on Nov 07, 2008 at 17:21 UTC
    Try Festival's fast little brother Flite . It only needs basic c libs
    ldd /home/zentara/bin/flite linux-gate.so.1 => (0xffffe000) libm.so.6 => /lib/libm.so.6 (0xb7eb0000) libc.so.6 => /lib/libc.so.6 (0xb7d6e000) /lib/ld-linux.so.2 (0xb7ef7000) Use it like this: flite -t text #says the word text, or you can give it a file to r +ead
    It's only drawback is there is no selection of voices, like Festival has. (Well you can use FestVox voices, but if you can't install Festival, I don't know how it would work out). You can hear how it sounds at the end of flash japh. There it is at it's 8kHz low quality, it sounds better on a local machine outputting directly to a sound card.

    I'm not really a human, but I play one on earth Remember How Lucky You Are
Re: Text to Speech
by Gavin (Archbishop) on Nov 07, 2008 at 13:58 UTC

    rooneyl

    Have you considered running Sun Virtual Desktop on your Sun you could then use Microsoft Sam.

    I haven't used Sam myself but have found the Virtual desktop fine for other Windows apps