OpenInterpreter / 01

The #1 open-source voice interface for desktop, mobile, and ESP32 chips.
https://01.openinterpreter.com/
GNU Affero General Public License v3.0
4.98k stars 529 forks source link

Portaudio Import - M2 Sonoma not working #140

Open Spshulem opened 7 months ago

Spshulem commented 7 months ago

I've tried nearly anything to get the portaudio working, this is the error I get:

(01os-py3.9) (base) spence@Peri-XL software % poetry run 01 Warning: '01' is an entry point defined in pyproject.toml, but it's not installed as a script. You may get impropersys.argv[0]`.

The support to run uninstalled scripts will be removed in a future release.

Run poetry install to resolve and get rid of this message.

Starting...

Could not import the PyAudio C module 'pyaudio._portaudio'. ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /Users/spence/Library/CloudStorage/Dropbox/Github/01/software/start.py:44 in run │ │ │ │ 41 │ │ │ local: bool = typer.Option(False, "--local", help="Use recommended local ser │ │ 42 │ │ ): │ │ 43 │ │ │ ❱ 44 │ _run( │ │ 45 │ │ server=server, │ │ 46 │ │ server_host=server_host, │ │ 47 │ │ server_port=server_port, │ │ │ │ ╭────────────── locals ──────────────╮ │ │ │ client = False │ │ │ │ client_type = 'auto' │ │ │ │ context_window = 2048 │ │ │ │ expose = False │ │ │ │ llm_service = 'litellm' │ │ │ │ llm_supports_functions = False │ │ │ │ llm_supports_vision = False │ │ │ │ local = False │ │ │ │ max_tokens = 4096 │ │ │ │ model = 'gpt-4' │ │ │ │ server = False │ │ │ │ server_host = '0.0.0.0' │ │ │ │ server_port = 10001 │ │ │ │ server_url = None │ │ │ │ stt_service = 'openai' │ │ │ │ temperature = 0.8 │ │ │ │ tts_service = 'openai' │ │ │ │ tunnel_service = 'ngrok' │ │ │ ╰────────────────────────────────────╯ │ │ │ │ /Users/spence/Library/CloudStorage/Dropbox/Github/01/software/start.py:136 in _run │ │ │ │ 133 │ │ │ │ except FileNotFoundError: │ │ 134 │ │ │ │ │ client_type = "linux" │ │ 135 │ │ │ │ ❱ 136 │ │ module = importlib.import_module(f".clients.{client_type}.device", package='sour │ │ 137 │ │ client_thread = threading.Thread(target=module.main, args=[server_url]) │ │ 138 │ │ client_thread.start() │ │ 139 │ │ │ │ ╭──────────────────────────────────────── locals ─────────────────────────────────────────╮ │ │ │ client = True │ │ │ │ client_type = 'mac' │ │ │ │ context_window = 2048 │ │ │ │ expose = False │ │ │ │ handle_exit = <function _run..handle_exit at 0x7f87a120c550> │ │ │ │ llm_service = 'litellm' │ │ │ │ llm_supports_functions = False │ │ │ │ llm_supports_vision = False │ │ │ │ local = False │ │ │ │ loop = <_UnixSelectorEventLoop running=True closed=False debug=False> │ │ │ │ max_tokens = 4096 │ │ │ │ model = 'gpt-4' │ │ │ │ server = True │ │ │ │ server_host = '0.0.0.0' │ │ │ │ server_port = 10001 │ │ │ │ server_thread = <Thread(Thread-9, started 13056811008)> │ │ │ │ server_url = '0.0.0.0:10001' │ │ │ │ stt_service = 'openai' │ │ │ │ system_type = 'Darwin' │ │ │ │ temperature = 0.8 │ │ │ │ tts_service = 'openai' │ │ │ │ tunnel_service = 'ngrok' │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /Users/spence/opt/anaconda3/lib/python3.9/importlib/init.py:127 in import_module │ │ │ │ 124 │ │ │ if character != '.': │ │ 125 │ │ │ │ break │ │ 126 │ │ │ level += 1 │ │ ❱ 127 │ return _bootstrap._gcd_import(name[level:], package, level) │ │ 128 │ │ 129 │ │ 130 _RELOADING = {} │ │ │ │ ╭───────────── locals ──────────────╮ │ │ │ character = 'c' │ │ │ │ level = 1 │ │ │ │ name = '.clients.mac.device' │ │ │ │ package = 'source' │ │ │ ╰───────────────────────────────────╯ │ │ in _gcd_import:1030 │ │ ╭─────────────── locals ────────────────╮ │ │ │ level = 1 │ │ │ │ name = 'source.clients.mac.device' │ │ │ │ package = 'source' │ │ │ ╰───────────────────────────────────────╯ │ │ in _find_andload:1007 │ │ ╭────────────────────── locals ──────────────────────╮ │ │ │ import = <function _gcd_import at 0x7f87d0098310> │ │ │ │ module = <object object at 0x7f87d0070060> │ │ │ │ name = 'source.clients.mac.device' │ │ │ ╰────────────────────────────────────────────────────╯ │ │ in _find_and_loadunlocked:986 │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ import = <function _gcd_import at 0x7f87d0098310> │ │ │ │ name = 'source.clients.mac.device' │ │ │ │ parent = 'source.clients.mac' │ │ │ │ parent_module = <module 'source.clients.mac' from │ │ │ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clien… │ │ │ │ path = [ │ │ │ │ │ │ │ │ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clien… │ │ │ │ ] │ │ │ │ spec = ModuleSpec(name='source.clients.mac.device', │ │ │ │ loader=<_frozen_importlib_external.SourceFileLoader object at │ │ │ │ 0x7f8770920880>, │ │ │ │ origin='/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/sourc… │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ in _load_unlocked:680 │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ module = <module 'source.clients.mac.device' from │ │ │ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clients/mac/… │ │ │ │ spec = ModuleSpec(name='source.clients.mac.device', │ │ │ │ loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f8770920880>, │ │ │ │ origin='/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clien… │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ in exec_module:850 │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ code = <code object at 0x7f87709287c0, file │ │ │ │ "/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clients/mac/… │ │ │ │ line 1> │ │ │ │ module = <module 'source.clients.mac.device' from │ │ │ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clients/mac/… │ │ │ │ self = <_frozen_importlib_external.SourceFileLoader object at 0x7f8770920880> │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ in _call_with_frames_removed:228 │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ args = ( │ │ │ │ │ <code object at 0x7f87709287c0, file │ │ │ │ "/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clients/mac/de… │ │ │ │ line 1>, │ │ │ │ │ { │ │ │ │ │ │ 'name': 'source.clients.mac.device', │ │ │ │ │ │ 'doc': None, │ │ │ │ │ │ 'package': 'source.clients.mac', │ │ │ │ │ │ 'loader': <_frozen_importlib_external.SourceFileLoader object at │ │ │ │ 0x7f8770920880>, │ │ │ │ │ │ 'spec': ModuleSpec(name='source.clients.mac.device', │ │ │ │ loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f8770920880>, │ │ │ │ origin='/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clients… │ │ │ │ │ │ 'file': │ │ │ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clients/mac'+1… │ │ │ │ │ │ 'cached': │ │ │ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clients/mac'+3… │ │ │ │ │ │ 'builtins': { │ │ │ │ │ │ │ 'name': 'builtins', │ │ │ │ │ │ │ 'doc': 'Built-in functions, exceptions, and other │ │ │ │ objects.\n\nNoteworthy: None is the `nil'+46, │ │ │ │ │ │ │ 'package': '', │ │ │ │ │ │ │ 'loader': <class '_frozen_importlib.BuiltinImporter'>, │ │ │ │ │ │ │ 'spec': ModuleSpec(name='builtins', loader=<class │ │ │ │ '_frozen_importlib.BuiltinImporter'>, origin='built-in'), │ │ │ │ │ │ │ 'build_class': <built-in function build_class>, │ │ │ │ │ │ │ 'import': , │ │ │ │ │ │ │ 'abs': , │ │ │ │ │ │ │ 'all': , │ │ │ │ │ │ │ 'any': , │ │ │ │ │ │ │ ... +142 │ │ │ │ │ │ } │ │ │ │ │ } │ │ │ │ ) │ │ │ │ f = │ │ │ │ kwds = {} │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clients/mac/device.py:1 in │ │ │ │ │ │ ❱ 1 from ..base_device import Device │ │ 2 │ │ 3 device = Device() │ │ 4 │ │ │ │ /Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clients/base_device.py:8 in │ │ │ │ │ │ 5 import asyncio │ │ 6 import threading │ │ 7 import os │ │ ❱ 8 import pyaudio │ │ 9 from starlette.websockets import WebSocket │ │ 10 from queue import Queue │ │ 11 from pynput import keyboard │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ asyncio = <module 'asyncio' from │ │ │ │ '/Users/spence/opt/anaconda3/lib/python3.9/asyncio/init.py'> │ │ │ │ load_dotenv = <function load_dotenv at 0x7f87a05a6310> │ │ │ │ os = <module 'os' from '/Users/spence/opt/anaconda3/lib/python3.9/os.py'> │ │ │ │ threading = <module 'threading' from │ │ │ │ '/Users/spence/opt/anaconda3/lib/python3.9/threading.py'> │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /Users/spence/Library/CloudStorage/Dropbox/Github/01/software/.venv/lib/python3.9/site-packages/ │ │ pyaudio/init.py:111 in │ │ │ │ 108 import warnings │ │ 109 │ │ 110 try: │ │ ❱ 111 │ import pyaudio._portaudio as pa │ │ 112 except ImportError: │ │ 113 │ print("Could not import the PyAudio C module 'pyaudio._portaudio'.") │ │ 114 │ raise │ │ │ │ ╭────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ locale = <module 'locale' from '/Users/spence/opt/anaconda3/lib/python3.9/locale.py'> │ │ │ │ warnings = <module 'warnings' from '/Users/spence/opt/anaconda3/lib/python3.9/warnings.py'> │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ImportError: dlopen(/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/.venv/lib/python3.9/site-packages/pyaudio/_portaudio.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_PaMacCore_SetupChannelMap' INFO: Started server process [51556] INFO: Waiting for application startup.

Ready.

INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:10001 (Press CTRL+C to quit) `

I've tried:

https://stackoverflow.com/questions/68251169/unable-to-install-pyaudio-on-m1-mac-portaudio-already-installed/68296168#68296168

https://discussions.apple.com/thread/252638887?sortBy=best

https://www.deskriders.dev/posts/1671901033-installing-pyaudio-mac/

Nothing seems to work, even trying in a separate env.

This happens when running the poetry run 01

Jpkovas commented 7 months ago

Getting the same error here

tyfiero commented 7 months ago

Thanks for bringing this up. It's on our list of issues to fix. I will comment back here when fixed.

tyfiero commented 7 months ago

I see that you're using python 3.9, 01 works best with python 3.11. You can use pyenv to install python3.11, then try again. I bet that fixes your issue here. I bet pyaudio needs a more recent python too

marczen commented 7 months ago

I encountered the same issue, and Ty was right. To resolve it, you need to use Python 3.11.

Here's what I did:

  1. Clone the repository
    • git clone https://github.com/OpenInterpreter/01
  2. Install pyenv and then Python 3.11 using pyenv:
    • brew update
    • brew install pyenv
    • pyenv install 3.11.0
  3. Navigate to 01/software and set Python 3.11 as the local version:
    • cd 01/software
    • pyenv local 3.11.0
  4. Initialize the project with Python version 3.11.0:
    • poetry env use 3.11.0
    • poetry install
  5. Then:
    • export OPENAI_API_KEY=sk...
    • poetry run 01

Regarding Python versions... let's just say it's complicated.

Spshulem commented 7 months ago

Followed every step, getting similar/same error:

` Installing the current project: 01OS (0.0.13) (311) spence@Peri-XL software % poetry run 01

Starting...

Could not import the PyAudio C module 'pyaudio._portaudio'. ╭────────────────────── Traceback (most recent call last) ───────────────────────╮ │ /Users/spence/Library/CloudStorage/Dropbox/Github/01/software/start.py:44 in │ │ run │ │ │ │ 41 │ │ │ local: bool = typer.Option(False, "--local", help="Use recom │ │ 42 │ │ ): │ │ 43 │ │ │ ❱ 44 │ _run( │ │ 45 │ │ server=server, │ │ 46 │ │ server_host=server_host, │ │ 47 │ │ server_port=server_port, │ │ │ │ ╭────────────── locals ──────────────╮ │ │ │ client = False │ │ │ │ client_type = 'auto' │ │ │ │ context_window = 2048 │ │ │ │ expose = False │ │ │ │ llm_service = 'litellm' │ │ │ │ llm_supports_functions = False │ │ │ │ llm_supports_vision = False │ │ │ │ local = False │ │ │ │ max_tokens = 4096 │ │ │ │ model = 'gpt-4' │ │ │ │ server = False │ │ │ │ server_host = '0.0.0.0' │ │ │ │ server_port = 10001 │ │ │ │ server_url = None │ │ │ │ stt_service = 'openai' │ │ │ │ temperature = 0.8 │ │ │ │ tts_service = 'openai' │ │ │ │ tunnel_service = 'ngrok' │ │ │ ╰────────────────────────────────────╯ │ │ │ │ /Users/spence/Library/CloudStorage/Dropbox/Github/01/software/start.py:138 in │ │ _run │ │ │ │ 135 │ │ │ │ except FileNotFoundError: │ │ 136 │ │ │ │ │ client_type = "linux" │ │ 137 │ │ │ │ ❱ 138 │ │ module = importlib.import_module(f".clients.{client_type}.device │ │ 139 │ │ client_thread = threading.Thread(target=module.main, args=[serve │ │ 140 │ │ client_thread.start() │ │ 141 │ │ │ │ ╭────────────────────────────────── locals ──────────────────────────────────╮ │ │ │ client = True │ │ │ │ client_type = 'mac' │ │ │ │ context_window = 2048 │ │ │ │ expose = False │ │ │ │ handle_exit = <function _run..handle_exit at │ │ │ │ 0x14dabb9c0> │ │ │ │ llm_service = 'litellm' │ │ │ │ llm_supports_functions = False │ │ │ │ llm_supports_vision = False │ │ │ │ local = False │ │ │ │ loop = <_UnixSelectorEventLoop running=True closed=False │ │ │ │ debug=False> │ │ │ │ max_tokens = 4096 │ │ │ │ model = 'gpt-4' │ │ │ │ server = True │ │ │ │ server_host = '0.0.0.0' │ │ │ │ server_port = 10001 │ │ │ │ server_thread = <Thread(Thread-8 (run_until_complete), started │ │ │ │ 13102145536)> │ │ │ │ server_url = '0.0.0.0:10001' │ │ │ │ stt_service = 'openai' │ │ │ │ system_type = 'Darwin' │ │ │ │ temperature = 0.8 │ │ │ │ tts_service = 'openai' │ │ │ │ tunnel_service = 'ngrok' │ │ │ ╰────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /Users/spence/opt/anaconda3/envs/311/lib/python3.11/importlib/init.py:126 │ │ in import_module │ │ │ │ 123 │ │ │ if character != '.': │ │ 124 │ │ │ │ break │ │ 125 │ │ │ level += 1 │ │ ❱ 126 │ return _bootstrap._gcd_import(name[level:], package, level) │ │ 127 │ │ 128 │ │ 129 _RELOADING = {} │ │ │ │ ╭───────────── locals ──────────────╮ │ │ │ character = 'c' │ │ │ │ level = 1 │ │ │ │ name = '.clients.mac.device' │ │ │ │ package = 'source' │ │ │ ╰───────────────────────────────────╯ │ │ in _gcd_import:1204 │ │ ╭─────────────── locals ────────────────╮ │ │ │ level = 1 │ │ │ │ name = 'source.clients.mac.device' │ │ │ │ package = 'source' │ │ │ ╰───────────────────────────────────────╯ │ │ in _find_andload:1176 │ │ ╭──────────────────── locals ─────────────────────╮ │ │ │ import = <function _gcd_import at 0x10d24fd80> │ │ │ │ module = <object object at 0x10d284050> │ │ │ │ name = 'source.clients.mac.device' │ │ │ ╰─────────────────────────────────────────────────╯ │ │ in _find_and_loadunlocked:1147 │ │ ╭────────────────────────────────── locals ──────────────────────────────────╮ │ │ │ child = 'device' │ │ │ │ import = <function _gcd_import at 0x10d24fd80> │ │ │ │ name = 'source.clients.mac.device' │ │ │ │ parent = 'source.clients.mac' │ │ │ │ parent_module = <module 'source.clients.mac' from │ │ │ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/sof… │ │ │ │ parent_spec = ModuleSpec(name='source.clients.mac', │ │ │ │ loader=<_frozen_importlib_external.SourceFileLoader object │ │ │ │ at 0x14dac7a90>, │ │ │ │ origin='/Users/spence/Library/CloudStorage/Dropbox/Github… │ │ │ │ submodule_search_locations=['/Users/spence/Library/CloudS… │ │ │ │ path = [ │ │ │ │ │ │ │ │ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/sof… │ │ │ │ ] │ │ │ │ spec = ModuleSpec(name='source.clients.mac.device', │ │ │ │ loader=<_frozen_importlib_external.SourceFileLoader object │ │ │ │ at 0x14dad4410>, │ │ │ │ origin='/Users/spence/Library/CloudStorage/Dropbox/Github… │ │ │ ╰────────────────────────────────────────────────────────────────────────────╯ │ │ in _load_unlocked:690 │ │ ╭────────────────────────────────── locals ──────────────────────────────────╮ │ │ │ module = <module 'source.clients.mac.device' from │ │ │ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/s… │ │ │ │ spec = ModuleSpec(name='source.clients.mac.device', │ │ │ │ loader=<_frozen_importlib_external.SourceFileLoader object at │ │ │ │ 0x14dad4410>, │ │ │ │ origin='/Users/spence/Library/CloudStorage/Dropbox/Github/01/sof… │ │ │ ╰────────────────────────────────────────────────────────────────────────────╯ │ │ in exec_module:940 │ │ ╭────────────────────────────────── locals ──────────────────────────────────╮ │ │ │ code = <code object at 0x14daa0be0, file │ │ │ │ "/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/s… │ │ │ │ line 1> │ │ │ │ module = <module 'source.clients.mac.device' from │ │ │ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/s… │ │ │ │ self = <_frozen_importlib_external.SourceFileLoader object at │ │ │ │ 0x14dad4410> │ │ │ ╰────────────────────────────────────────────────────────────────────────────╯ │ │ in _call_with_frames_removed:241 │ │ ╭────────────────────────────────── locals ──────────────────────────────────╮ │ │ │ args = ( │ │ │ │ │ <code object at 0x14daa0be0, file │ │ │ │ "/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/sou… │ │ │ │ line 1>, │ │ │ │ │ { │ │ │ │ │ │ 'name': 'source.clients.mac.device', │ │ │ │ │ │ 'doc': None, │ │ │ │ │ │ 'package': 'source.clients.mac', │ │ │ │ │ │ 'loader': <_frozen_importlib_external.SourceFileLoader │ │ │ │ object at 0x14dad4410>, │ │ │ │ │ │ 'spec': ModuleSpec(name='source.clients.mac.device', │ │ │ │ loader=<_frozen_importlib_external.SourceFileLoader object at │ │ │ │ 0x14dad4410>, │ │ │ │ origin='/Users/spence/Library/CloudStorage/Dropbox/Github/01/softw… │ │ │ │ │ │ 'file': │ │ │ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/sou… │ │ │ │ │ │ 'cached': │ │ │ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/sou… │ │ │ │ │ │ 'builtins': { │ │ │ │ │ │ │ 'name': 'builtins', │ │ │ │ │ │ │ 'doc': 'Built-in functions, types, exceptions, and │ │ │ │ other objects.\n\nThis module provides '+346, │ │ │ │ │ │ │ 'package': '', │ │ │ │ │ │ │ 'loader': <class │ │ │ │ '_frozen_importlib.BuiltinImporter'>, │ │ │ │ │ │ │ 'spec': ModuleSpec(name='builtins', loader=<class │ │ │ │ '_frozen_importlib.BuiltinImporter'>, origin='built-in'), │ │ │ │ │ │ │ 'build_class': <built-in function build_class>, │ │ │ │ │ │ │ 'import': , │ │ │ │ │ │ │ 'abs': , │ │ │ │ │ │ │ 'all': , │ │ │ │ │ │ │ 'any': , │ │ │ │ │ │ │ ... +147 │ │ │ │ │ │ } │ │ │ │ │ } │ │ │ │ ) │ │ │ │ f = │ │ │ │ kwds = {} │ │ │ ╰────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clients/m │ │ ac/device.py:1 in │ │ │ │ ❱ 1 from ..base_device import Device │ │ 2 │ │ 3 device = Device() │ │ 4 │ │ │ │ /Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clients/b │ │ ase_device.py:8 in │ │ │ │ 5 import asyncio │ │ 6 import threading │ │ 7 import os │ │ ❱ 8 import pyaudio │ │ 9 from starlette.websockets import WebSocket │ │ 10 from queue import Queue │ │ 11 from pynput import keyboard │ │ │ │ ╭────────────────────────────────── locals ──────────────────────────────────╮ │ │ │ asyncio = <module 'asyncio' from │ │ │ │ '/Users/spence/opt/anaconda3/envs/311/lib/python3.11/asynci… │ │ │ │ load_dotenv = <function load_dotenv at 0x10e50f060> │ │ │ │ os = <module 'os' (frozen)> │ │ │ │ threading = <module 'threading' from │ │ │ │ '/Users/spence/opt/anaconda3/envs/311/lib/python3.11/thread… │ │ │ ╰────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /Users/spence/opt/anaconda3/envs/311/lib/python3.11/site-packages/pyaudio/in │ │ it.py:111 in │ │ │ │ 108 import warnings │ │ 109 │ │ 110 try: │ │ ❱ 111 │ import pyaudio._portaudio as pa │ │ 112 except ImportError: │ │ 113 │ print("Could not import the PyAudio C module 'pyaudio.portaudio'." │ │ 114 │ raise │ │ │ │ ╭────────────────────────────────── locals ──────────────────────────────────╮ │ │ │ locale = <module 'locale' from │ │ │ │ '/Users/spence/opt/anaconda3/envs/311/lib/python3.11/locale.py… │ │ │ │ warnings = <module 'warnings' from │ │ │ │ '/Users/spence/opt/anaconda3/envs/311/lib/python3.11/warnings.… │ │ │ ╰────────────────────────────────────────────────────────────────────────────╯ │ ╰────────────────────────────────────────────────────────────────────────────────╯ ImportError: dlopen(/Users/spence/opt/anaconda3/envs/311/lib/python3.11/site-packages/pyaudio/ portaudio.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_PaMacCore_SetupChannelMap' INFO: Started server process [52694] INFO: Waiting for application startup.

Ready.

INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:10001 (Press CTRL+C to quit)

`

I did get it working for a brief period on 3.9, but couldn't get it to actually work but couldn't get the audio to transcribe, now just can't get it working at all

tyfiero commented 7 months ago

You might have already tried this, but can you confirm that this doesn't work? pip install --upgrade pyaudio

If that doesn't work, try this:

pip uninstall pyaudio
pip install pyaudio

And if that still doesn't work, try:

brew uninstall portaudio
brew install portaudio
pip install pyaudio --global-option="build_ext" --global-option="-I/usr/local/include" --global-option="-L/usr/local/lib"