Hi Jonathan, I replied to Louie on the mac-access list that voice switching wasn't available as an embedded command, but that it was possible to specify the voice as an argument to "say" in terminal. Turns out that's enough for what he wants, since he can shell script this in bash. Here's an excerpt of the most relevant part of my reply:
<begin excerpt> I've never seen any embedded commands to change the voice, except the reset command "rset", which is defined as "The reset command resets the speech channel’s voice and attributes to default values" in the table for "The Mac OS X Embedded Speech Commands" under the section for "Techniques for Customizing Synthesized Speech" in the "Introduction to Speech Synthesis Programming Guide" at the Apple Developer's site: http://developer.apple.com/documentation/UserExperience/Conceptual/SpeechSynthesisProgrammingGuide/ The commands to change voice are usually implemented at a different level, as described in that document. So I could issue a command in terminal: say -v Fred "[[rate 400]]Do you have anything you want to say?" and have the switch for specifying the voice to the "say" commanded turned on ("-v"), then give the argument for the voice, and finally embed commands for the rate, volume, etc. into the quoted string. Or I could set a switch for a file and have the contents of a file (that might include embedded commands) read out. The guide gives examples of how to do this under the Cocoa or Carbon APIs using Objective C, or using AppleScript. <end excerpt> Cheers, Esther On Aug 30, 2009, Jonathan C. Cohn wrote: > > Take a look at: > http://developer.apple.com/mac/library/documentation/Carbon/Reference/Speech_Synthesis_Manager/Reference/reference.html#/ > /apple_ref/doc/constant_group/Speech_Channel_Information_Constants > > This is for Objective C, but I expect the objects exist in java too. > Essentially a parameter in setSpeechInfo will change voices for a > given channel. It appears a channel is linked to a synthesizer so you > would need to create a new channel if you need to change synthesizer . > > Jon > > On Aug 29, 2009, louie wrote: > >> >> Ann I want to change the voice from within a java program. thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/macvisionaries?hl=en -~----------~----~----~----~------~----~------~--~---
