Is NSSpeechSynthesizer multithreaded safe

  • Hi,

    Is NSSpeechSynthesizer multithreaded safe. I am trying to speak to a
    number of different files at the same time. I will ask
    NSSpeechSynthesizer to speak a large NSString to a file and before it
    is finished I will ask NSSpeechSynthesizer to speak a number of
    different large NSString objects to different files.

    I can not find any information on whether or not I have to wait until
    NSSpeechSynthesizer has finished speaking to the first file before I
    can start speaking to the second file, or is it safe to do this with a
    new thread for each time I want to speak to a file. Using
    multithreaded method, seems to be crashing now and again.

    Any help on this would be great.

    Regards,
    Dave.
  • Hi David,

    If the documentation doesn't explicitly states that a particular
    class / method is thread safe (and what thread safety means in that
    particular context), you should assume that it isn't, and that you can
    only access it from the main thread. Please refer to the Cocoa thread
    safety guidelines:

    <http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/Mu
    ltithreading.html
    >

    If you would want to request that a particular class / method be made
    thread safe, or if you need clearer documentation, please file
    enhancement requests with Apple.

    j o a r

    On Dec 16, 2007, at 11:05 AM, David Brennan wrote:

    > Is NSSpeechSynthesizer multithreaded safe. I am trying to speak to a
    > number of different files at the same time. I will ask
    > NSSpeechSynthesizer to speak a large NSString to a file and before it
    > is finished I will ask NSSpeechSynthesizer to speak a number of
    > different large NSString objects to different files.
    >
    > I can not find any information on whether or not I have to wait until
    > NSSpeechSynthesizer has finished speaking to the first file before I
    > can start speaking to the second file, or is it safe to do this with a
    > new thread for each time I want to speak to a file. Using
    > multithreaded method, seems to be crashing now and again.
previous month december 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today