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

Unable to open the microphone #58

Open
kernelhacks opened this issue Jun 14, 2024 · 10 comments
Open

Unable to open the microphone #58

kernelhacks opened this issue Jun 14, 2024 · 10 comments

Comments

@kernelhacks
Copy link

Hi I'm unable to open the MIC on the APP, this is the error

Exception: [Errno -9996] Invalid input device (no default output device)
Type: OSErrorMessage: [Errno -9996] Invalid input device (no default output device)
Traceback: File "/snap/pygpt/238/src/pygpt_net/plugin/audio_input/simple.py", line 88, in start_recording
self.stream = self.p.open(format=pyaudio.paInt16,
File "/snap/pygpt/238/lib/python3.10/site-packages/pyaudio/init.py", line 639, in open
stream = PyAudio.Stream(self, *args, **kwargs)
File "/snap/pygpt/238/lib/python3.10/site-packages/pyaudio/init.py", line 441, in init
self._stream = pa.open(**arguments)

I thought that the issues were related to Pyaudio so I tested the Pyaudio library with a little script to record my voice and is working, so I'm not sure what is causing this.
My Environment:
OS: Ubuntu 22.04.4 LTS
CPU: Intel® Xeon(R) CPU E5-2690 v4 @ 2.60GHz × 56
Mem: 128
Python Ver: 3

@kernelhacks
Copy link
Author

I ran the source code, and it is working fine. it seems that the snap installation process has the issues described above.

@szczyglis-dev
Copy link
Owner

Try this:

sudo snap connect pygpt:audio-record :audio-record

@szczyglis-dev szczyglis-dev added question Further information is requested and removed question Further information is requested labels Nov 15, 2024
@077531
Copy link

077531 commented Nov 20, 2024

me neither. I have tried snap and python installation with python 3.11.6 and no way.

Audio Input: Exception: 'NoneType' object has no attribute 'agent_call'
Type: AttributeErrorMessage: 'NoneType' object has no attribute 'agent_call'
Traceback:   File "/home/user/.pyenv/versions/3.11.6/envs/my-pygpt-env/lib/python3.11/site-packages/pygpt_net/plugin/audio_input/worker.py", line 82, in handle_simple
    self.response(transcript)
  File "/home/user/.pyenv/versions/3.11.6/envs/my-pygpt-env/lib/python3.11/site-packages/typing_extensions.py", line 2853, in wrapper
    return arg(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.pyenv/versions/3.11.6/envs/my-pygpt-env/lib/python3.11/site-packages/pygpt_net/plugin/base/worker.py", line 74, in response
    self.reply(response, extra_data)
  File "/home/user/.pyenv/versions/3.11.6/envs/my-pygpt-env/lib/python3.11/site-packages/pygpt_net/plugin/base/worker.py", line 84, in reply
    if self.ctx.agent_call and self.plugin is not None:
       ^^^^^^^^^^^^^^^^^^^

System Report Details

Report Details

  • Generated Date: 2024-11-20 19:45:53

Hardware Information:

  • Hardware Model: MEDION H81H3-EM2
  • Memory: 16.0 GiB
  • Processor: Intel® Core™ i7-4790 × 8
  • Graphics: NVIDIA GeForce GTX 745
  • Disk Capacity: 480.1 GB

Software Information:

  • Firmware Version: H81EM2W08.309
  • OS Name: Ubuntu 24.04.1 LTS
  • OS Build: (null)
  • OS Type: 64-bit
  • GNOME Version: 46
  • System Windows: X11
  • Kernel version: Linux 6.8.0-48-generic

@szczyglis-dev
Copy link
Owner

Please try again, the bug mentioned above has been fixed in recent versions (although it has nothing to do with microphone access, and connecting slots in the Snap version is still necessary).

@di4megit
Copy link

di4megit commented Dec 7, 2024

damn me too i tried hours of troubleshooting. i guess i will look for alternative. jpegg files arent working either. This program worked yesterday on manjaro. Awsome program too

@gitme1now
Copy link

gitme1now commented Jan 1, 2025

Has anyone figured this audio issue out yet...??? i am also having an issue just using the basic Chat feature in gpt-4o, or gpt-4, getting this error =

Error code: 404 - {'error': {'message': 'The model gpt-4o does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}

...and this is what i get when trying the audio input =

Exception: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Type: TypeErrorMessage: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Traceback: File "/snap/pygpt/338/src/pygpt_net/plugin/audio_input/simple.py", line 88, in start_recording
device_id = int(self.plugin.window.core.config.get('audio.input.device', 0))

....and when i go to setting in PyGPT there is no mic to chose from, but yet in the OS settings i see all the mics and they work fine on every other program using a mic....

...and i do use the - sudo snap connect pygpt:audio-record :audio-record ...and still no mic shows up or works....HELP PLEASE...!!!

My OS = Zorin OS 17.2 Pro/Ubuntu based
AMD® Ryzen 7 5700g with radeon graphics × 16
RENOIR (renoir, LLVM 15.0.7, DRM 3.57, 6.8.0-50-generic)
Windows System X11
MEM = 32gb
Latest Update
Latest Kernel

@Guyverix
Copy link

Guyverix commented Jan 2, 2025

Just to chime in, the no Mic issue is still hitting me with the snap install on Mint 22.
Version: 2.4.46, Linux, x86_64 (snap)
Build: 2024-12-16
OpenAI API: 1.55.1, LangChain: 0.2.16, LlamaIndex: 0.10.67

Will test against a manual compile when I have some spare time.

@gitme1now
Copy link

is this NOT the place to go for support...???? Don't seem to be getting any at all here....

@szczyglis-dev
Copy link
Owner

Try to connect Alsa if this is not connected yet:

sudo snap connect pygpt:alsa

and

sudo snap connect pygpt:audio-record :audio-record

@szczyglis-dev
Copy link
Owner

I have submitted a request for auto-connecting the alsa and audio-record interfaces to Canonical/Snapcraft:

https://forum.snapcraft.io/t/request-auto-connect-for-snap-pygpt/44708

Waiting for the Snapcraft team to consider it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants