Recent

Author Topic: Is there any text to speech component for lazarus  (Read 9189 times)

Kushal

  • New Member
  • *
  • Posts: 33
Is there any text to speech component for lazarus
« on: January 29, 2013, 01:36:00 pm »
i would like to create an application with text to speech capability(linux) ...

in delphi i use microsoft speech SDK 5.1 .... 

im not able to find any way in lazarus .. if there is any please let me know....

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Is there any text to speech component for lazarus
« Reply #1 on: January 29, 2013, 01:51:14 pm »
I'd suggest you start searching the wiki. The answer is there.

Good luck.

(Oh and you might try searching the forum which will probably bring up the post that lead to the wiki page etc.)

Finally, please specify OS and Lazarus version next time in case that matters.

Thanks.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: Is there any text to speech component for lazarus
« Reply #2 on: January 29, 2013, 01:52:32 pm »
In Linux, you can use espeak mbrola and aplay via TProcess

My CommandLine looks like this:

Code: [Select]
AProcess.CommandLine := '/usr/bin/sh -c "/usr/bin/espeak -v mb-de2 -f '+FileName+' | mbrola -e /usr/share/mbrola/de3/de3 - - | aplay -r19500 -fS16"';
Where FileName ist the UTF8 Text File.
I don't know much more about it, but this speaks here.  ;-)

Carver413

  • Full Member
  • ***
  • Posts: 119
Re: Is there any text to speech component for lazarus
« Reply #3 on: January 29, 2013, 02:46:42 pm »
I would choose flite or festival over espeak they sound better

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: Is there any text to speech component for lazarus
« Reply #4 on: January 29, 2013, 03:01:02 pm »
I would choose flite or festival over espeak they sound better

It depends on the language you need. Afair, I could not find a german voice for festival

wjackson153

  • Sr. Member
  • ****
  • Posts: 267
Re: Is there any text to speech component for lazarus
« Reply #5 on: January 29, 2013, 06:56:55 pm »

Quote
In Linux, you can use espeak mbrola and aplay via TProcess

My CommandLine looks like this:

Aprocess.CommandLine.

CommandLine is depreciated, might I sugguest using the new method

Code: [Select]
   AProcess := TProcess.Create(nil);
   AProcess.Executable := '/bin/sh'; // depending on your linux distro path may differ
   Aprocess.Parameters.Add('-c');
   Aprocess.Parameters.add('/usr/bin/espeak -v mb-de2 -f' + FileName
  + ' | mbrola -e /usr/share mbrola  de3/de3 - - | aplay -r19500 -fS16');

I have covered this in detail on the wiki below the original topic

http://wiki.lazarus.freepascal.org/Executing_External_Programs#A_Simple_Example
Lazarus 1.1 r39490 CT FPC 2.7.1 i386-linux KDE
Linux Mint 14 KDE 4

Chronos

  • Full Member
  • ***
  • Posts: 240
    • PascalClassLibrary
Re: Is there any text to speech component for lazarus
« Reply #6 on: January 29, 2013, 07:31:24 pm »
And what about some multiplatform pascal native component? I remember some game with robotic text to speech even on old 8-bit computer.

Carver413

  • Full Member
  • ***
  • Posts: 119
Re: Is there any text to speech component for lazarus
« Reply #7 on: January 29, 2013, 10:41:31 pm »
I would choose flite or festival over espeak they sound better

It depends on the language you need. Afair, I could not find a german voice for festival
the Mary TTS  might have some german voices. I'm not using it right now as it was a bit buggy last time I played with it but  that could be fixed by now

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Is there any text to speech component for lazarus
« Reply #10 on: March 10, 2013, 11:28:01 pm »
With regard to Mac OS X, this topic has been discussed at http://lazarus.freepascal.org/index.php/topic,18903.0.html.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

 

TinyPortal © 2005-2018