[Pythonmac-SIG] NSSpeechSynthesizer from AppKit?

Yuma Antoine Decaux jamyad7 at gmail.com
Thu May 2 07:34:06 CEST 2013


Thanks for that, it worked perfectly. Very exciting way to start understanding mac os related frameworks.

Best regards,

Yuma 









"Light has no value without darkness"
Mob: +61 (0)410732547
Skype: Shainobi1
twitter: http://www.twitter.com/triple7

This message is protected by article 4-210 of a certain book of laws but you don't have to worry about privacy issues if you are the intended recipient. However, if any freakish circumstance such as ip sniffing, honey pot open relay servers or an honest mistake caused a transmission error, please advise the sender and throw your laptop into a bubble bath to avoid all illicit data retention.

On 1/05/2013, at 11:43 PM, Ronald Oussoren <ronaldoussoren at mac.com> wrote:

> 
> On 1 May, 2013, at 14:37, Yuma Antoine Decaux <jamyad7 at gmail.com> wrote:
> 
>> Hi,
>> 
>> I've been trying to find a way to have speech output on an assignment GUI i'm working on for uni in Tkinter (they are forcing me) and since none of the UI elements on it are accessible, i'm trying to use either pyobjc with AppKit and some event handlers in Tkinter to get speech synthesis.
>> 
>> I've just successfully installed pyobjc and looked at the API notes. I couldn't find NSSynthesizer. Is this not available?
>> 
>> Just asking before i go any further.
> 
> NSSpeechSyntheziser is supported. There is nothing useful to mention beyond what's in the Apple documentation for the class, hence it is not mentioned in the API notes.
> 
> The following should work:
> 
>   from Cocoa import NSSpeechSynthesizer
> 
>   sp = NSSpeachSynthesizer.alloc().initWithVoice_(None) # use default voice
>   sp.startSpeakingString_("hello world")
> 
> You should probably ensure that the synthesizer object hangs around until it is done speaking.
> 
> Ronald
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20130502/e4e34d0a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zato1.jpg
Type: image/jpeg
Size: 6427 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20130502/e4e34d0a/attachment-0001.jpg>


More information about the Pythonmac-SIG mailing list