Picovoice / porcupine

On-device wake word detection powered by deep learning
https://picovoice.ai/
Apache License 2.0
3.68k stars 496 forks source link

Pi4 Ubuntu 20.04 vanilla pip3 pvporcupine install #273

Closed StuartIanNaylor closed 4 years ago

StuartIanNaylor commented 4 years ago
ubuntu@ubuntu:~/porcupine/demo/python$ pvporcupine_mic --keywords picovoice
Traceback (most recent call last):
  File "/usr/local/bin/pvporcupine_mic", line 5, in <module>
    from pvporcupine.demo.python.porcupine_demo_mic import main
  File "/usr/local/lib/python3.8/dist-packages/pvporcupine/__init__.py", line 2, in <module>
    from .resources.util.python import *
  File "/usr/local/lib/python3.8/dist-packages/pvporcupine/resources/util/python/__init__.py", line 1, in <module>
    from .util import KEYWORDS
  File "/usr/local/lib/python3.8/dist-packages/pvporcupine/resources/util/python/util.py", line 43, in <module>
    _PV_SYSTEM, _PV_MACHINE = _pv_platform()
  File "/usr/local/lib/python3.8/dist-packages/pvporcupine/resources/util/python/util.py", line 36, in _pv_platform
    pv_machine = _pv_linux_machine(platform.machine())
  File "/usr/local/lib/python3.8/dist-packages/pvporcupine/resources/util/python/util.py", line 13, in _pv_linux_machine
    model_info = [x for x in cpu_info.split('\n') if 'model name' in x][0]
IndexError: list index out of range
kenarsa commented 4 years ago

can you run this "cat /proc/cpuinfo" from terminal and paste the result here?

StuartIanNaylor commented 4 years ago
ubuntu@ubuntu:~$ cat /proc/cpuinfo
processor       : 0
BogoMIPS        : 108.00
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 1
BogoMIPS        : 108.00
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 2
BogoMIPS        : 108.00
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 3
BogoMIPS        : 108.00
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

Hardware        : BCM2835
Revision        : b03111
Serial          : 10000000c6e9e69d
Model           : Raspberry Pi 4 Model B Rev 1.1
kenarsa commented 4 years ago

it seems like the new ubuntu changed the output and our logic for picking the CPU type doesn't work on this specific version of ubuntu. this is something we can look at for subsequent release.

for now, you have two options (1) clone repo directly (2) use an older version of ubuntu or use a raspbian

StuartIanNaylor commented 4 years ago

I will use Raspbian for now, the 64bit Ubuntu is likely to be of much interest as with the Pi4 it actually has some substantial performance gains. So clone compile and it should work? Or clone compile and hack a little and it should work? There is also a RK3308 RockpiS board that is of much interest to me but images seem to be Aarch64 but there is a Debian version 64bit version that I might try as an alternative to Ubuntu.

kenarsa commented 4 years ago

clone and follow the instructions here: https://github.com/Picovoice/porcupine#repository

kenarsa commented 4 years ago

We clarified that the PIP works on Raspberry Pi running Raspbian in v1.8. For other OSes on RPI the repo method probably will be the robust way to go.