unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Adrian Robert <Adrian.B.Robert@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Can't get speechSynthesizer:didFinishSpeaking: to run on OS X
Date: Wed, 23 Jun 2010 07:42:38 +0000 (UTC)	[thread overview]
Message-ID: <loom.20100623T092919-604@post.gmane.org> (raw)
In-Reply-To: 3CB67123-8D98-425F-AAA7-F4C40F6C39A7@gmail.com

Ivan Andrus <darthandrus <at> gmail.com> writes:

> 
> I would like to add GNUstep/Cocoa speech synthesis to my local copy of emacs.
 I know this is an GNUstep/OS X
> only feature and that it will probably never make it into emacs.

It's not impossible -- features for the X11 interface at least, whether
implemented/implementable elsewhere, often make it in.  I can't speak to what
the criteria are for these kinds of things.  Anyway it sounds like an
interesting project.


> and I have set an instance as a delegate to an NSSpeechSynthesizer object, but
it never fires.  If I call it
> manually as
> 
> [[speech_synthesizer delegate] speechSynthesizer: speech_synthesizer
didFinishSpeaking: YES];
> 
> it works, so I don't think there is a problem with the callback, or the
delegate.  I read at 
> http://lists.apple.com/archives/cocoa-dev/2009/Feb/msg00624.html
> that asynchronous callbacks rely on the runloop.  I think Emacs.app does some
weird things with the
> runloop, so my question is, what must I do to get this to work?  Is it even
possible?  Does Emacs.app even use
> the runloop?

Emacs.app activates the run loop in a kind of stutter-step fashion using [NSApp
run] followed by [NSApp stop] repeatedly.  Certain asynchronous events work,
like open-file requests to the NSApplication delegate, and NSTextInput
callbacks.  I cannot recall any that positively DON'T work at the moment.  I
don't know if the system is handling the ones I mention differently from the
callback you're trying to get, but anyway it seems worth looking into a bit more.

One thing to check -- I have no idea how the speech synth subsystem works, but
if system events are involved you can intercept and print those in the
-sendEvent: method in nsterm.m.


-Adrian





  reply	other threads:[~2010-06-23  7:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-22 23:26 Can't get speechSynthesizer:didFinishSpeaking: to run on OS X Ivan Andrus
2010-06-23  7:42 ` Adrian Robert [this message]
2010-06-23 21:30   ` Ivan Andrus
2010-06-23 22:44     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20100623T092919-604@post.gmane.org \
    --to=adrian.b.robert@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).