[ANSWERED]Speech No Longer Working

Posted on
Tue Feb 28, 2017 10:38 am
jeffrey offline
Posts: 7
Joined: Feb 27, 2017

[ANSWERED]Speech No Longer Working

Hi,

This question pertains to Indigo 6.1.11 running under Yosemite 10.10.5 on a late 2008 iMac. The Mac is configured not to auto-logon, and to instead display the username and password fields. Fast user switching is enabled. Normal operation is for me to boot up the Mac, log in as myself using a local account, start the Indigo server and client, ensure everything starts up correctly, leave them running, and then use fast user switching to switch to the login screen. This way, I leave myself logged in with the Indigo client/server running. My kids then log on and off using their own individual local login accounts. When my kids are not actively using the computer, they log out of it, leaving the system sitting at the login screen. Things have been working very well like this for literally years... at least as far back as Indigo 5.

I have a couple of scheduled tasks that have a string in the speak field that cause my Mac to announce things like "House now entering night mode." For some reason, this stopped working some time ago. I don't know exactly how long, because my children occasionally use the Mac to play games and often leave the sound muted to avoid annoying the grownups. I also don't often change things on this particular Mac, because I prefer to keep it stable.

Regardless of when speech stopped working, it now posts in the Event Log in red text, "Error Unable to speak text". This same entry shows up in the Console window. When I am logged in and have my desktop displayed, speech works fine. I tried creating a single schedule that runs every minute to execute a single-line AppleScript that was only say "This is a scheduled announcement." I also populated the Speak field of that action with I just made an announcement. As long as I am logged in, with my desktop displayed, both phrases are spoken every 60 seconds. However, if I stay logged in but use fast user switching to display the user login prompt, nothing is spoken and I get the error posted in the Event Log and the Console.

Assuming this to be a MacOS problem, I created a cron job under my login. The cron job was set to run every minute and execute something like /usr/bin/osascript -e 'say "This is a cronjob"' Then I switched to the login screen, and sure enough, every minute my Mac speaks the cron job text. This tends to suggest to me that the problem has to do with Indigo, and not the MacOS.

Note that I'm not running Indigo server as a daemon. I'm leaving myself logged in with both the server and client running on my desktop. I'm just using fast user switching to leave myself logged in while bringing up the username/password login screen. As I said, this mechanism has worked really well for quite some time now. I can't honestly say when it stopped working. I have updated Indigo more often and more recently than the OS... is it possible one of the Indigo updates broke something?

Posted on
Tue Feb 28, 2017 12:13 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Speech No Longer Working

cron is a system daemon, so anything that's launched from it is independent of a user account.

The Indigo Server, however, is launched as a User process, so when you switch to the login screen, any interaction (ui, sound, etc) for those types of processes are (apparently) turned off. I say apparently because we don't do anything special from an API perspective - we just use the standard APIs to speak the text you've configured. It does seem to follow, however, since AppleScripts launched from Indigo show the same behavior (we have no control over speech from an AppleScript - we just start the script and the AS interpreter takes over.

In fact, if you open script editor and paste in the following script:

Code: Select all
repeat with i from 1 to 1000
   say "Hello number " & i
   delay 5
end repeat


Start it running, then switch to the login window, it will stop speaking. Wait for a while, then log in as your admin account again. It will start speaking again, but you'll notice that the number is higher. So the script is running, it's just not speaking.

If I had to guess, I'd guess that it happened several OS releases back when Apple changed how speech worked. It used to be sorta a built-in thing so the speech happened as part of the application process that called it. But a while back (can't remember which exactly) speech started happening in a separate process that the OS launches when it gets a request to speak something. My guess is that an app that's running in an account that's in the background can't launch new processes, even indirectly. But that's just a guess.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Mar 15, 2017 1:18 pm
jeffrey offline
Posts: 7
Joined: Feb 27, 2017

Re: [ANSWERED]Speech No Longer Working

Thank you, Jay, for the response. I tried the sample script you provided, and found the behavior to be exactly as you described. I understand that this really isn't an Indigo problem per se, but as it does affect Indigo users, and as it looks like this thread has been viewed by at least a couple of people, I thought I'd pass along some follow-up information.

As I mentioned, I'm experiencing the problem under 10.10.5 Yosemite. Since I remember this having worked at least once in the not-too-distant past, I took an old MacBook, wiped the hard drive, and loaded it with 10.9 Mavricks, and found the sample script behaved exactly the same. I then proceeded wipe and re-load the machine with each successive major revision, all the way back to 10.5 Leopard (yes, every one:10.8, 10.7, and 10.6) and found the script behaved the same on every version. I even tried and old version of Indigo (I think it was 4) on 10.5, just to make absolutely sure there was no difference in behavior between the sample/test script, and Indigo. Sure enough, it still didn't talk at the login screen.

So, I think I'm still missing some piece of information about something that changed (either configuration-wise or procedurally, by me, or architecture-wise, by Apple). My next stop is to generalize this issue (probably with the script and no explicit mention of Indigo) and post on the Apple support forum.

If any of the other users in this forum have any ideas or suggestions, I'd be happy to have them.

Posted on
Fri Jun 09, 2017 8:19 pm
jeffrey offline
Posts: 7
Joined: Feb 27, 2017

Re: [ANSWERED]Speech No Longer Working

Just another quick follow up...

As I outlined in a post to the thread on running Indigo as a system daemon (viewtopic.php?f=131&t=3297), I just recently got Indigo 6.1.11 running as a daemon under 10.10.5 "Yosemite" and discovered that speech works perfectly when Indigo is running as a daemon. So for the time being, this issue is resolved for me.

--Jeff

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests