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

IOError: [Errno -9985] Device unavailable #199

Closed
rodok opened this issue Jan 30, 2017 · 27 comments
Closed

IOError: [Errno -9985] Device unavailable #199

rodok opened this issue Jan 30, 2017 · 27 comments

Comments

@rodok
Copy link

rodok commented Jan 30, 2017

My issue is pretty much the same as issue #114.
I tried to troubleshoot by testing with "python kalliope.py gui" and ended up with an issue when I try a second time the speech to text feature (google). The first time it's all ok, but at the second try, I get the following dump:

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/SpeechRecognition-3.6.0-py2.7.egg/speech_recognition/__init__.py", line 604, in threaded_listen
    if running[0]: callback(self, audio)
  File "/home/pi/kalliope/kalliope/stt/google/google.py", line 43, in google_callback
    self._analyse_audio(audio_to_text=None)
  File "/home/pi/kalliope/kalliope/stt/google/google.py", line 57, in _analyse_audio
    self.main_controller_callback(audio_to_text)
  File "/home/pi/kalliope/kalliope/core/ShellGui.py", line 174, in callback_stt
    self.show_stt_test_menu()
  File "/home/pi/kalliope/kalliope/core/ShellGui.py", line 97, in show_stt_test_menu
    order_listener.load_stt_plugin()
  File "/home/pi/kalliope/kalliope/core/OrderListener.py", line 66, in load_stt_plugin
    resources_dir=stt_folder)
  File "/home/pi/kalliope/kalliope/core/Utils/Utils.py", line 129, in get_dynamic_class_instantiation
    return klass(**parameters)
  File "/home/pi/kalliope/kalliope/stt/google/google.py", line 17, in __init__
    SpeechRecognition.__init__(self)
  File "/home/pi/kalliope/kalliope/stt/Utils.py", line 25, in __init__
    with self.microphone as source:
  File "/usr/local/lib/python2.7/dist-packages/SpeechRecognition-3.6.0-py2.7.egg/speech_recognition/__init__.py", line 141, in __enter__
    input=True,  # stream is an input stream
  File "build/bdist.linux-armv7l/egg/pyaudio.py", line 750, in open
    stream = Stream(self, *args, **kwargs)
  File "build/bdist.linux-armv7l/egg/pyaudio.py", line 441, in __init__
    self._stream = pa.open(**arguments)
IOError: [Errno -9985] Device unavailable

I'm running on Orange PI PC (which has a working in/ou 3.5 jack headset) with the latest DietPI image.
Any help would be welcome.

@Sispheor
Copy link
Member

Sorry but we don't support the Orange Pi and DietPi. Only Raspbian so far.

@pico75
Copy link

pico75 commented Jan 30, 2017

hello

got the same problem with Raspberry (Raspberry Pi 3 Model B)

Linux kalliope 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux

cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2

lsusb
Bus 001 Device 004: ID 046d:0826 Logitech, Inc.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: C525 [HD Webcam C525], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

/home/pi/.asoundrc

pcm.!default {
type asym
playback.pcm {
type plug
slave.pcm "hw:1,0"
}
capture.pcm {
type plug
slave.pcm "hw:1,0"
}
}

my user is in audio group
only ssh

kalliope start

Starting event manager
Events loaded
Starting Kalliope
Press Ctrl+C for stopping
Starting REST API Listening port: 5000
Waiting for trigger detection
2017-01-30 22:37:10,706 :: INFO :: Keyword 1 detected at time: 2017-01-30 22:37:10
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/kalliope/core/OrderListener.py", line 50, in run
self.stt_instance = self.load_stt_plugin()
File "/usr/local/lib/python2.7/dist-packages/kalliope/core/OrderListener.py", line 66, in load_stt_plugin
resources_dir=stt_folder)
File "/usr/local/lib/python2.7/dist-packages/kalliope/core/Utils/Utils.py", line 129, in get_dynamic_class_instantiation
return klass(**parameters)
File "/usr/local/lib/python2.7/dist-packages/kalliope/stt/google/google.py", line 17, in init
SpeechRecognition.init(self)
File "/usr/local/lib/python2.7/dist-packages/kalliope/stt/Utils.py", line 25, in init
with self.microphone as source:
File "/usr/local/lib/python2.7/dist-packages/speech_recognition/init.py", line 141, in enter
input=True, # stream is an input stream
File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 750, in open
stream = Stream(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 441, in init
self._stream = pa.open(**arguments)
IOError: [Errno -9985] Device unavailable

@Sispheor
Copy link
Member

Thank you for the feedback.

It's seems that the ARM proc is too slow to release the mic after the trigger engine finish its job and before the STT engine need it. I never had the same behavior from my side. But I use Kalliope only on my NAS which is on Ubuntu with a x86_64 proc.

Let's find the problem then!
Can you try to catch the same behavior with the debug mode activated? I think we will only need to add a little sleep somewhere to let the time to the trigger thread process to close the connection properly.

@rodok
Copy link
Author

rodok commented Jan 31, 2017

pico75: could you try with "python kalliope.py gui"
On my side when it test the TTS function through the GUI, I get the error after the second try, this does not seem to be linked to a sleep but more to not releasing after use.
sispheor: I'd need a hint on how to start the debug mode.

@pico75
Copy link

pico75 commented Jan 31, 2017

Thanks for your reply
I will try this night and give you some more info

@Sispheor
Copy link
Member

Exact, the bug can even been caught from the GUI. More weird than I expected.
Ok, I'll take a look guys.

@pico75
Copy link

pico75 commented Jan 31, 2017

rodok : i have done "python kalliope.py gui"
TTS all is ok on all voices

STT
first try ok
Second try

Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/speech_recognition/init.py", line 604, in threaded_listen
if running[0]: callback(self, audio)
File "/home/pi/kalliope-project/kalliope/kalliope/stt/google/google.py", line 39, in google_callback
self._analyse_audio(audio_to_text=captured_audio)
File "/home/pi/kalliope-project/kalliope/kalliope/stt/google/google.py", line 57, in _analyse_audio
self.main_controller_callback(audio_to_text)
File "/home/pi/kalliope-project/kalliope/kalliope/core/ShellGui.py", line 174, in callback_stt
self.show_stt_test_menu()
File "/home/pi/kalliope-project/kalliope/kalliope/core/ShellGui.py", line 97, in show_stt_test_menu
order_listener.load_stt_plugin()
File "/home/pi/kalliope-project/kalliope/kalliope/core/OrderListener.py", line 66, in load_stt_plugin
resources_dir=stt_folder)
File "/home/pi/kalliope-project/kalliope/kalliope/core/Utils/Utils.py", line 129, in get_dynamic_class_instantiation
return klass(**parameters)
File "/home/pi/kalliope-project/kalliope/kalliope/stt/wit/wit.py", line 15, in init
SpeechRecognition.init(self)
File "/home/pi/kalliope-project/kalliope/kalliope/stt/Utils.py", line 25, in init
with self.microphone as source:
File "/usr/local/lib/python2.7/dist-packages/speech_recognition/init.py", line 141, in enter
input=True, # stream is an input stream
File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 750, in open
stream = Stream(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 441, in init
self._stream = pa.open(**arguments)
IOError: [Errno -9985] Device unavailable

then debug

kalliope start --debug
2017-01-31 22:44:20,512 :: DEBUG :: Logger ready
2017-01-31 22:44:20,513 :: DEBUG :: kalliope args: Namespace(action='start', brain_file=None, debug=True, git_url=None, run_synapse=None)
2017-01-31 22:44:20,513 :: DEBUG :: Try to load file from 1: /home/pi/kalliope-project/kalliope/brain.yml
2017-01-31 22:44:20,514 :: DEBUG :: Try to load file from 2: /etc/kalliope/brain.yml
2017-01-31 22:44:20,514 :: DEBUG :: Try to load file from 3: /usr/local/lib/python2.7/dist-packages/kalliope/brain.yml
2017-01-31 22:44:20,514 :: DEBUG :: File found in /usr/local/lib/python2.7/dist-packages/kalliope/brain.yml
2017-01-31 22:44:20,514 :: DEBUG :: File path to load: /usr/local/lib/python2.7/dist-packages/kalliope/brain.yml
2017-01-31 22:44:20,535 :: DEBUG :: File path to load: /usr/local/lib/python2.7/dist-packages/kalliope/brain.yml
2017-01-31 22:44:20,552 :: DEBUG :: Try to load file from 1: /home/pi/kalliope-project/kalliope/settings.yml
2017-01-31 22:44:20,552 :: DEBUG :: Try to load file from 2: /etc/kalliope/settings.yml
2017-01-31 22:44:20,552 :: DEBUG :: Try to load file from 3: /usr/local/lib/python2.7/dist-packages/kalliope/settings.yml
2017-01-31 22:44:20,553 :: DEBUG :: File found in /usr/local/lib/python2.7/dist-packages/kalliope/settings.yml
2017-01-31 22:44:20,553 :: DEBUG :: File path to load: /usr/local/lib/python2.7/dist-packages/kalliope/settings.yml
2017-01-31 22:44:20,642 :: DEBUG :: File path to load: /usr/local/lib/python2.7/dist-packages/kalliope/settings.yml
2017-01-31 22:44:20,722 :: DEBUG :: Default STT: google
2017-01-31 22:44:20,722 :: DEBUG :: Default TTS: pico2wave
2017-01-31 22:44:20,723 :: DEBUG :: Default Trigger name: snowboy
2017-01-31 22:44:20,723 :: DEBUG :: Try to load file from 1: /home/pi/kalliope-project/kalliope/sounds/ding.wav
2017-01-31 22:44:20,723 :: DEBUG :: Try to load file from 2: /etc/kalliope/sounds/ding.wav
2017-01-31 22:44:20,724 :: DEBUG :: Try to load file from 3: /usr/local/lib/python2.7/dist-packages/kalliope/sounds/ding.wav
2017-01-31 22:44:20,728 :: DEBUG :: File found in /usr/local/lib/python2.7/dist-packages/kalliope/sounds/ding.wav
2017-01-31 22:44:20,729 :: DEBUG :: Try to load file from 1: /home/pi/kalliope-project/kalliope/sounds/dong.wav
2017-01-31 22:44:20,729 :: DEBUG :: Try to load file from 2: /etc/kalliope/sounds/dong.wav
2017-01-31 22:44:20,729 :: DEBUG :: Try to load file from 3: /usr/local/lib/python2.7/dist-packages/kalliope/sounds/dong.wav
2017-01-31 22:44:20,730 :: DEBUG :: File found in /usr/local/lib/python2.7/dist-packages/kalliope/sounds/dong.wav
2017-01-31 22:44:20,730 :: DEBUG :: Default synapse: Default-synapse
2017-01-31 22:44:20,730 :: DEBUG :: Resource directory not found in settings
Starting event manager
Events loaded
Starting Kalliope
Press Ctrl+C for stopping
Starting REST API Listening port: 5000
2017-01-31 22:44:20,862 :: DEBUG :: Entering state: starting_trigger
2017-01-31 22:44:20,863 :: DEBUG :: TriggerLauncher: Start trigger snowboy with parameters: {'callback': <bound method MainController.trigger_callback of <kalliope.core.MainController.MainController instance at 0x75f790f8>>, 'pmdl_file': 'trigger/snowboy/resources/kalliope-FR-13samples.pmdl'}
2017-01-31 22:44:20,863 :: DEBUG :: Run plugin snowboy with parameter {'callback': <bound method MainController.trigger_callback of <kalliope.core.MainController.MainController instance at 0x75f790f8>>, 'pmdl_file': 'trigger/snowboy/resources/kalliope-FR-13samples.pmdl'}
2017-01-31 22:44:21,302 :: DEBUG :: Try to load file from 1: /home/pi/kalliope-project/kalliope/trigger/snowboy/resources/kalliope-FR-13samples.pmdl
2017-01-31 22:44:21,302 :: DEBUG :: Try to load file from 2: /etc/kalliope/trigger/snowboy/resources/kalliope-FR-13samples.pmdl
2017-01-31 22:44:21,303 :: DEBUG :: Try to load file from 3: /usr/local/lib/python2.7/dist-packages/kalliope/trigger/snowboy/resources/kalliope-FR-13samples.pmdl
2017-01-31 22:44:21,307 :: DEBUG :: File found in /usr/local/lib/python2.7/dist-packages/kalliope/trigger/snowboy/resources/kalliope-FR-13samples.pmdl
2017-01-31 22:44:22,184 :: DEBUG :: Entering state: unpausing_trigger
2017-01-31 22:44:22,185 :: DEBUG :: detecting...
2017-01-31 22:44:22,185 :: DEBUG :: Unpausing snowboy process
Waiting for trigger detection
2017-01-31 22:44:22,186 :: DEBUG :: Entering state: playing_ready_sound
2017-01-31 22:44:22,186 :: DEBUG :: Entering state: waiting_for_trigger_callback
2017-01-31 22:44:36,562 :: INFO :: Keyword 1 detected at time: 2017-01-31 22:44:36
2017-01-31 22:44:36,563 :: DEBUG :: Trigger callback called, switching to the next state
2017-01-31 22:44:36,666 :: DEBUG :: Entering state: start_order_listener
2017-01-31 22:44:36,667 :: DEBUG :: Pausing snowboy process
2017-01-31 22:44:36,687 :: DEBUG :: Run plugin Google with parameter {'callback': <bound method MainController.order_listener_callback of <kalliope.core.MainController.MainController instance at 0x75f790f8>>, 'language': 'fr-FR'}
2017-01-31 22:44:36,688 :: DEBUG :: Entering state: playing_wake_up_answer
2017-01-31 22:44:36,803 :: DEBUG :: NeuronModule called from class Say with parameters: {'message': ['Oui monsieur?', u'Je vous \xe9coute', 'Monsieur?', 'Que puis-je faire pour vous?', u"J'\xe9coute", 'Oui?']}
2017-01-31 22:44:36,840 :: DEBUG :: NeuronModule Say() called with message: ['Oui monsieur?', u'Je vous \xe9coute', 'Monsieur?', 'Que puis-je faire pour vous?', u"J'\xe9coute", 'Oui?']
2017-01-31 22:44:36,841 :: DEBUG :: message is list
2017-01-31 22:44:36,948 :: DEBUG :: tts_message to say: Je vous écoute
2017-01-31 22:44:37,449 :: DEBUG :: NeuroneModule: TTS args: Tts name: pico2wave, parameters: {'cache': True, 'language': 'fr-FR'}
2017-01-31 22:44:37,752 :: DEBUG :: Run plugin pico2wave with parameter {'cache': True, 'language': 'fr-FR'}
2017-01-31 22:44:39,509 :: DEBUG :: Class TTSModule called from module Pico2wave, cache: True, language: fr-FR, voice: default
2017-01-31 22:44:39,510 :: DEBUG :: get_path_to_store_audio return: /tmp/kalliope_tts_cache/Pico2wave/fr-FR/default/5daabf6fa1dd2a909a1367bb034b7cb3.tts
2017-01-31 22:44:39,511 :: DEBUG :: TTSModule, File not yet in cache: /tmp/kalliope_tts_cache/Pico2wave/fr-FR/default/5daabf6fa1dd2a909a1367bb034b7cb3.tts
2017-01-31 22:44:39,511 :: DEBUG :: Pico2wave command: ['/usr/bin/pico2wave', '-l=fr-FR', '-w=/tmp/kalliope_tts_cache/Pico2wave/fr-FR/default/5daabf6fa1dd2a909a1367bb034b7cb3.tts.wav', u'Je vous \xe9coute']
2017-01-31 22:44:39,680 :: DEBUG :: Mplayer cmd: ['/usr/bin/mplayer', '-slave', '-quiet', '/tmp/kalliope_tts_cache/Pico2wave/fr-FR/default/5daabf6fa1dd2a909a1367bb034b7cb3.tts']
2017-01-31 22:44:43,199 :: DEBUG :: Entering state: waiting_for_order_listener_callback
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/kalliope/core/OrderListener.py", line 50, in run
self.stt_instance = self.load_stt_plugin()
File "/usr/local/lib/python2.7/dist-packages/kalliope/core/OrderListener.py", line 66, in load_stt_plugin
resources_dir=stt_folder)
File "/usr/local/lib/python2.7/dist-packages/kalliope/core/Utils/Utils.py", line 129, in get_dynamic_class_instantiation
return klass(**parameters)
File "/usr/local/lib/python2.7/dist-packages/kalliope/stt/google/google.py", line 17, in init
SpeechRecognition.init(self)
File "/usr/local/lib/python2.7/dist-packages/kalliope/stt/Utils.py", line 25, in init
with self.microphone as source:
File "/usr/local/lib/python2.7/dist-packages/speech_recognition/init.py", line 141, in enter
input=True, # stream is an input stream
File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 750, in open
stream = Stream(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 441, in init
self._stream = pa.open(**arguments)
IOError: [Errno -9985] Device unavailable

/usr/local/lib/python2.7/dist-packages/kalliope/trigger/snow

Thanks in advance

@rodok
Copy link
Author

rodok commented Feb 1, 2017

Pico75: thanks for the detailed dump. I have the same issue and you are right, it's with STT and not TTS. The same way, I get a dump at the second try of the STT in the GUI.

@Sispheor
Copy link
Member

Sispheor commented Feb 1, 2017

Guys, can you try to add a sleep(0.3) after the line 156 of the MainController?
I still thinking that we don't let enough time to the trigger to switch to paused status. This last take 300 ms to perform its loop.
Then reinstall with the setup.py command from the installation doc.

I forgot to ask, are you both on the last release of Kalliope?

@pico75
Copy link

pico75 commented Feb 1, 2017

If found something on github about pause in maincontroler last night in order to pause a few seconds but there was to many same strings now with your line info number it will be ok
I forgot to tel that that's not a user right problem (same problem as root)
I m with raspberry download image with nothing else - test purpose to choose a voice recognition system. Yes last release of Kalliopé. See you thing night if not so tired

@rodok
Copy link
Author

rodok commented Feb 1, 2017

Sispheor: I gave a try to your modification and added the sleep(0.3) after self.trigger_instance.pause() in file /kalliope/core/MainController.py. Then did the install again with sudo python setup.py install.
And tested again... unfortunately this time the keyword "Kalliope" is not recognized at all and I never have an answer (but it does not crash).
To be sure, I restored the original setting (commented the sleep) and re-installed again. Guess what, I was back with the originial bug, after recognizing the keyword, I get the same old crash with IOError: [Errno -9985] Device unavailable.
Wondering if pico75 has better chance.

BTW, I also have the latest version that I downloaded from GIT two days ago.

@Sispheor
Copy link
Member

Sispheor commented Feb 1, 2017

Weird thing that the sleep placed here change the behavior of the trigger.
Can you come on the gitter to discuss?

@pico75
Copy link

pico75 commented Feb 1, 2017

hey rodok, i was on it. unfortunately

saying Kalliopé

then log

Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/kalliope/core/OrderListener.py", line 50, in run
self.stt_instance = self.load_stt_plugin()
File "/usr/local/lib/python2.7/dist-packages/kalliope/core/OrderListener.py", line 66, in load_stt_plugin
resources_dir=stt_folder)
File "/usr/local/lib/python2.7/dist-packages/kalliope/core/Utils/Utils.py", line 129, in get_dynamic_class_instantiation
return klass(**parameters)
File "/usr/local/lib/python2.7/dist-packages/kalliope/stt/google/google.py", line 17, in init
SpeechRecognition.init(self)
File "/usr/local/lib/python2.7/dist-packages/kalliope/stt/Utils.py", line 25, in init
with self.microphone as source:
File "/usr/local/lib/python2.7/dist-packages/speech_recognition/init.py", line 141, in enter
input=True, # stream is an input stream
File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 750, in open
stream = Stream(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 441, in init
self._stream = pa.open(**arguments)
IOError: [Errno -9985] Device unavailable

second try

Kalliopé say "YES"

then crash

2017-02-01 20:58:56,632 :: INFO :: Keyword 1 detected at time: 2017-02-01 20:58:56
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/kalliope/core/OrderListener.py", line 50, in run
self.stt_instance = self.load_stt_plugin()
File "/usr/local/lib/python2.7/dist-packages/kalliope/core/OrderListener.py", line 66, in load_stt_plugin
resources_dir=stt_folder)
File "/usr/local/lib/python2.7/dist-packages/kalliope/core/Utils/Utils.py", line 129, in get_dynamic_class_instantiation
return klass(**parameters)
File "/usr/local/lib/python2.7/dist-packages/kalliope/stt/google/google.py", line 17, in init
SpeechRecognition.init(self)
File "/usr/local/lib/python2.7/dist-packages/kalliope/stt/Utils.py", line 25, in init
with self.microphone as source:
File "/usr/local/lib/python2.7/dist-packages/speech_recognition/init.py", line 141, in enter
input=True, # stream is an input stream
File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 750, in open
stream = Stream(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 441, in init
self._stream = pa.open(**arguments)
IOError: [Errno -9985] Device unavailable

@pico75
Copy link

pico75 commented Feb 1, 2017

following our chat i will try tomorow a usb mic and not a webcam (even in changing mic level the problem persist)

@Sispheor
Copy link
Member

Sispheor commented Feb 1, 2017

Ok, we keep in touch then.

@rodok
Copy link
Author

rodok commented Feb 2, 2017

I did some more testing, this time managed to make work my installation with the sleep. But it did not make any change to the crash, which still happen the same place. I even tried to raise the sleep up to 1, whithout any improvement.

@pico75
Copy link

pico75 commented Feb 2, 2017

hi guys, sorry my Jabra UC VOICE 550a test is ko. same message problem even from the original MainController.py (setup done). Yesterday night i had re checked the doc install.

@Sispheor
Copy link
Member

Sispheor commented Feb 2, 2017

Sorry to read that guys. @LaMonF and I have tried to reproduce the problem without any success. And you both can raise it every time. It's totally weird.
I'll reinstall from scratch a new instance from the ISO we provide and test again.
Sorry for inconvenance.
If you want to test/valide the soft, I can recommend you to install it on Ubuntu 16.04 inside a VM.
This will allow you to prepare your settings and your brain during the time we find out what append.

@pico75
Copy link

pico75 commented Feb 3, 2017

Same with a new install onto raspberry 4.4.38-v7+ (jessie - image : 2016-11-25-raspbian-jessie)
install method 1 : sudo pip install kalliope
snif

@Sispheor
Copy link
Member

Hi, does the pulseaudio server is still alive?

Can you try to run the following command before testing?

pulseaudio --start

@andweber
Copy link
Contributor

could it be connected to #200?

@LaMonF
Copy link
Member

LaMonF commented Feb 15, 2017

@andweber Not the same issue. But @bacardi55 had this issue and resolv it by restarting his pulseaudio.
You can have a look here : #204

@pico75
Copy link

pico75 commented Feb 18, 2017

Hi, i will try to work on it this week end. thanks guys for your for work/return

@Sispheor
Copy link
Member

You can add this systemd service in /etc/systemd/system/pulseaudio.service to keep the service running after a reboot.
I'll add this to the manual install doc.

[Unit]
Description=PulseAudio Sound System
Before=sound.target

[Service]
BusName=org.pulseaudio.Server
ExecStart=/usr/bin/pulseaudio
Restart=always

[Install]
WantedBy=session.target

@Sispheor
Copy link
Member

Sispheor commented Mar 9, 2017

I close the issue. Don't hesitate to open it again in case of any problem.

@Sispheor
Copy link
Member

Sispheor commented May 4, 2018

For those who want to test, a patch is available #456

Sispheor pushed a commit that referenced this issue May 4, 2018
Sispheor pushed a commit that referenced this issue May 7, 2018
@zhengyutop
Copy link

You can add this systemd service in /etc/systemd/system/pulseaudio.service to keep the service running after a reboot.
I'll add this to the manual install doc.

[Unit]
Description=PulseAudio Sound System
Before=sound.target

[Service]
BusName=org.pulseaudio.Server
ExecStart=/usr/bin/pulseaudio
Restart=always

[Install]
WantedBy=session.target

大哥,我这样修改后还是错误,能再指导我一下吗

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