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

Issues using PV on Pi 5 #199

Closed
tmart42 opened this issue Dec 10, 2023 · 3 comments
Closed

Issues using PV on Pi 5 #199

tmart42 opened this issue Dec 10, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@tmart42
Copy link

tmart42 commented Dec 10, 2023

I am attempting to utilize the package in order to create a DaVinci voice assistant using a Raspberry Pi 5. I am getting the following error when trying to start DaVinci. I posted on their issues section as well, but I see that the issue is with pvcobra specifically, so I came here.

The error:

Traceback (most recent call last):
File "/home/ty/DaVinci/DaVinci.py", line 8, in
import pvcobra
File "/home/ty/.local/lib/python3.11/site-packages/pvcobra/init.py", line 12, in
from ._factory import *
File "/home/ty/.local/lib/python3.11/site-packages/pvcobra/_factory.py", line 15, in
from ._util import *
File "/home/ty/.local/lib/python3.11/site-packages/pvcobra/_util.py", line 64, in
_PV_SYSTEM, _PV_MACHINE = _pv_platform()
^^^^^^^^^^^^^^
File "/home/ty/.local/lib/python3.11/site-packages/pvcobra/_util.py", line 57, in _pv_platform
pv_machine = _pv_linux_machine(platform.machine())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ty/.local/lib/python3.11/site-packages/pvcobra/_util.py", line 48, in _pv_linux_machine
raise NotImplementedError('Unsupported CPU.\n%s' % cpu_info)
NotImplementedError: Unsupported CPU.
processor : 0
BogoMIPS : 108.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0b
CPU revision : 1

processor : 1
BogoMIPS : 108.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0b
CPU revision : 1

processor : 2
BogoMIPS : 108.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0b
CPU revision : 1

processor : 3
BogoMIPS : 108.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0b
CPU revision : 1

Revision : d04170
Serial : 28a0b219c4dec773
Model : Raspberry Pi 5 Model B Rev 1.0

@kenarsa kenarsa added the enhancement New feature or request label Dec 11, 2023
@kenarsa kenarsa self-assigned this Dec 11, 2023
@kenarsa
Copy link
Member

kenarsa commented Dec 11, 2023

Cobra doesn't support RPI5 currently. We are planning to add RPI5 support early next year. I keep this issue open till then.

@NickelKang
Copy link

NickelKang commented Jan 12, 2024

As a temporary solution... I have found that adding the following lines in the CPU sections of the below python package files allows PicoVoice to function as normal. I only tested this on python3.11 and Raspi 64-bit Bookworm. Use at your own risk of course...

pvcobra

Adding:
elif '0xd0b' == cpu_part:
return 'cortex-a72' + arch_info
In:
/venv/lib/python3.11/site-packages/pvcobra/_util.py

pvleopard

Adding:
elif '0xd0b' == cpu_part:
return 'cortex-a72' + arch_info
In:
/venv/lib/python3.11/site-packages/pvleopard/_util.py

pvporcupine

Adding:
elif '0xd0b' == cpu_part:
return 'cortex-a72' + arch_info
In:
/venv/lib/python3.11/site-packages/pvporcupine/_util.py

pvrecorder

Adding:
"0xd0b") kernel="raspberry-pi" arch="cortex-a72"$arch_info ;;
In:
/venv/lib/python3.11/site-packages/pvrecorder/resources/scripts/platform.sh

@ErisMik
Copy link
Contributor

ErisMik commented Feb 2, 2024

As mentioned in Picovoice/picovoice#721 Cobra now officially supports Raspberry Pi 5! Be sure to update to the latest package versions.

@ErisMik ErisMik closed this as completed Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants