Closed yuzhiguo07 closed 6 years ago
pocketsphinx is already installed on respeaker by default. You don't have to re-install it. pocketsphinx needs to be cross-compiled.
ok, but when I run a test file, the system told me that there is an USBError.
Usage: madplay [OPTIONS] FILE [...] Try `madplay --help' for more information. Exception in thread Thread-1: 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/lib/python2.7/site-packages/respeaker/usb_hid/pyusb_backend.py", line 64, in rx_task self.rcv_data.append(self.ep_in.read(self.ep_in.wMaxPacketSize, -1)) File "/usr/lib/python2.7/site-packages/usb/core.py", line 402, in read return self.device.read(self, size_or_buffer, timeout) File "/usr/lib/python2.7/site-packages/usb/core.py", line 975, in read intf, ep = self._ctx.setup_request(self, endpoint) File "/usr/lib/python2.7/site-packages/usb/core.py", line 102, in wrapper return f(self, *args, *kwargs) File "/usr/lib/python2.7/site-packages/usb/core.py", line 216, in setup_request self.managed_claim_interface(device, intf) File "/usr/lib/python2.7/site-packages/usb/core.py", line 102, in wrapper return f(self, args, kwargs) File "/usr/lib/python2.7/site-packages/usb/core.py", line 167, in managed_claim_interface self.backend.claim_interface(self.handle, i) File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 818, in claim_interface _check(self.lib.libusb_claim_interface(dev_handle.handle, intf)) File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 602, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) USBError: [Errno 16] Resource busy
Exception in thread Thread-2: 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 "test.py", line 13, in task mic = Microphone(quit_event=quit_event)* File "/usr/lib/python2.7/site-packages/respeaker/microphone.py", line 67, in init pixel_ring.set_color(rgb=0x400000) File "/usr/lib/python2.7/site-packages/respeaker/pixel_ring.py", line 19, in set_color self.write(0, [self.mono_mode, rgb & 0xFF, (rgb >> 8) & 0xFF, (rgb >> 16) & 0xFF]) File "/usr/lib/python2.7/site-packages/respeaker/pixel_ring.py", line 58, in write self.hid.write(packet) File "/usr/lib/python2.7/site-packages/respeaker/usb_hid/pyusb_backend.py", line 162, in write self.dev.ctrl_transfer(bmRequestType, bmRequest, wValue, wIndex, data) File "/usr/lib/python2.7/site-packages/usb/core.py", line 1034, in ctrl_transfer self._ctx.managed_claim_interface(self, interface_number) File "/usr/lib/python2.7/site-packages/usb/core.py", line 102, in wrapper return f(self, args, **kwargs) File "/usr/lib/python2.7/site-packages/usb/core.py", line 167, in managed_claim_interface self.backend.claim_interface(self.handle, i) File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 818, in claim_interface _check(self.lib.libusb_claim_interface(dev_handle.handle, intf)) File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 602, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) USBError: [Errno 16] Resource busy
It's likely that the device have been used by other program. Try /etc/init.d/mopidy disable && /etc/init.d/mopidy stop
jaehoon@jaehoon-UP:~/Workspace/ReSpeaker/respeaker_python_library$ ls examples README.md requirements.txt setup.cfg LICENSE README.rst respeaker setup.py jaehoon@jaehoon-UP:~/Workspace/ReSpeaker/respeaker_python_library$ sudo pip install pocketsphinx webrtcvad ...... ...... c deps/sphinxbase/src/libsphinxad/ad_pulse.c -o build/temp.linux-x86_64-2.7/deps/sphinxbase/src/libsphinxad/ad_pulse.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation deps/sphinxbase/src/libsphinxad/ad_pulse.c:44:30: fatal error: pulse/pulseaudio.h: No such file or directory compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-6_CqQU/pocketsphinx/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-eiU69x-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-6_CqQU/pocketsphinx
When I use pip to install pocketsphinx, the system always report an error:"MemoryError". I tried to add "--no-cache-dir " behind "pip install pocketsphinx", but it also killed.
root@ReSpeaker:~# pip install pocketsphinx --no-cache-dir Collecting pocketsphinx Downloading pocketsphinx-0.1.3.zip (29.3MB) 100% |################################| 29.3MB 191kB/s Killed
Is this an issue about running out of memory? How could I solve this problem