Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could Japser work on OS X? #35

Closed
vicramon opened this issue Apr 12, 2014 · 36 comments
Closed

Could Japser work on OS X? #35

vicramon opened this issue Apr 12, 2014 · 36 comments

Comments

@vicramon
Copy link

@vicramon vicramon commented Apr 12, 2014

I think it would be great if I could run Jasper on my Macbook. Would that be possible? I'm looking at the documentation and it seems like it could work with some extra configuration, but I don't know enough about the internals to know how if it's possible.

@fritz-fritz

This comment has been minimized.

Copy link

@fritz-fritz fritz-fritz commented Apr 12, 2014

from what i've been reading/learning it seems possible though you may have trouble compiling and the instructions are not written for the mac terminal so you would have to enter the equivalent commands. (for example... no apt-get)

@qpaulson

This comment has been minimized.

Copy link

@qpaulson qpaulson commented Apr 17, 2014

FYI.. I've spent about an hour trying to get it working with no luck yet..
The biggest issue I've run into is getting PocketSphinx installed and working.. If anyone gets past this step, please do post it here..

Here are my steps thus far:

1: Install Homebrew
install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

2: Install PIP
sudo easy_install pip

3: Install setuptools
sudo pip install --upgrade setuptools

4: Install Numpy
brew install homebrew/python/numpy

5: Install PyAudio
Availble here: http://people.csail.mit.edu/hubert/pyaudio/

6: Install PocketSphynx:
brew install cmu-pocketsphinx

7: Edit: jarvis/client/requirements.txt
Update: CherryPy==3.2.6
Update: argparse==1.1
Remove: PocketSphinx==0.8
Remove: SphinxBase==0.8
Remove: RPi.GPIO==0.5.4
Remove: numpy==1.8.0
Remove: pifacecommon==4.0.0
Remove: pifacedigitalio==3.0.4
Remove: pygame==1.9.1release

8: Install all requirements via pip
sudo pip install -r jasper/client/requirements.txt

@the01

This comment has been minimized.

Copy link

@the01 the01 commented Apr 17, 2014

I managed to get pocketsphinx working. You need to install it by hand (see http://jasperproject.github.io/documentation/software/#installing-sphinx). Some problems I had:

  • the new XCode is strict with its flags and fails. To fix use "ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future " (note: sudo goes in front of ARCHFLAGS)
  • I didnt have cython installed
  • I initially forgot to run setup.py in the python sub-dir (note: there are some test files in there as well, so have a basic check if your install worked)
@qpaulson

This comment has been minimized.

Copy link

@qpaulson qpaulson commented Apr 17, 2014

Thanks!!.. I was actually about to do the same thing :)
I'll continue the quest. :)

@the01

This comment has been minimized.

Copy link

@the01 the01 commented Apr 17, 2014

For those following the steps, the next problem (for me) shows up when building openfst.."'tr1/unordered_map' file not found"
to fix this add 'CXX="clang++ -std=c++11 -stdlib=libstdc++"' to the ./configure flags
see (openfst.org is not working for me right now, so it is a chached version from google) http://webcache.googleusercontent.com/search?q=cache:SIfDTkcDgX0J:www.openfst.org/twiki/bin/view/Forum/FstForum+&cd=1&hl=de&ct=clnk&gl=at&client=firefox-a

@qpaulson

This comment has been minimized.

Copy link

@qpaulson qpaulson commented Apr 17, 2014

@the01 Did you do anything special to link pocketsphinx to the OSX python libs? I've followed the instructions, its "installed" according to sudo make install, but when i run jasper it still says the module is not found..?

@the01

This comment has been minimized.

Copy link

@the01 the01 commented Apr 17, 2014

@qpaulson did you run python setup.py install in pocketsphinx-0.8/python/ ?

also I am now stuck at m2m-aligner..I cant seem to get it to install

@the01

This comment has been minimized.

Copy link

@the01 the01 commented Apr 17, 2014

when installing mitlm:

  • you need to apply sudo ./configure CXX="clang++ -std=c++11 -stdlib=libstdc++" again
  • in src/NgramModel.cpp line 325 change
    assert(prob <= std::pow(10, -99));
    to
    assert(prob <= std::pow(10.0, -99));
@vicramon

This comment has been minimized.

Copy link
Author

@vicramon vicramon commented Apr 17, 2014

Could anyone who gets this working please post detailed steps?

I was able to compile pocketsphinx, but I get "Failed to open audio device" whenever I run pocketsphinx_continuous.

@qpaulson

This comment has been minimized.

Copy link

@qpaulson qpaulson commented Apr 18, 2014

@the01 Ah!.. that did it.. thnx Now onto the next hurdle..

@vicramon Based on the docs, I think we need to install Portaudio. or write an audio backend for OSX.. I'll play with Portaudio i guess. :)

@crm416

This comment has been minimized.

Copy link
Member

@crm416 crm416 commented Apr 18, 2014

This is a good idea, but one that we haven't really explored. Would be happy to add instructions to the docs if you do get it working!

@astahlman

This comment has been minimized.

Copy link
Contributor

@astahlman astahlman commented Apr 28, 2014

I got this working this weekend on my MacBookPro (OS X 10.7.5) by following the steps posted by @qpaulson and @the01 with a few more minor tweaks. Here are the steps I took. If there is interest, I can send a pull request to add this to the Docs.

Summary:

  1. Installed the dependencies as described by @qpaulson. I wish I had been documenting my approach at this point, because I know I deviated slightly by installing a few of the dependencies through pip rather than relying on Homebrew. I did not make any modifications to the requirements.txt.
  2. Installed PocketSphinx by hand as described here
  3. Installed other binaries by hand as described here
    * The m2m-aligner Makefile needs to be modified. The gcc_s library isn't available on Darwin systems. Change:
    INLIBS=-lgcc_s -lpthread -lc -lm
    to
    INLIBS=-lpthread -lc -lm

    * As pointed out by @the01, mitlm needs a one line code change in src/NgramModel.cpp, line 325. Change
    assert(prob <= std::pow(10, -99));
    to
    assert(prob <= std::pow(10.0, -99));
  4. Rather than getting the espeak and aplay utilities installed, I took a shortcut and modified the source in mic.py to use the OS X built-in say command.
  5. I made a couple of minor modifications to the boot scripts. Since I'm on my personal laptop, I did not duplicate the expected directory structure on the RPi. My directory structure looks like this:
* jasper-client (root of the Git repo)
    * boot...
    * client...
    * README.md
* jasper-home (root directory, contains the required binaries)
    * m2m-aligner-1.2
    * mitlm-0.4.1
    * openfst-1.3.4
    * phonetisaurus
    * pocketsphinx-0.8
    * sphinxbase-0.8

In jasper-client/boot/boot.sh, I modified the script to export HOME=jasper-home.
I also modified the first line of jasper-client/client/start.sh. The script cd's to the client directory, which it expectes to be at

/home/pi/jasper/client/
I simply updated the first line to cd to the
jasper-client/client
directory which contains the required binaries.

I know this isn't the ideal way of doing this, but it got me up and running. I wrote several modules and I've got Jasper checking my bus schedule and starting Netflix playback for me using Selenium WebDriver.

I'd be interested to get the authors' take on porting Jasper to OS X. Is the intent to keep the codebase completely platform independent, or could we factor out modules that may differ between the RPi and other platforms and select a platform-specific implementation at runtime? (e.g., an implementation of Mic using say for OS X vs. the espeak implementation for the RPi.)

@qpaulson

This comment has been minimized.

Copy link

@qpaulson qpaulson commented Apr 28, 2014

This is fantastic!!

I would definitely support making Jasper more Platform agnostic!..
On OSX it could potentially just use Google TTS and STT this may simplify
it a lot as well..

Also, some of the packages are not for the core software, but for the
modules.. Perhaps someone could document which packages are for which
modules.. Then we could just not use the ones we dont want to deal with or
that are not platform agnostic.

Thanks for drudging through this!

