Check out the guts of Win32::MSAgent, especially
sub Voice { my $self = shift; my $language = shift; my $voice = shift; $self->{_Characters}->{LanguageID} = $Languages->{$language}; $self->{_Characters}->{TTSModeID} = $Voices->{$language}->{$voice} +; }
and the associated Voices/Languages hashes
our $Voices ={'English (US)' => {'Adult Female #1' => '{CA141FD +0-AC7F-11D1-97A3-006008273008}', 'Adult Female #2' => '{CA141FD0- +AC7F-11D1-97A3-006008273009}', 'Adult Male #1' => '{CA141FD0- +AC7F-11D1-97A3-006008273000}', 'Adult Male #2' => '{CA141FD0- +AC7F-11D1-97A3-006008273001}', 'Adult Male #3' => '{CA141FD0- +AC7F-11D1-97A3-006008273002}', 'Adult Male #4' => '{CA141FD0- +AC7F-11D1-97A3-006008273003}', 'Adult Male #5' => '{CA141FD0- +AC7F-11D1-97A3-006008273004}', 'Adult Male #6' => '{CA141FD0- +AC7F-11D1-97A3-006008273005}', 'Adult Male #7' => '{CA141FD0- +AC7F-11D1-97A3-006008273006}', 'Adult Male #8' => '{CA141FD0- +AC7F-11D1-97A3-006008273007}'}, 'English (British)' => {'Carol' => '{227A0E40-A92A- +11d1-B17B-0020AFED142E}', 'Peter' => '{227A0E41-A92A-11 +d1-B17B-0020AFED142E}'}, 'Dutch' => {'Linda' => '{A0DDCA40-A92C-11 +d1-B17B-0020AFED142E}', 'Alexander'=> '{A0DDCA41-A92C-11 +d1-B17B-0020AFED142E}'}, 'French' => {'Véronique'=> '{0879A4E0-A92C-11 +d1-B17B-0020AFED142E}', 'Pierre' => '{0879A4E1-A92C-11 +d1-B17B-0020AFED142E}'}, 'German' => {'Anna' => '{3A1FB760-A92B-11 +d1-B17B-0020AFED142E}', 'Stefan' => '{3A1FB761-A92B-11 +d1-B17B-0020AFED142E}'}, 'Italian' => {'Barbara' => '{7EF71700-A92D-11 +d1-B17B-0020AFED142E}', 'Stefano' => '{7EF71701-A92D-11 +d1-B17B-0020AFED142E}'}, 'Japanese' => {'Naoko' => '{A778E060-A936-11 +d1-B17B-0020AFED142E}', 'Kenji' => '{A778E061-A936-11 +d1-B17B-0020AFED142E}'}, 'Korean' => {'Shin-Ah' => '{12E0B720-A936-11 +d1-B17B-0020AFED142E}', 'Jun-Ho' => '{12E0B721-A936-11 +d1-B17B-0020AFED142E}'}, 'Portuguese (Brazil)' => {'Juliana' => '{8AA08CA0-A1AE-11 +d3-9BC5-00A0C967A2D1}', 'Alexandre'=> '{8AA08CA1-A1AE-11 +d3-9BC5-00A0C967A2D1}'}, 'Russian' => {'Svetlana' => '{06377F80-D48E-11 +d1-B17B-0020AFED142E}', 'Boris' => '{06377F81-D48E-11 +d1-B17B-0020AFED142E}'}, 'Spanish' => {'Carmen' => '{2CE326E0-A935-11 +d1-B17B-0020AFED142E}', 'Julio' => '{2CE326E1-A935-11 +d1-B17B-0020AFED142E}'}}; our $Languages = {'Arabic' => 0x0401, 'Basque' => 0x042D, 'Chinese (Simplified)' => 0x0804, 'Chinese (Traditional)' => 0x0404, 'Croatian' => 0x041A, 'Czech' => 0x0405, 'Danish' => 0x0406, 'Dutch' => 0x0413, 'English (British)' => 0x0809, 'English (US)' => 0x0409, 'Finnish' => 0x040B, 'French' => 0x040C, 'German' => 0x0407, 'Greek' => 0x0408, 'Hebrew' => 0x040D, 'Hungarian' => 0x040E, 'Italian' => 0x0410, 'Japanese' => 0x0411, 'Korean' => 0x0412, 'Norwegian' => 0x0414, 'Polish' => 0x0415, 'Portuguese (Portugal)' => 0x0816, 'Portuguese (Brazil)' => 0x0416, 'Romanian' => 0x0418, 'Russian' => 0x0419, 'Slovakian' => 0x041B, 'Slovenian' => 0x0424, 'Spanish' => 0x0C0A, 'Swedish' => 0x041D, 'Thai' => 0x041E, 'Turkish' => 0x041F};
Give it a try and see if it runs (i believe/hope all you have to do is set the appropriate values for $voice->{LanguageID} and $voice->{TTSModeID}).

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.


In reply to Re: Changing the voice in MS Text to speech? by PodMaster
in thread Changing the voice in MS Text to speech? by Massyn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.