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

Re: Install guide for MACOSX



Hi,

Here are some instructions I wrote a while back for setting things up.  The pysox
stuff may be out of date but try following Haden's instructions first
and if that doesn't work my pysox instructions may.

Feedback welcome.

* Introduction

This document is a step by step guide showing how to configure emacspeak on a mac.  It includes installation of emacs, emacspeak and the e-mac-server.

These instructions are only one way to achieve the end result of having emacspeak working on a mac.  This is the way I found worked best for me.  For example I have chosen to use "brew" to install emacs, I had no luck with the seemingly popular "macports".  Your mileage may vary.


I have also made assumptions about file paths, feel free to put things where it feels most comfortable.  

I welcome any updates to this document and or questions or issues found when following these instructions.

* Prerequisites

- A mac running a recent version of os x.  I used snow leopard 10.6.7.
- An internet connection so we can download all the required bits.



The version of emacs shipped with snow leopard (22.1) is not recent enough.  We will be installing emacs 24.  It also appears that the emacs shipped with snow leopard only runs in the terminal and not as a standalone app. 


* XCODE4 
To be able to build packages using homebrew you will need to have apple xcode installed.  If you are an apple developer it is a free download or can be purchased for around $5 from the mac appstore if you are not.

It can be installed from the mac app store.

Here is a link to the relevant apple developer page:
http://developer.apple.com/xcode/

It is a rather large download of about 4 gig so may take some time to install depending on your Internet connection speed.


* Homebrew

Homebrew is a package management system for installing unix programs on mac.  You can read all about it at the below URL or the blog post sighted in the following text: 
https://github.com/mxcl/homebrew

These instructions are mostly taken from the blog post at:
http://www.engineyard.com/blog/2010/homebrew-os-xs-missing-package-manager/


To install homebrew, from the terminal run the following commands.  I suggest that if you are at all worried checkout the script that is being run by the curl command so as to not install anything on your system that may be in any way suspicious  .

#Note: I had to create the /usr/local directory on my mac which isn't in the blog post.
# create /usr/local if it doesn't already exist
sudo mkdir -p /usr/local
# Take ownership of /usr/local so you don't have to sudo
sudo chown -R `whoami` /usr/local
# Fix the permissions on your mysql installation, if you have one
sudo chown -R mysql:mysql /usr/local/mysql*
# Download and install Homebrew from github
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local

Once this is complete you should now have the "brew" program in your path.

If typing "brew" at the terminal prompt gives a "command not found" error investigate if "/usr/local/bin" is in your PATH environment variable.

If everything has worked up to this point typing "brew" should display an example usage message.

* Install git

Next we will install git as it is required to be able to update homebrew itself as well as to install many homebrew formula.

>From the terminal:

brew install git

* Install emacs

This installs the current development branch of emacs24 from  repo.or.cz.

It may be possible to use other emacson such as aquamax or other distributions specifically for the mac.  I had no luck doing so and this was the way that worked for me.

If anyone else is using a different emacs I would love to hear about it so I can add aditional install options here.

To install using brew, issue the following command from the terminal: 
brew install emacs --HEAD --use-git-head --cocoa

You will need to have added /usr/local/bin to the beginning of your PATH environment variable otherwise the shell will find the apple supplied version of emacs.

You can check this has worked by issueing the following command at the terminal:

which emacs

It should report /usr/local/bin/emacs 


* Install emacspeak

We will keep emacspeak in a directory ~/src/emacspeak
# create the ~/src dir if it doesn't exist
mkdir -p ~/src
# changedir to ~/src
cd ~/src
# checkout a copy of emacspeak from the google svn repository
svn co http://emacspeak.googlecode.com/svn/trunk emacspeak

cd emacspeak
make config
make emacspeak


* E-Mac-Speak server prerequisites

You will need to install sox and the pysox library.  These are used to provide extra filters on the tts.  As the set of parameters  available with mac tts engines is limited.

Feedback on this process is most welcome as it's written from memory.

To install sox:
brew install sox

To install pysox:
sudo easy_install pyrex
sudo easy_install pysox


* Test the e-mac-speak server

Before trying to run emacspeak itself we need to verify that the e-mac-speak server is working.