On Sun, Apr 27, 2014 at 9:40 PM, Andrew Stahlman
notifications@github.comwrote:

I got this working this weekend on my MacBookPro (OS X 10.7.5) by
following the steps posted by @qpaulson https://github.com/qpaulson and
@the01 https://github.com/the01 with a few more minor tweaks. Here are
the steps I took. If there is interest, I can send a pull request to add
this to the Docs.

Summary:

  1. Installed the dependencies as described by @qpaulsonhttps://github.com/qpaulson.
    I wish I had been documenting my approach at this point, because I know I
    deviated slightly by installing a few of the dependencies through pip
    rather than relying on Homebrew. I did not make any modifications to the
    requirements.txt.
  2. Installed PocketSphinx by hand as described herehttp://jasperproject.github.io/documentation/software/#installing-sphinx
  3. Installed other binaries by hand as described herehttp://jasperproject.github.io/documentation/software/#install-binaries
  • The m2m-aligner Makefile needs to be modified. The gcc_s library isn't
    available on Darwin systems. Change:

INLIBS=-lgcc_s -lpthread -lc -lm

to

INLIBS=-lpthread -lc -lm

  • As pointed out by @the01, mitlm needs a one line code change in
    src/NgramModel.cpp, line 325. Change

assert(prob <= std::pow(10, -99));

to

assert(prob <= std::pow(10.0, -99));

  1. Rather than getting the espeak and aplay utilities installed, I took a
    shortcut and modified the source in mic.py to use the OS X built-in saycommand.
  2. I made a couple of minor modifications to the boot scripts. Since I'm
    on my personal laptop, I did not duplicate the expected directory structure
    on the RPi. My directory structure looks like this:
  • jasper-client (root of the Git repo)
    • boot...
    • client...
    • README.md
  • jasper-home (root directory, contains the required binaries)
    • m2m-aligner-1.2
    • mitlm-0.4.1
    • openfst-1.3.4
    • phonetisaurus
    • pocketsphinx-0.8
    • sphinxbase-0.8

In jasper-client/boot/boot.sh, I modified the script to export
HOME=jasper-home.
I also modified the first line of jasper-client/client/start.sh. The
script cd's to the client directory, which it expectes to be at

/home/pi/jasper/client/

I simply updated the first line to cd to the

jasper-client/client

directory which contains the required binaries.

I know this isn't the ideal way of doing this, but it got me up and
running. I wrote several modules and I've got Jasper checking my bus
schedule and starting Netflix playback for me using Selenium WebDriver.

I'd be interested to get the authors' take on porting Jasper to OS X. Is
the intent to keep the codebase completely platform independent, or could
we factor out modules that may differ between the RPi and other platforms
and select a platform-specific implementation at runtime? (e.g., an
implementation of Mic using say for OS X vs. the espeak implementation
for the RPi.)


Reply to this email directly or view it on GitHubhttps://github.com//issues/35#issuecomment-41522506
.

Quintin Paulson
qpaulson@gmail.com

@vicramon

This comment has been minimized.

Copy link
Author

@vicramon vicramon commented Jun 18, 2014

I'm following the series of steps here from @qpaulson, @the01 and @astahlman, and now I'm stuck at:

File "sphinxbase.pxd", line 150, in init pocketsphinx (pocketsphinx.c:7935)
ValueError: PyCapsule_GetPointer called with invalid PyCapsule object

It seems to have something to do with Cython. I Cython installed, but I'm not sure what else I need to do. Any ideas here?

@fotiDim

This comment has been minimized.

Copy link

@fotiDim fotiDim commented Jun 19, 2014

I would be very much interested in running on iOS as well. +1 for multi-platform approach.

@astahlman

This comment has been minimized.

Copy link
Contributor

@astahlman astahlman commented Jun 21, 2014

See #100

I've now got Jasper running off of the same code base running on RPi and my Macbook.

@nmoya

This comment has been minimized.

Copy link

@nmoya nmoya commented Jul 28, 2014

@astahlman did you have problems with the tr1/unsorted_list include?

