-
Notifications
You must be signed in to change notification settings - Fork 836
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
added support for m1 mac #40
base: main
Are you sure you want to change the base?
Conversation
@enemaliwilliam Is this ONLY for Apple Silicon macs? would love to get it working on Intel too! Currently getting this on my Intel mac when running
|
@enemaliwilliam I am getting this error when I try to run on an M1 Max:
|
Great work @enemaliwilliam! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
can you change the index of your device ? line 55 of AudioRecorder.py |
I'm now trying with default speakers. |
Got it working. Added some logs to actually see the transcript and AI response and it's working. |
@@ -20,6 +20,11 @@ Follow these steps to set up and run Ecoute on your local machine. | |||
- Windows OS (Not tested on others) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add M1 macs here too :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't agree such hard coded way. the device index is variable to different compuaters and conditions. There should be more elegant solutions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! I've left some comments on your work. Unfortunately, I don't have any specific contributing guidelines to facilitate easier approval for your pull requests. However, I recommend following industry best practices and considering the feedback provided. Please feel free to express disagreements with the design decisions I've made. Although I may not always have time to assist directly, I will be sure to approve your changes when they align with my perspective or when you manage to change my mind.
from datetime import datetime | ||
import os | ||
|
||
if os.name == 'nt': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Try to refactor to set up all differences between windows and MAC in one place. Dependency injection looks appropriate here open for other approach's to keep code clean.
break | ||
else: | ||
print("[ERROR] No loopback device found.") | ||
if os.name == 'nt': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DefaultSpeakerRecorder should be agnostic to operating system. Same as point 1)
from heapq import merge | ||
|
||
if os.name == 'nt': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as 1)
|
||
|
||
<details> | ||
<summary>Windows</summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -107,7 +107,10 @@ def get_pyaudio(): | |||
Imports the pyaudio module and checks its version. Throws exceptions if pyaudio can't be found or a wrong version is installed | |||
""" | |||
try: | |||
import pyaudiowpatch as pyaudio | |||
if os.name == 'nt': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pip install -r requirements.txt gives me the following error on macos with m1 chip.
note: This error originates from a subprocess, and is likely not a problem with pip. |
You probably didn't install the portaudio using homebrew |
I couldn't get this to work on Mac M1 with Python v This kept throwing the error:
I could however get it to work with an older Python version - v |
I got it running, and my UI is working fine on my M2 Pro. No errors whatsoever. But the app couldn't separate the speaker's words and mine. Everything is coming from [You]. I tried to change the |
Thanks for sharing your project on GitHub! It's impressive to see |
I totally agree with you. In fact, on my device (M2 MacBook Air), the code only works when the device index is set to 0, not 1. We definitely need to consider this variability in different setups. |
I attempted to run it on my Apple M1 Pro, but unfortunately, I encountered an error that I was unable to resolve despite my efforts. I followed the instructions provided in link, but the issue persisted. Do you have any recommendations for how I can resolve this error?
versions: brew info portaudio
==> portaudio: stable 19.7.0 (bottled), HEAD
Cross-platform library for audio I/O
http://www.portaudio.com
/opt/homebrew/Cellar/portaudio/HEAD-cb8d3dc (33 files, 546.7KB) *
Built from source on 2023-06-08 at 18:31:58
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/portaudio.rb
License: MIT
==> Dependencies
Build: pkg-config ✔
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 7,874 (30 days), 1,289 (90 days), 73,904 (365 days)
install-on-request: 3,964 (30 days), 967 (90 days), 43,194 (365 days)
build-error: 0 (30 days) |
I fixed the issue using the Python (v 3.11.3) I installed using brew |
this is amazing, works perfectly followed this link to install and also:
|
Why is this not merged yet? |
Likely because @SevaSk requested changes that haven't been addressed? Thank you all for your work on this. Currently testing with my Intel MBP. |
did you get this fixed? I'm seeing the same issue, which SPEAKER AND YOU are the same, reading the microphone input. |
on Intel5 mac |
*/ecoute/AudioTranscriber.py", line 1, in I am receiving this error |
try this: |
@enemaliwilliam |
can be merged ? eager to have this feature. |
I was able to get it to run on my m1 mac with a couple tweaks. Still needs to be optimized but it works