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

Pyglet errors #45

Open
joshgel opened this issue May 28, 2016 · 0 comments
Open

Pyglet errors #45

joshgel opened this issue May 28, 2016 · 0 comments

Comments

@joshgel
Copy link

joshgel commented May 28, 2016

Thanks for the great project. I have been trying to get this running on my raspberry pi 3 for a little while. I struggled with the buffer overflow problem that others have mentioned, but got passed that by changing the line buf = stream.read(1024) --> buf = stream.read(1024, exception_on_overflow=False)

That got me to "~ Waiting to be woken up... "

But no matter how i tried to pronounce athena, it wouldn't register. So I ran the mic test. With passive listening, it just sits there waiting for the wake up word and doesn't register. With active listening, I get this error.

I've tested my mic and speakers with arecord and aplay and am able to record and play back sound.

Thanks for you help

---- Running Microphone Test ----

~ Importing stt.py...
~ Initializing stt.py...
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1022:(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

~ Type 'q' at any time to quit
~ Test Active or Passive Listening? (A/P): a

~ Active listening...
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/pyglet/init.py", line 351, in getattr
return getattr(self._module, name)
AttributeError: 'NoneType' object has no attribute 'load'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "mic_test.py", line 25, in
stt.active_listen()
File "/usr/local/lib/python3.4/dist-packages/athena/stt.py", line 63, in active_listen
tts.play_mp3('double-beep.mp3')
File "/usr/local/lib/python3.4/dist-packages/athena/tts.py", line 28, in play_mp3
sound = pyglet.resource.media(file_name, streaming=False)
File "/usr/local/lib/python3.4/dist-packages/pyglet/resource.py", line 629, in media
return media.load(path, streaming=streaming)
File "/usr/local/lib/python3.4/dist-packages/pyglet/init.py", line 357, in getattr
import(import_name)
File "/usr/local/lib/python3.4/dist-packages/pyglet/media/init.py", line 1492, in
from . import avbin
File "/usr/local/lib/python3.4/dist-packages/pyglet/media/avbin.py", line 48, in
from pyglet.gl import gl_info
File "/usr/local/lib/python3.4/dist-packages/pyglet/gl/init.py", line 236, in
import pyglet.window
File "/usr/local/lib/python3.4/dist-packages/pyglet/window/init.py", line 1816, in
gl._create_shadow_window()
File "/usr/local/lib/python3.4/dist-packages/pyglet/gl/init.py", line 205, in _create_shadow_window
_shadow_window = Window(width=1, height=1, visible=False)
File "/usr/local/lib/python3.4/dist-packages/pyglet/window/xlib/init.py", line 163, in init
super(XlibWindow, self).init(_args, *_kwargs)
File "/usr/local/lib/python3.4/dist-packages/pyglet/window/init.py", line 493, in init
display = get_platform().get_default_display()
File "/usr/local/lib/python3.4/dist-packages/pyglet/window/init.py", line 1765, in get_default_display
return pyglet.canvas.get_display()
File "/usr/local/lib/python3.4/dist-packages/pyglet/canvas/init.py", line 82, in get_display
return Display()
File "/usr/local/lib/python3.4/dist-packages/pyglet/canvas/xlib.py", line 83, in init
raise NoSuchDisplayException('Cannot connect to "%s"' % name)
pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"

~ Microphone Test failed :(

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

1 participant