[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]

[Emacspeak] Re: Mac OS Monterey upgrade causes emacspeak to not load



@Victor Tsaran you suggested using pyobjc-framework-cocoa. Is this as a replacement of pyobjc? As in, should Jeff remove the pyobjc module and then install pyobjc-framework-cocoa, or does that library provide a library that pyobjc needs?
I'm asking because if you look at the traceback, it seems like the error is actually inside the pyobjc library itself.
Sorry for the newbie questions, i know very little about how Python works.

On Tue, Apr 19, 2022 at 11:05 PM Jeff Dittel <jeff@xxxxxxxxxxx> wrote:

Parham,

I forgot to thank you for letting me know that you are running emacspeak on Monterey 12.3.1. At least I know that it can work.

Also, thanks for letting me know that using a different TTS server is not a good option. I am looking forward to getting this working.

Jeff


> On Apr 19, 2022, at 4:48 PM, Parham Doustdar <parham90@xxxxxxxxxxx> wrote:
>
> Hi Jeff,
> Speaking from experience, building other speech servers would be a lot more trouble than getting your Python environment issue figured out. I know that you need Emacs and Emacspeak for your job and being blocked like this sucks, but please stay the course. Trying other stuff is going to make you even more frustrated.
> Hope this helps,
> Parham
>
> On Tue, Apr 19, 2022 at 10:45 PM Parham Doustdar <parham90@xxxxxxxxxxx> wrote:
> Hi Jeff,
> Yes, this did see the foundation module. The reason I think running it with the `python3` command works is that the shebang at the top of the `mac` file points to `/usr/local/bin` directory, whereas your python3 executable is probably at a different place (you can try `which python3` to see where it is).
> Awesome, so this is a great step forward, we finally know how to get the speech server run by the right Python! Whoo hoo!
> The next steps would be:
>       � I wonder if the issue you're facing is what Victor was talking about earlier in this thread: "Depending on which Python3 installation you are using, you might need to install a pyobjc-framework-cocoa package which includes a wrapper for the Foundation framework needed by the Mac speech server." Try running `pip3 install pyobjc-framework-cocoa` to install that
>       � Run the speech server again using `python3` as opposed to directly with the shell. What happens now?
> We're soooooo close! Hope this is the last step to make this work!
> If so, we'll get to the final step of how to make Emacspeak actually run the mac speech server in the right environment, which I personally don't have much experience on.
> Best,
> Parham
>
> On Tue, Apr 19, 2022 at 10:36 PM Parham Doustdar <parham90@xxxxxxxxxxx> wrote:
> Hi Jeff,
> I'm on MacOS 12.3.1. The issue you're running into, I imagine, is because Python 2.X got dropped from MacOS 12.3, and now the mac speech server has been migrated to Python3.
> Hope this helps,
> Parham
>
> On Tue, Apr 19, 2022 at 10:30 PM Jeff Dittel <jeff@xxxxxxxxxxx> wrote:
>
> Hey guys,
>
> I asked a question that I donâ??t think I got an answer. I sent the below traceback before, but it indicates that the Mac PyObjC is trying to use a wrong version of the Foundation module. Since it looks like a Mac TTS server error, can I just use a non-Mac TTS server?
>
> Thanks,
>
> Jeff
>
> (.espk) servers 1054 $ python3 ./mac
> Traceback (most recent call last):
>   File "/Users/jeffdittel/emacspeak/servers/./mac", line 20, in <module>
>     from PyObjCTools import AppHelper
>   File "/Users/jeffdittel/emacspeak/.espk/lib/python3.9/site-packages/PyObjCTools/AppHelper.py", line 32, in <module>
>     from Foundation import (
> ImportError: cannot import name 'NSAutoreleasePool' from 'Foundation' (/Users/jeffdittel/emacspeak/.espk/lib/python3.9/site-packages/Foundation/__init__.py)
>
>
>
> > On Apr 19, 2022, at 2:32 AM, Parham Doustdar via Emacspeak <emacspeak@xxxxxxxxxxx> wrote:
> >
> > Hi Jeff,
> > Just wanted to say that I set up the Mac speech server on my personal mac laptop a couple of days ago, and it all went smoothly, so seconding everyone's opinion here that the issue could be anaconda.
> > Here is what I did:
> >       � On a bare machine, with no other python3 stuff installed, I ran `brew install python3`
> >       � Then I ran `pip3 install pyobjc`
> >       � Then running the mac speech server from shell worked without an issue
> > I would say hunt down all instances of python3 you have, remove all of them, and let only one of them stay on your system. That way you'll avoid a whole lot of issues, including missing libraries.
> > Hope this helps.
> >
> > On Mon, Apr 18, 2022 at 11:54 PM Victor Tsaran via Emacspeak <emacspeak@xxxxxxxxxxx> wrote:
> > Hi.
> > I was just about to write the same, i.e. it does look like you are inside a Miniconda or Anaconda environment, a  "base" one. This might mean that you have two installations of Python, so your pyobjc-foundation-cocoa module got installed into a different Python than the default one, called by the Mac server.
> > Have you by any chance installed Python via Homebrew in addition to Miniconda? If yes, uninstall the former and try again.
> >
> >
> > On Mon, Apr 18, 2022 at 2:35 PM prayner--- via Emacspeak <emacspeak@xxxxxxxxxxx> wrote:
> > It looks very much like you're still inside a miniconda environment
> > (note the pathnames) while the library you want is probably part of a
> > system package that the various versions of conda won't see. Note in
> > that long list of library directories it's searching includes lots of
> > miniconda3 plus /usr/lib and /usr/local/lib, not any of the standard
> > python directories.
> > That suggests two options:
> > 1) try to install the missing package via miniconda
> > 2) keep miniconda out of the picture entirely
> > I'd *strongly* recommend #2, I find the conda edifice too shaky for
> > something as critical as emacspeak
> > Irrelevant aside: I didn't know anyone still wrote Objective-C, makes
> > me nostalgic for my beloved Next machine of 1992
> > cheers
> > Peter
> > Jeff Dittel via Emacspeak writes:
> > >I just did the Xcode-select â??install, and it was already installed.
> > >
> > >I just went into IPYTHON and did a import Foundation, and am getting the error below. Remember, I installed the Foundation module from the shell that I start IPYTHON.
> > >
> > >Jeff
> > >
> > >In [3]: import Foundation                                                                                                                                                                                                                   
> > >---------------------------------------------------------------------------
> > >ImportError                               Traceback (most recent call last)
> > ><ipython-input-3-8b6b78271c2b> in <module>
> > >----> 1 import Foundation
> > >
> > >~/miniconda3/lib/python3.7/site-packages/Foundation/__init__.py in <module>
> > >      7 import sys
> > >      8
> > >----> 9 import CoreFoundation
> > >     10 import Foundation._Foundation
> > >     11 import objc
> > >
> > >~/miniconda3/lib/python3.7/site-packages/CoreFoundation/__init__.py in <module>
> > >      7 import sys
> > >      8
> > >----> 9 import objc
> > >     10 from CoreFoundation import _metadata
> > >     11 from CoreFoundation._inlines import _inline_list_
> > >
> > >~/miniconda3/lib/python3.7/site-packages/objc/__init__.py in <module>
> > >      4 This module defines the core interfaces of the Python<->Objective-C bridge.
> > >      5 """
> > >----> 6 from . import _objc
> > >      7
> > >      8
> > >
> > >ImportError: dlopen(/Users/jeffdittel/miniconda3/lib/python3.7/site-packages/objc/_objc.cpython-37m-darwin.so, 0x0002): Library not loaded: @rpath/libffi.8.dylib
> > >  Referenced from: /Users/jeffdittel/miniconda3/lib/python3.7/site-packages/objc/_objc.cpython-37m-darwin.so
> > >  Reason: tried: '/Users/jeffdittel/miniconda3/lib/libffi.8.dylib' (no such file), '/Users/jeffdittel/miniconda3/lib/libffi.8.dylib' (no such file), '/Users/jeffdittel/miniconda3/lib/libffi.8.dylib' (no such file), '/Users/jeffdittel/miniconda3/lib/python3.7/site-packages/objc/../../../libffi.8.dylib' (no such file), '/Users/jeffdittel/miniconda3/lib/libffi.8.dylib' (no such file), '/Users/jeffdittel/miniconda3/lib/libffi.8.dylib' (no such file), '/Users/jeffdittel/miniconda3/lib/libffi.8.dylib' (no such file), '/Users/jeffdittel/miniconda3/lib/python3.7/site-packages/objc/../../../libffi.8.dylib' (no such file), '/Users/jeffdittel/miniconda3/lib/libffi.8.dylib' (no such file), '/Users/jeffdittel/miniconda3/lib/libffi.8.dylib' (no such file), '/Users/jeffdittel/miniconda3/bin/../lib/libffi.8.dylib' (no such file), '/Users/jeffdittel/miniconda3/lib/libffi.8.dylib' (no such file), '/Users/jeffdittel/miniconda3/lib/libffi.8.dylib' (no such file), '/Users/jeffdittel/miniconda3/bin/../lib/libffi.8.dylib' (no such file), '/usr/local/lib/libffi.8.dylib' (no such file), '/usr/lib/libffi.8.dylib' (no such file)
> > >
> > >In [4]:                                                                                                                                                                                                                                     
> > >
> > >
> > >
> > >
> > >> On Apr 18, 2022, at 10:56 AM, Devin Prater via Emacspeak <emacspeak@xxxxxxxxxxx> wrote:
> > >>
> > >> You may have to install the XCode Command line tools. Do:
> > >>
> > >> xcode-select --install
> > >>
> > >> or if you have homebrew, it should already be installed. Also check the app store or software updates for updates to it.
> > >>
> > >> If nothing else, get a virtual machine manager like VMWare Player, get a Debian ISO, install it on the virtual machine, and then work that way. You won't get the latest Emacs unless you move to unstable, or use homebrew for Linux, but that will at least give you Emacs with Emacspeak.
> > >> Devin Prater
> > >> r.d.t.prater@xxxxxxxxxxx
> > >>
> > >>
> > >>
> > >>
> > >> On Mon, Apr 18, 2022 at 9:45 AM David Tseng <davidtseng@xxxxxxxxxxx> wrote:
> > >> +1 to what Raman said; it's actually a breakage by Apple. XCode command line tools is where those extra python bindings live.
> > >> https://developer.apple.com â?º downloads
> > >> Try reinstalling or run it from source via Apple's open source repos.
> > >>
> > >> On Mon, Apr 18, 2022 at 7:40 AM Devin Prater via Emacspeak <emacspeak@xxxxxxxxxxx> wrote:
> > >> Lol, Apple support barely knows what VoiceOver (Mac screen reader) is, let alone the Invested nature of Emacspeak!
> > >> Devin Prater
> > >> r.d.t.prater@xxxxxxxxxxx
> > >>
> > >>
> > >>
> > >>
> > >> On Mon, Apr 18, 2022 at 9:34 AM T.V Raman via Emacspeak <emacspeak@xxxxxxxxxxx> wrote:
> > >> Jeff Dittel via Emacspeak <emacspeak@xxxxxxxxxxx> writes:
> > >>
> > >>
> > >> Have you tried calling Apple support since as you say "it is an
> > >> emergency"?
> > >>
> > >> The rest of us here are volunteers.
> > >> > Sorry, donâ??t mean to be dramatic, but I cannot work until I get emacspeak working. Current state:
> > >> >
> > >> > * Running ./servers/mac I still get module not found Foundation
> > >> > * When I start emacs I get the organ and the â??This is emacspeakâ??
> > >> > However, emacspeak is silent
> > >> > * When I do a make ESPEAK, there is an error canâ??t find a C++ header file.
> > >> > * Below is my ~/.emacs.d/init.el file
> > >> >
> > >> > Apparently, I need to get some TTS server running?
> > >> >
> > >> > Thanks,
> > >> >
> > >> > Jeff
> > >> >
> > >> > (base) .emacs.d 1010 $ cat init.el
> > >> > (setq load-path (cons "~/emacspeak/lisp" load-path))
> > >> > (setq emacspeak-directory "~/emacspeak")
> > >> > (setq dtk-program "mac")
> > >> > (setq emacspeak-character-echo nil)
> > >> > (setq line-move-visual nil)
> > >> > (setq bookmark-save-flag 1)
> > >> > (load-file "~/emacspeak/lisp/mac-voices.el")
> > >> > (load-file "~/emacspeak/lisp/emacspeak-setup.el")
> > >> > (setq mac-default-speech-rate 350)
> > >> > (setq dtk-set-rate 350)
> > >> > (global-set-key (kbd "C-x r d") 'bookmark-delete)
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >> On Apr 17, 2022, at 7:12 PM, Victor Tsaran via Emacspeak <emacspeak@xxxxxxxxxxx> wrote:
> > >> >>
> > >> >> Can't say anything about Espeak, but the Python version I am running is 3.10.4.
> > >> >> Regarding the Mac server though. What kind of output do you get if you switch to the emacspeak/servers directory and then run
> > >> >> python3 ./mac
> > >> >> from there? Do you get the "Emacspeak server" message or a traceback error from Python?
> > >> >>
> > >> >>
> > >> >> On Sun, Apr 17, 2022 at 9:38 AM Jeff Dittel <jeff@xxxxxxxxxxx> wrote:
> > >> >> I still cannot figure out how to install the Foundation module in
> > >> >> the environment that the ./servers/mac script is trying to run in. I
> > >> >> thought of just using a different TTS server, so I tried to make
> > >> >> ESPEAK, and that failed too. Below is the output, but it looks like
> > >> >> it cannot find a C++ header file. That seems odd.
> > >> >>
> > >> >> Thanks,
> > >> >>
> > >> >> Jeff
> > >> >>
> > >> >> (base) emacspeak 1030 $ make espeak
> > >> >> c++ -g    -O2 -fPIC  -DPIC  -pedantic -ansi -Wall -Wno-long-long --std=c++11   -c -o tclespeak.o tclespeak.cpp
> > >> >> tclespeak.cpp:41:10: fatal error: 'espeak-ng/speak_lib.h' file not found
> > >> >> #include <espeak-ng/speak_lib.h>
> > >> >>          ^~~~~~~~~~~~~~~~~~~~~~~
> > >> >> 1 error generated.
> > >> >> make[1]: *** [tclespeak.o] Error 1
> > >> >> Can't build espeak server!
> > >> >> (base) emacspeak 1031 $
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >> > On Apr 16, 2022, at 3:35 PM, Victor Tsaran via Emacspeak <emacspeak@xxxxxxxxxxx> wrote:
> > >> >> >
> > >> >> > Also, even after you update your Emacspeak repository.
> > >> >> > Depending on which Python3 installation you are using, you might
> > >> >> > need to install a pyobjc-framework-cocoa package which includes a
> > >> >> > wrapper for the Foundation framework needed by the Mac speech
> > >> >> > server.
> > >> >> > Simply use "pip install pyobjc-framework-cocoa" command to install the package.
> > >> >> > You also need to ensure that Python3 is in your path, otherwise, the server script will complain.
> > >> >> >
> > >> >> > Hope this helps.
> > >> >> > Victor
> > >> >> >
> > >> >> >
> > >> >> > On Fri, Apr 15, 2022 at 9:14 AM Parham Doustdar via Emacspeak <emacspeak@xxxxxxxxxxx> wrote:
> > >> >> > Hi Jeff,
> > >> >> > Have you tried doing `make clean` and then `make emacspeak` on the
> > >> >> > latest git version? Also, David just submitted a patch to make the
> > >> >> > Mac speech server work on MacOS 12.3+, so do a `git pull` before
> > >> >> > running make, too.
> > >> >> > Let me know how it goes.
> > >> >> > Best,
> > >> >> > Parham
> > >> >> >
> > >> >> > On Fri, Apr 15, 2022 at 5:37 PM Jeff Dittel via Emacspeak <emacspeak@xxxxxxxxxxx> wrote:
> > >> >> >
> > >> >> > Hello,
> > >> >> >
> > >> >> > My name is Jeff Dittel and I use emacspeak everyday on my job as a
> > >> >> > senior software engineer. I have a serious problem because
> > >> >> > emacspeak is no longer working.
> > >> >> >
> > >> >> > I recently upgraded my Mac to Monterey 12.31, and when I start emacs the init.el file crashes at the line:
> > >> >> >
> > >> >> > (load-file "~/Sources/emacspeak-master/emacspeak-master/lisp/emacspeak-setup.elâ??)
> > >> >> >
> > >> >> > The â??emacs â??debug-initâ?? command gives the following output:
> > >> >> >
> > >> >> > File Edit Options Buffers Tools Debugger Help
> > >> >> >                                                                                                                      |Debugger
> > >> >> > entered--Lisp error: (error "Buffer *scratch* has no process")
> > >> >> >                                                                                                                      |
> > >> >> > process-send-string(nil "tts_sync_state all 0 0 1 100 \n")
> > >> >> >                                                                                                                      |
> > >> >> > tts-configure-synthesis-setup()
> > >> >> >                                                                                                                      |  emacspeak()
> > >> >> >                                                                                                                      |
> > >> >> > eval-buffer(#<buffer *load*-447347> nil
> > >> >> > "/Users/jeffdittel/Sources/emacspeak-master/emacspeak-master/lisp/emacspea$
> > >> >> >                                                                                                                      |
> > >> >> > load-with-code-conversion("/Users/jeffdittel/Sources/emacspeak-master/emacspeak-master/lisp/emacspeak-setup.el"
> > >> >> > "/U$
> > >> >> >                                                                                                                      |
> > >> >> > load("/Users/jeffdittel/Sources/emacspeak-master/emacspeak-master/lisp/emacspeak-setup.el"
> > >> >> > nil nil t)
> > >> >> >                                                                                                                      |
> > >> >> > load-file("~/Sources/emacspeak-master/emacspeak-master/lisp/emacspeak-setup.el")
> > >> >> >                                                                                                                      |
> > >> >> > eval-buffer(#<buffer *load*> nil
> > >> >> > "/Users/jeffdittel/.emacs.d/init.el" nil t) ; Reading at buffer
> > >> >> > position 493
> > >> >> >                                                                                                                      |
> > >> >> > load-with-code-conversion("/Users/jeffdittel/.emacs.d/init.el"
> > >> >> > "/Users/jeffdittel/.emacs.d/init.el" t t)
> > >> >> >                                                                                                                      |
> > >> >> > load("/Users/jeffdittel/.emacs.d/init" t t)
> > >> >> >                                                                                                                      |
> > >> >> > #[0 "^H\205\262^@ \306=\203^Q^@\307^H\310Q\202;^@
> > >> >> > \311=\204^^^@\307^H\312Q\202;^@\313\307\314\315#\203*^@\316\2$
> > >> >> >                                                                                                                      |  command-line()
> > >> >> >                                                                                                                      |  normal-top-level()
> > >> >> >                                                                                                                      |
> > >> >> >                                                                                                                      |
> > >> >> >
> > >> >> > Can someone help fix the emacspeak-setup.el file?
> > >> >> >
> > >> >> > Thanks,
> > >> >> >
> > >> >> > Jeff
> > >> >> >
> > >> >> > Jeff Dittel
> > >> >> > ~~~~~~~~~~~
> > >> >> > jeff@xxxxxxxxxxx
> > >> >> > (414) 248-2292
> > >> >> > _______________________________________________
> > >> >> > Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
> > >> >> > To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx
> > >> >> > _______________________________________________
> > >> >> > Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
> > >> >> > To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx
> > >> >> >
> > >> >> >
> > >> >> > --
> > >> >> >
> > >> >> > --- --- --- ---
> > >> >> > Find my music on
> > >> >> > Youtube: http://www.youtube.com/c/victortsaran
> > >> >> > Spotify: https://open.spotify.com/artist/605ZF2JPei9KqgbXBqYA16
> > >> >> > Band Camp: http://victortsaran.bandcamp.com
> > >> >> >
> > >> >> > _______________________________________________
> > >> >> > Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
> > >> >> > To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx
> > >> >>
> > >> >>
> > >> >>
> > >> >> --
> > >> >>
> > >> >> --- --- --- ---
> > >> >> Find my music on
> > >> >> Youtube: http://www.youtube.com/c/victortsaran
> > >> >> Spotify: https://open.spotify.com/artist/605ZF2JPei9KqgbXBqYA16
> > >> >> Band Camp: http://victortsaran.bandcamp.com
> > >> >>
> > >> >> _______________________________________________
> > >> >> Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
> > >> >> To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx
> > >> > _______________________________________________
> > >> > Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
> > >> > To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx
> > >>
> > >> --
> > >>
> > >> Thanks,
> > >>
> > >> --Raman(I Search, I Find, I Misplace, I Research)
> > >> â?? Id: kg:/m/0285kf1  ð?¦®
> > >> _______________________________________________
> > >> Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
> > >> To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx
> > >> _______________________________________________
> > >> Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
> > >> To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx
> > >> _______________________________________________
> > >> Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
> > >> To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx
> > >_______________________________________________
> > >Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
> > >To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx
> >
> >
> > --
> > Peter Rayner (he/him), Room 371, Building 200, University of Melbourne
> > Academic Lead - Climate & Energy College <https://www.climatecollege.unimelb.edu.au>
> > mobile +61 402 752 379, skype: petermorag
> > zoom id 4431343191, join at  <https://unimelb.zoom.us/j/4431343191?pwd=a1E5Z3JEOTRVQUJsaVdRbVUvR1QyZz09>
> > mail-to: prayner@xxxxxxxxxxx TWITTER: @raynerstrings
> > google scholar
> > <https://scholar.google.com.au/citations?user=H3up71wAAAAJ&hl=en>
> > profile: <https://findanexpert.unimelb.edu.au/profile/59812-peter-rayner>
> > I acknowledge the Traditional Custodians of the land on which I work, the Wurundjeri people of the Kulin nation, and pay my respect to their Elders, past and present
> > I am sending this email when convenient for me, please only respond when convenient for you
> > _______________________________________________
> > Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
> > To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx
> >
> >
> > --
> >
> > --- --- --- ---
> > Find my music on
> > Youtube: http://www.youtube.com/c/victortsaran
> > Spotify: https://open.spotify.com/artist/605ZF2JPei9KqgbXBqYA16
> > Band Camp: http://victortsaran.bandcamp.com
> >
> > _______________________________________________
> > Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
> > To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx
> > _______________________________________________
> > Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
> > To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx
>



|May 1995 - Last Year|Current Year|


If you have questions about this archive or had problems using it, please contact us.

Contact Info Page