rob-mccann / Pi-Voice

A hackday project. Run the program, speak into your microphone and hear the response from your speakers.
317 stars 37 forks source link

Can this project run on OSX? #6

Closed tevino closed 11 years ago

tevino commented 11 years ago

Hi there,

I can't get it run on ubuntu 12.04, it complains that there are no default output device, but I can't find anywhere to set the default device, I googled awhile then this turn out to be a problem of portaudio which I'm not familiar with.

Then I saw this, so I tried to install all the libraries on my mac, but I can't get pyaudio installed(compiled error because missing file cdio/cdda.h, after that it complains ld: library not found for -lcdio_paranoia) Anybody help?

Thanks!

rob-mccann commented 11 years ago

How strange!

It works on the latest OSX on my machine with python installed via homebrew and packages via PIP.

It should also work on Ubuntu 13.04, it worked previously, although I've not tried it recently.

Do you have a microphone plugged in? Do you see the sound bar moving in your system preferences?

tevino commented 11 years ago

@rob-mccann That's really strange!

I use homebrew python and pip with virtualenv on OSX as well, how do you get this installed? Just make install like the instruction says?

tevino commented 11 years ago

@rob-mccann My microphone works well, the ubuntu is a virtual machine on OSX, BTW this works great on the ubuntu machine.

rob-mccann commented 11 years ago

I think it's just pip install pyaudio but I don't remember, do let me know what you find out so I can update the docs :)

tevino commented 11 years ago

@rob-mccann Yes, I've installed pyaudio via pip install pyaudio but what I got when I run listen.py is ImportError: No module named audiotools, shouldn't audiotools and pyaudio be two different module?

rob-mccann commented 11 years ago

Does pip install audiotools work? I can't remember if I built it from source or not.

Thanks for helping with this, by the way. Means we can get it documented for future people :)

tevino commented 11 years ago
$ pip install audiotools
Downloading/unpacking audiotools
  Could not find any downloads that satisfy the requirement audiotools
No distributions at all found for audiotools
Storing complete log in /Users/tevin/.pip/pip.log

It's also my pleasure to help ;)

rob-mccann commented 11 years ago

ah right. Here's instructions on building it from source.

It'd be cool if there was an alternative.

http://audiotools.sourceforge.net/install.html

tevino commented 11 years ago

That's the problem, as I described at the beginning of this issue, I can't compile audiotools from source. I started fresh and tried again just now: http://ascii.io/a/3620

Am I doing something wrong?

rob-mccann commented 11 years ago

Ah I see. Looks like you might be missing an audio-tools dependency. Try installing python-devel package. If that doesn't work, try installing libcdio-paranoia-dev as recommended here:

http://stackoverflow.com/questions/7199061/python-audio-tools-installation-problem

tevino commented 11 years ago

I use brewed python, it included python.h etc, so python-devel should not be the problem.

I googled of course and saw this post but the libcdio-paranoia-dev is a ubuntu package so I just gave up.

Now the problem is solved by compiling cdio from source, brew install libcdio doesn't do the work.

Thanks for you help!