I found the problem. I was having the speech synth speak a tag line before the main string and was getting the didFinishSpeaking: call back when the tag was cut off by the main string starting to be spoken. Thanks for confirming that it was my own fault. :-)

->Ben
--
Ben Lachman
Acacia Tree Software

http://acaciatreesoftware.com

[EMAIL PROTECTED]
740.590.0009



On Mar 13, 2008, at 11:30 AM, Dave Verwer wrote:

I have been using this callback extensively recently in the way you
describe and have not seen this issue either.

On 3/13/08, Paul Bruneau <[EMAIL PROTECTED]> wrote:
On Mar 13, 2008, at 5:27 AM, Ben Lachman wrote:

According to the NSSpeechSynthesizer docs:

speechSynthesizer:didFinishSpeaking: is invoked when the speaking of
the string ends. The second parameter of this method indicates
whether the text was entirely spoken or was disrupted (as might
happen if the user dismisses a spoken alert).

This make me think that I should get my delegate method called when
the speech stops in the users perception.  However in my code I have
it speak fairly long strings and the didFinishSpeaking: delegate
method gets called back almost immediately.  Is this correct
behavior?   I tried Uli's UKSpeechSynthesizer replacement for
NSSpeechSynthesizer, but it seems to have the same issues.  If this
is the correct behavior, is there a way to figure out when the
speech is actually done form the user's perspective (ie the audio
output actually stops)?   I'm trying to get a slide show type
animation synced with speaking text and if I can't find out when the
speech is done I'm not sure how I'm going to advance the animation
at the correct time.

Thanks,

->Ben


Hi-

I don't see the behavior you are reporting. Aaron's book has a famous example that uses -didFinishSpeaking to disable a "Stop" button on an
 interface when the current speech completes, and it gets called
 exactly when the speech stops speaking.

 You can download his code and try it:
 http://bignerdranch.com/products/cocoa1.shtml

Look for the solutions to the exercises link. The example I looked at
 is in the "05_HelperObjects" folder and is called "SpeakLine_D"



 _______________________________________________

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com

 Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/dave.verwer% 40shinydevelopment.com

 This email sent to [EMAIL PROTECTED]



--
e-mail: [EMAIL PROTECTED]
web: http://shinydevelopment.com

Shiny Development Ltd. is registered in England, Registration Number:
05805802. Registered Office: 4 Claridge Court, Lower Kings Road,
Berkhamsted, Herts., HP4 2AF.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/blachman%40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to