Localizing SAPI Text-To-Speech to spanish

I have managed to use SAPI Text-To-Speech in Delphi/Lazarus by using the following code:

procedure TForm1.Button1Click(Sender: TObject);
var
  SpVoice: Variant;
begin
  SpVoice := CreateOleObject('SAPI.SpVoice');
  SpVoice.Speak('Hello World!', 0);
end;  

This code automatically chooses an english standard voice. Since I need to localize it to spanish I investigated if my system (Windows XP with standard Spanish) had a spanish voice or I needed to install it, and how to change the default voice, but no luck so far. Therefore my questions are:

  1. How can I know if my system already has a spanish voice installed or I need to install it?
  2. Supposing I have the voice I need installed, how can I make SAPI use that voice instead of the standard one?

I am guessing I can get a spanish voice by using following code (C0A is the code for spanish language):

SpVoice.GetVoices('','Language=C0A').Item(0)

but do not know how to set the voice to be used.

EDIT: to avoid confusions, I need to make this compatible with Delphi and Lazarus, being the last one the primary development tool.

Answers


No freely available version of SAPI comes packaged with a Spanish voice. SAPI 5.1 for XP comes with a Chinese and English voice; SAPI 5.3 and SAPI 5.4 have only English voices installed.

You can purchase a Spanish voice from Cepstral (among other vendors) that will work for any version of SAPI 5. (I have not used these voices, so I cannot vouch for the quality of these voices.)


here all you needed

http://edn.embarcadero.com/article/29583


Need Your Help

Installing Qt and PySide on Angstrom

python-2.7 qt4 pyside beagleboneblack angstrom-linux

I tryed to install PySide for interface development in Qt. I got it to work on my Arch box, but after several attempts to install it on Angstrom running on a BeagleBone Black rev. A5

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.