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

Can't get cursor to show #5

Open
peterjauhal opened this issue Sep 18, 2024 · 7 comments
Open

Can't get cursor to show #5

peterjauhal opened this issue Sep 18, 2024 · 7 comments

Comments

@peterjauhal
Copy link

Hello
I installed dg.py in my load path and the the code you suggested. When I start esi-dictate-start nothing happens. The cursor does not change. Please let me know if i need to install something else. I am on a Lenovo laptop running Arch Linux with Emacs 29.4.

@edgar-vincent
Copy link

What happens when you start dg.py in a terminal? This may be unrelated to your issue, but for it to start working I had to install the pyaudio module in addition to deepgram-sdk. This should probably be mentioned in the docs.

@peterjauhal
Copy link
Author

when i run dg.py i see the following message:
(venv) peter@Lenovo:~$ dg.py
/home/peter/custom-scripts/dg.py:36: DeprecatedWarning: live is deprecated as of 3.4.0 and will be removed in 4.0.0. deepgram.listen.live is deprecated. Use deepgram.listen.websocket instead.
dg_connection = deepgram.listen.live.v("1")
WebSocketException in ListenWebSocketClient.start: server rejected WebSocket connection: HTTP 401
ALSA lib pcm_dsnoop.c:567:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2722:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2722:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2722:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_oss.c:404:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:404:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_a52.c:1036:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:481:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:481:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Press Enter to stop recording...

Error while sending: 'ListenWebSocketClient' object has no attribute '_socket'
Traceback (most recent call last):
File "/home/peter/venv/lib/python3.12/site-packages/deepgram/audio/microphone/microphone.py", line 191, in _callback
self._push_callback(input_data)
File "/home/peter/venv/lib/python3.12/site-packages/deepgram/clients/listen/v1/websocket/client.py", line 707, in send
if not self.is_connected():
^^^^^^^^^^^^^^^^^^^
File "/home/peter/venv/lib/python3.12/site-packages/deepgram/clients/listen/v1/websocket/client.py", line 228, in is_connected
return self._socket is not None

@edgar-vincent
Copy link

edgar-vincent commented Sep 19, 2024

Do you use Pulseaudio? Pipewire? Perhaps you need pipewire-alsa or pulseaudio-alsa.
Also, check that your microphone is not muted, with alsamixer (if you don't use one of the aforementioned sound servers) or pavucontrol (if you use pipewire-pulse or pulseaudio).

@janaab11
Copy link
Contributor

janaab11 commented Sep 19, 2024

I am on MacOS 12.7. The following fixed a similar issue for me, and got me started:

  • install deepgram-sdk and pyaudio in your Python environment
  • MacOS has known issues with the underlying portaudio, sobrew install portaudio

You can then test the DG functionality by running the dg.py script separately - as mentioned above.

@lepisma
Copy link
Owner

lepisma commented Sep 28, 2024

Hi @peterjauhal was this issue solved for you based on the above suggestions by people?

@peterjauhal
Copy link
Author

peterjauhal commented Sep 28, 2024 via email

@lepisma
Copy link
Owner

lepisma commented Sep 29, 2024

Alright, in that case I will still keep the issue open.

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

4 participants