I managed to bypass the manual installation of openfst using homebrew. But with phonetisaurus and mitlm it was not possible.

I'm almost there!

@astahlman

This comment has been minimized.

Copy link
Contributor

@astahlman astahlman commented Jul 29, 2014

Sorry, I'm afraid I can't be much help there - I never encountered any such
issues. Good luck!

On Mon, Jul 28, 2014 at 11:42 AM, Nikolas Moya notifications@github.com
wrote:

@astahlman https://github.com/astahlman did you have problems with the
tr1/unsorted_list include?

I managed to bypass the manual installation of openfst using homebrew. But
with phonetisaurus and mitlm it was not possible.

I'm almost there!


Reply to this email directly or view it on GitHub
#35 (comment)
.

@wadefletch

This comment has been minimized.

Copy link

@wadefletch wadefletch commented Jul 29, 2014

@NaviDeck-fdim I have everything but Speech to Text working in the Pythonista App on iOS.

@nitsujri

This comment has been minimized.

Copy link

@nitsujri nitsujri commented Aug 5, 2014

I get close, but with Phonetisaurus:

g++ -O2 -I3rdparty/sparsehash -I3rdparty/utfcpp -g -std=c++11    Phonetisaurus.o FstPathFinder.o MBRDecoder.o LatticePruner.o util.o phonetisaurus-g2p.cpp -o ../phonetisaurus-g2p -lfst -ldl -lm
Undefined symbols for architecture x86_64:
"fst::FstReadOptions::FstReadOptions(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, fst::FstHeader const*, fst::SymbolTable const*, fst::SymbolTable const*)", referenced from:

Thoughts anyone?

Combined with above, my notes:

  • OpenFST - brew install openfst
  • M2M - had to use gcc-4.9.1
  • MITLMT - worked by the time I got here
@nmoya

This comment has been minimized.

Copy link

@nmoya nmoya commented Aug 5, 2014

@nitsujri

It's a linking problem. Can you edit this compilation line? If so, try putting -lfst in another position, for example right after g++.
The compiler is not finding the libfst.a file that contains the fst functions. That's why it is assuming it is undefined. If you know where this file is, try copying it to the Phonetisaurus directory.

Good to know that M2M worked with gcc49.
Let me know if you succeeded

@nitsujri

This comment has been minimized.

Copy link

@nitsujri nitsujri commented Aug 6, 2014

@nmoya, thanks for the quick response.

Editing the line didn't work.

I searched my hd for libfst.a but there was nothing with .a. I would've thought it would be part of openfst either the compiled version or in brew. The closest I found was libfst.la

Thoughts?

./Users/justinlouie/src/openfst-1.3.3/src/extensions/compact/.libs/libfstcompact.1.dylib
./Users/justinlouie/src/openfst-1.3.3/src/extensions/compact/.libs/libfstcompact.dylib
./Users/justinlouie/src/openfst-1.3.3/src/extensions/compact/.libs/libfstcompact.la
./Users/justinlouie/src/openfst-1.3.3/src/extensions/compact/.libs/libfstcompact.lai
./Users/justinlouie/src/openfst-1.3.3/src/extensions/compact/libfstcompact.la
./Users/justinlouie/src/openfst-1.3.3/src/extensions/const/.libs/libfstconst.1.dylib
./Users/justinlouie/src/openfst-1.3.3/src/extensions/const/.libs/libfstconst.dylib
./Users/justinlouie/src/openfst-1.3.3/src/extensions/const/.libs/libfstconst.la
./Users/justinlouie/src/openfst-1.3.3/src/extensions/const/.libs/libfstconst.lai
./Users/justinlouie/src/openfst-1.3.3/src/extensions/const/libfstconst.la
./Users/justinlouie/src/openfst-1.3.3/src/extensions/far/.libs/libfstfar.1.dylib
./Users/justinlouie/src/openfst-1.3.3/src/extensions/far/.libs/libfstfar.dylib
./Users/justinlouie/src/openfst-1.3.3/src/extensions/far/.libs/libfstfar.la
./Users/justinlouie/src/openfst-1.3.3/src/extensions/far/.libs/libfstfar.lai
./Users/justinlouie/src/openfst-1.3.3/src/extensions/far/.libs/libfstfarscript.1.dylib
./Users/justinlouie/src/openfst-1.3.3/src/extensions/far/.libs/libfstfarscript.dylib
./Users/justinlouie/src/openfst-1.3.3/src/extensions/far/.libs/libfstfarscript.la
./Users/justinlouie/src/openfst-1.3.3/src/extensions/far/.libs/libfstfarscript.lai
./Users/justinlouie/src/openfst-1.3.3/src/extensions/far/libfstfar.la
./Users/justinlouie/src/openfst-1.3.3/src/extensions/far/libfstfarscript.la
./Users/justinlouie/src/openfst-1.3.3/src/extensions/lookahead/.libs/libfstlookahead.0.dylib
./Users/justinlouie/src/openfst-1.3.3/src/extensions/lookahead/.libs/libfstlookahead.dylib
./Users/justinlouie/src/openfst-1.3.3/src/extensions/lookahead/.libs/libfstlookahead.la
./Users/justinlouie/src/openfst-1.3.3/src/extensions/lookahead/.libs/libfstlookahead.lai
./Users/justinlouie/src/openfst-1.3.3/src/extensions/lookahead/libfstlookahead.la
./Users/justinlouie/src/openfst-1.3.3/src/extensions/pdt/.libs/libfstpdtscript.1.dylib
./Users/justinlouie/src/openfst-1.3.3/src/extensions/pdt/.libs/libfstpdtscript.dylib
./Users/justinlouie/src/openfst-1.3.3/src/extensions/pdt/.libs/libfstpdtscript.la
./Users/justinlouie/src/openfst-1.3.3/src/extensions/pdt/.libs/libfstpdtscript.lai
./Users/justinlouie/src/openfst-1.3.3/src/extensions/pdt/libfstpdtscript.la
./Users/justinlouie/src/openfst-1.3.3/src/lib/.libs/libfst.1.dylib
./Users/justinlouie/src/openfst-1.3.3/src/lib/.libs/libfst.dylib
./Users/justinlouie/src/openfst-1.3.3/src/lib/.libs/libfst.la
./Users/justinlouie/src/openfst-1.3.3/src/lib/.libs/libfst.lai
./Users/justinlouie/src/openfst-1.3.3/src/lib/libfst.la
./Users/justinlouie/src/openfst-1.3.3/src/script/.libs/libfstscript.1.dylib
./Users/justinlouie/src/openfst-1.3.3/src/script/.libs/libfstscript.dylib
./Users/justinlouie/src/openfst-1.3.3/src/script/.libs/libfstscript.la
./Users/justinlouie/src/openfst-1.3.3/src/script/.libs/libfstscript.lai
./Users/justinlouie/src/openfst-1.3.3/src/script/libfstscript.la
./usr/local/Cellar/openfst/1.4.1/lib/fst/libfstfar.1.dylib
./usr/local/Cellar/openfst/1.4.1/lib/fst/libfstfar.dylib
./usr/local/Cellar/openfst/1.4.1/lib/fst/libfstfarscript.1.dylib
./usr/local/Cellar/openfst/1.4.1/lib/fst/libfstfarscript.dylib
./usr/local/Cellar/openfst/1.4.1/lib/fst/libfstpdtscript.1.dylib
./usr/local/Cellar/openfst/1.4.1/lib/fst/libfstpdtscript.dylib
./usr/local/Cellar/openfst/1.4.1/lib/libfst.3.dylib
./usr/local/Cellar/openfst/1.4.1/lib/libfst.dylib
./usr/local/Cellar/openfst/1.4.1/lib/libfstscript.1.dylib
./usr/local/Cellar/openfst/1.4.1/lib/libfstscript.dylib
./usr/local/lib/libfst.3.dylib
./usr/local/lib/libfst.dylib
./usr/local/lib/libfstscript.1.dylib
./usr/local/lib/libfstscript.dylib
@nmoya

This comment has been minimized.