To do this, from the terminal:

# Change to the emacspeak servers directory
cd ~/src/emacspeak/servers
# run the e-mac-speak server
./mac

At this point you should hear the words "emacspeak server" spoken.

If not then we have a problem.

To speak some text enter the following lines.

q {This is a test.}
d

You should hear the words "This is a test."

If all goes well move on to the next step.  If not troubleshoot the issue until the above steps work.
 
* Emacs initialization

To get emacs to start up loading emacspeak with the e-mac-speak server place the following in your .emacs.d/init.el file.

This is the minimum required to ensure that emacspeak comes up talking.  You will want to investigate further customizations of both emacs and emacspeak as you progress.

You will also want to ajust the paths to reflect where you installed emacspeak.

(setq load-path (cons "~/src/emacspeak/lisp" load-path))
(setq emacspeak-directory "~/src/emacspeak")
(setq dtk-program "mac")
(load-file "~/src/emacspeak/lisp/mac-voices.el")
(setq mac-default-speech-rate 500)
(load-file "~/src/emacspeak/lisp/emacspeak-setup.el")


A good place to look for emacspeak customizations is in the "tvr" directory of the emacspeak source.  This is Raman's emacs customizations.


fixme
* pysox

To compile pysox you will need the sox headers and libraries installed.  They can be installed with:
brew install sox

You can download the pysox package from:
http://pypi.python.org/pypi/pysox

I have found it does not build cleanly for me.

This is how I got it built and installed.

First I run:
python setup.py build
as per the README.

This will fail.
I then took the two build lines and ran them by hand.  On each line I removed the --arch i386.

So the two build lines I ended up with were:
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pysox/combiner.c -o build/temp.macosx-10.7-intel-2.7/pysox/combiner.o
llvm-gcc-4.2 -Wl,-F. -bundle -undefined dynamic_lookup -Wl,-F. -arch x86_64 build/temp.macosx-10.7-intel-2.7/pysox/combiner.o -lsox -o build/lib.macosx-10.7-intel-2.7/pysox/combiner.so

After running these two commands I then was able to run the build again:

python setup.py build
Then to install 
python setup.py install


Kind regards

Bart

Haden Pike <haden.pike@xxxxxxxxxxx> writes:

> It's pretty much the same for every OS.  The only difference is that you 
> need to install PySox for the mac speech server - I used homebrew to 
> install sox, which is what PySox interfaces to, then used pip (or 
> easy_install, whichever) to install PySox like so:
>
> $ sudo easy_install pysox
>
> or, for pip:
>
> $ sudo pip install pysox
>
> Then, DTK_PROGRAM should be set to "mac:
>
> export DTK_PROGRAM="mac"
>
> Everything else is the same for installing Emacspeak on every other 
> platform.
> Haden
>
> On 12/19/2012 8:03 PM, John Morgan wrote:
>> Is there a guide for installing emacspeak on MACOSX?
>>
>>
>> On 12/19/12, Jason White <jason@xxxxxxxxxxx> wrote:
>>> Littlefield, Tyler <tyler@xxxxxxxxxxx> wrote:
>>>
>>>> It's really irritating when the volume just randomly changes on you
>>>> for me. I guess if it's something you start out with it's nice, but
>>>> I want my code read to me without my synth pausing and totally
>>>> switching on me; it tends to make things a lot harder to read and
>>>> understand.
>>> It doesn't change the volume or pause with any of the synthesizers that I
>>> have
>>> used, so perhaps it's an issue with your particular synthesizer/speech
>>> server.
>>>
>>> -----------------------------------------------------------------------------
>>> To unsubscribe from the emacspeak list or change your address on the
>>> emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
>>> subject of "unsubscribe" or "help".
>>>
>>>
>>
>
> -----------------------------------------------------------------------------
> To unsubscribe from the emacspeak list or change your address on the
> emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
> subject of "unsubscribe" or "help".
>
Bart
-- 


Kind regards

Bart

-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help".



If you have questions about this archive or had problems using it, please send mail to:

priestdo@xxxxxxxxxxx No Soliciting!

Emacspeak List Archive | 2010 | 2009 | 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog