s0d3s / PyAudioWPatch

🐍 PyAudio | PortAudio fork with WASAPI loopback support 🔊 Record audio from speakers on Windows
Other
155 stars 12 forks source link

Cannot load dll while importing pyaudiowpatch #24

Closed DarkoMilosevic86 closed 2 weeks ago

DarkoMilosevic86 commented 2 weeks ago

I am using Windows 10, Python 3.11 32bit and Cygwin with all necesary packages installed for building the portaudio. When I try to install pyaudiowpatch using:

pip install pyaudiowpatch

It installs PyAudioWPatch, but without _portaudiowpatch.cp311-win32.pyd When I run command:

pip install pyaudiowpatch

It installs PyAudioWPatch with _portaudiowpatch.cp311-win32.pyd file, but when I try to import pyaudiowpatch in a code using:

import pyaudiowpatch as pyaudio

I am getting the following error:

    from .pyaudiowpatch import PyAudio, paInt16
  File "C:\Users\darem\AppData\Roaming\nvda\addons\WasapiSoundRecorder\globalPlugins\WasapiSoundRecorder\pyaudiowpatch\__init__.py", line 132, in <module>
    import _portaudiowpatch as pa
ImportError: DLL load failed while importing _portaudiowpatch: The specified module could not be found.

What's the name of required .dll file and how to solve this issue? I am developing the addon for the NVDA screen reading software for sound recording using WASAPI, and it is very necesary for me to work. Please asssist me to debug this.

DarkoMilosevic86 commented 2 weeks ago

I am getting the .pyd file when installing using Cygwin terminal.

s0d3s commented 2 weeks ago

Hi🖐 I`m glad that this lib can be useful to you!

To address your concerns:

I've been working on the release since yesterday, but I haven't finished testing it yet. The release will be available within the next two days. In the meantime, I have a "fixed" .pyd file that you can download. Use it to replace your current version (/path/to/python/Lib/site-packages/), but keep it's name(rename my file). HERE IS NO GUARANTEE

DarkoMilosevic86 commented 2 weeks ago

Thank you, it works now. The NVDA screen reader uses Python 3.11 32bit interpreter and that's reason that I need that to work. I was trying in 64 bit, and it's working without problem.

Thank you very much.

Best regards,

Darji

ned, 26. sij 2025. u 23:00 SoDeS @.***> napisao je:

Hi🖐 I`m glad that this lib can be useful to you!

To address your concerns:

  • This issue is related only to building for the 32-bit architecture (so you can switch to 64-bit Python to continue development until I provide a hotfix).
  • The file itself is fine, but its dependency (libgcc_s_sjlj-1.dll) is missing on your system. Don't worry about searching for it; it will be linked in the next release.

I've been working on the release since yesterday, but I haven't finished testing it yet. The release will be available within the next two days. In the meantime, I have a "fixed" .pyd file that you can download https://github.com/s0d3s/PyAudioWPatch/releases/download/v0.2.12.6/_portaudiowpatch.cp311-win32.pyd. Use it to replace your current version (/path/to/python/Lib/site-packages/), but keep it's name(rename my file). HERE IS NO GUARANTEE

— Reply to this email directly, view it on GitHub https://github.com/s0d3s/PyAudioWPatch/issues/24#issuecomment-2614607574, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCDUNMMSIEX6IA4K44VIC32MVLJPAVCNFSM6AAAAABV3U4C5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJUGYYDONJXGQ . You are receiving this because you authored the thread.Message ID: @.***>

-- Darko Milošević

QTH:JN93QI

Call Sign:4O4DMC

s0d3s commented 2 weeks ago

@DarkoMilosevic86 Now you can try the new release(0.2.12.7)🔥

pip install pyaudiowpatch --upgrade