Copy link

@nmoya nmoya commented Aug 6, 2014

@nitsujri

Ok. Leave the compilation line as it was before (with -lfst after the .o files)

I believe that libfst.la is the file the compiler needs. More explanation about .la files can be found here (http://stackoverflow.com/questions/1238035/what-is-libtools-la-file-for).

I am not sure why its giving the error, since you have installed openfst with brew.
What about specifying the path to the .la file?

g++ -O2 -I3rdparty/sparsehash -I3rdparty/utfcpp -g -std=c++11 Phonetisaurus.o FstPathFinder.o MBRDecoder.o LatticePruner.o util.o phonetisaurus-g2p.cpp -o ../phonetisaurus-g2p -L/Users/justinlouie/src/openfst-1.3.3/src/lib/ -lfst -ldl -lm

I wish I could give you a more precise answer.

@nitsujri

This comment has been minimized.

Copy link

@nitsujri nitsujri commented Aug 6, 2014

@nmoya Thanks for the effort. Adding the direct path doesn't work for all 3 of the libfst.dylib files. I was using -I earlier then I tried your suggestion -L. They both return the same error against all 3.

Ugh I'm so close yet so far. Thoughts? If this helps at all.

Mavericks 10.9.4

g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/lto-wrapper
Target: x86_64-apple-darwin13.2.0
Configured with: ../configure --build=x86_64-apple-darwin13.2.0 --prefix=/usr/local/Cellar/gcc/4.9.1 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-4.9 --with-gmp=/usr/local/opt/gmp --with-    mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-cloog=/usr/local/opt/cloog --with-isl=/usr/local/opt/isl --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-    time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion='Homebrew gcc 4.9.1' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --    disable-nls --enable-multilib
Thread model: posix
gcc version 4.9.1 (Homebrew gcc 4.9.1)
@jefftriplett

This comment has been minimized.

Copy link

@jefftriplett jefftriplett commented Aug 25, 2014

It looks like even once you get past the compiler and various environment errors that there isn't a working audio backend for OS-X yet. This is the warning I see now:

A/D library not implemented
FATAL_ERROR: "continuous.c", line 246: Failed to open audio device

A few related tickets documenting it won't work:

I would really love to see this working or to find out about a good alternative to Google so that this will work offline on a Mac.

@Holzhaus

This comment has been minimized.

Copy link
Member

@Holzhaus Holzhaus commented Oct 1, 2014

Jasper should work on OSX. If it does not, please file a new issue. Closing this due to inactivity.

@Holzhaus Holzhaus closed this Oct 1, 2014
@watsonbox

This comment has been minimized.

Copy link

@watsonbox watsonbox commented Oct 13, 2014

@jefftriplett Support for OSX audio backend is now available in the development version of sphinxbase as noted on the bug you referenced. I've created some head-only Homebrew formulae to help with installing them.

@jefftriplett

This comment has been minimized.

Copy link

@jefftriplett jefftriplett commented Oct 13, 2014

@watsonbox thanks for the follow up and for making the Sphinxtrain and making the update available. Nice job!

@princenishchal

This comment has been minimized.

Copy link

@princenishchal princenishchal commented Dec 3, 2014

Hi, I tried the steps as above to setup jasper on osx, I have problems in compiling phonetisaurus.
I was able to compile the rest of the dependencies. Followed the steps from @qpaulson, @the01 and @astahlman but stuck at phonetisaurus. I have pasted my error below, kindly guide me in compiling this.

**g++ -O2 -I3rdparty/sparsehash -I3rdparty/utfcpp -c Phonetisaurus.cpp -o Phonetisaurus.o
In file included from Phonetisaurus.cpp:39:
In file included from ./Phonetisaurus.hpp:36:
In file included from ./MBRDecoder.hpp:33:
3rdparty/sparsehash/google/dense_hash_map:106:10: fatal error: 'tr1/functional' file not found
#include HASH_FUN_H // defined in config.h
^
3rdparty/sparsehash/google/sparsehash/sparseconfig.h:10:20: note: expanded from macro 'HASH_FUN_H'
#define HASH_FUN_H <tr1/functional>
^
1 error generated.
make: *
* [Phonetisaurus.o] Error 1

My g++ -v output
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

@alzbookstore

This comment has been minimized.

Copy link

@alzbookstore alzbookstore commented Apr 26, 2015

Just an FYI for new installers, the Homebrew link stated toward the top is old.
Here's the updated:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

@nyreed

This comment has been minimized.

Copy link

@nyreed nyreed commented Oct 27, 2015

I actually got phonetisaurus to compile with liberal editing of compile flags in the makefile.
AdolfVonKleist/Phonetisaurus#1 (comment)

BUT I don't think this is what you want for jasper!
Compiling this project yielded two binaries 'phonetisaurus-align' and 'phonetisaurus-arpa2wfst-omega'
I think these are different components of the phonetisaurus project.

For Jasper, we need phonetisaurus-g2p, which is available from the repo dump at the closed google code page.

Within this archive is a folder 'g2p2rnn'
Again I added flags on two lines in the makefile to change std library and point to my openfst installation:

-- CC=g++ -O2
++ CC=g++ -O2 -std=c++11
-- EXTRA= # Add extra here
++ EXTRA=-L/usr/local/Cellar/openfst/1.5.0/lib/ -I/usr/local/Cellar/openfst/1.5.0/include

then ran sudo make and it compiled to make 'phonetisaurus-g2p'

Please correct me if I'm wrong, I've not got Jasper running yet!

@Holzhaus

This comment has been minimized.

Copy link
Member

@Holzhaus Holzhaus commented Oct 27, 2015

@nitsujri First thing you could try is to choose another stt_engine in your profile.yml (e.g. google). You won't need cmuclmtk, phonetisaurus, openfst, sphinxbase or pocketsphinx in that case. If that works, you can look into trying to get pocketsphinx working. If not, please file bug reports, since the overall goal is to make jasper platform-independent.

@moochtm

This comment has been minimized.

Copy link

@moochtm moochtm commented Jun 9, 2016

@nyreed

Thanks for your Phonetisaurus pointer. I have Jasper running on Mac (El Capitan) now, and this was one of the last things I needed to sort out. I found that the Phonetisaurus version you pointed to was a different (I assume newer) version with different args. I changed g2p.py to check for which version was present and alter the args accordingly, and it's all up and running now.

@shreyashag

This comment has been minimized.

Copy link

@shreyashag shreyashag commented Aug 31, 2016

I need some help installing MITLM, could someone please help me?

When using ./autogen.sh, I run into the following errors ->

checking for ANSI C header files... (cached) yes
./configure: line 20456: AX_CXX_HEADER_TR1_UNORDERED_MAP: command not found
./configure: line 20457: syntax error near unexpected token noext,' ./configure: line 20457:AX_CXX_COMPILE_STDCXX_11(noext, optional)'

These are the steps I've done till now...
Add the Homebrew tap:

$ brew tap watsonbox/cmu-sphinx
You'll see some warnings as these formulae conflict with those in the main reponitory, but that's fine.

Install the libraries:

$ brew install --HEAD watsonbox/cmu-sphinx/cmu-sphinxbase
$ brew install --HEAD watsonbox/cmu-sphinx/cmu-sphinxtrain # optional
$ brew install --HEAD watsonbox/cmu-sphinx/cmu-pocketsphinx

openfst homebrew
cmuclmtk homebrew

GFortran -> https://gcc.gnu.org/wiki/GFortranBinaries#MacOS

@zoecarver

This comment has been minimized.

Copy link

@zoecarver zoecarver commented Feb 19, 2018

I installed MITLM by changing line 325 in src/NgramModel.cpp like stated above and by running sudo make install -stdlib=libstdc++ instead of sudo make install.

@zoecarver

This comment has been minimized.

Copy link

@zoecarver zoecarver commented Feb 21, 2018

Got it working on my machine pretty well, if you have questions feel free to ask.

Edit

Tutorial here: https://github.com/pudility/jasper-osx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.