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

Complete Raspberry Pi 5 Support #721

Closed
EthanOscarson opened this issue Nov 1, 2023 · 9 comments
Closed

Complete Raspberry Pi 5 Support #721

EthanOscarson opened this issue Nov 1, 2023 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@EthanOscarson
Copy link

Hey there,

I already opened an issue on the cobra model, but I just want to request widespread Picovoice SDK support for the Raspberry Pi 5. This has enormous performance boosts from previous models, so I think picovoice would be a great fit for the Raspberry pi 5.

If there's anything I can do to help, I'm a hobby web and embedded developer.

Thanks!

@EthanOscarson EthanOscarson added the enhancement New feature or request label Nov 1, 2023
@ErisMik ErisMik self-assigned this Nov 1, 2023
@ErisMik
Copy link
Contributor

ErisMik commented Nov 1, 2023

In that case I am going to close the cheetah issue and keep this one up to track support across SDKs.

@NFMi
Copy link

NFMi commented Dec 8, 2023

Hi,
I am using porcupine in a script on my Raspberry Pi 5 (it worked on my Pi 3B), this is the Error, that I am getting:

$ python main.py
Traceback (most recent call last):
  File "main.py", line 4, in <module>
    import pvporcupine
  File "[...]/site-packages/pvporcupine/__init__.py", line 12, in <module>
    from ._factory import *
  File "[...]/site-packages/pvporcupine/_factory.py", line 15, in <module>
    from ._util import *
  File "[...]/site-packages/pvporcupine/_util.py", line 76, in <module>
    _PV_SYSTEM, _PV_MACHINE = _pv_platform()
  File "[...]/site-packages/pvporcupine/_util.py", line 69, in _pv_platform
    pv_machine = _pv_linux_machine(platform.machine())
  File "[...]/site-packages/pvporcupine/_util.py", line 60, in _pv_linux_machine
    raise NotImplementedError("Unsupported CPU: '%s'." % cpu_part)
NotImplementedError: Unsupported CPU: '0xd0b'.

Since I only have this issue on the Pi 5, and it has to do with the CPU, I assume it belongs here.

@VityaSchel
Copy link

I'm using Node.js and considering buying rpi5, but if porcupine does not work on-device on it, should I buy rpi4?

@xring
Copy link

xring commented Dec 25, 2023

Got this on Raspberry Pi 5 with Rust:

WARNING: Please be advised that this device is not officially supported by Picovoice.
Falling back to the armv6-based (Raspberry Pi Zero) library. This is not tested nor optimal.
For the model, use Raspberry Pi's models
thread 'main' panicked at src/xxx.rs:18:10:
Failed to create Porcupine: PorcupineError { status: LibraryLoadError, message: "Failed to load porcupine dynamic library: /home/xring/xxx/target/debug/build/pv_porcupine-7d5bbb0cb2374f95/out/lib/raspberry-pi/arm11/libpv_porcupine.so: wrong ELF class: ELFCLASS32", message_stack: [] }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@xring
Copy link

xring commented Dec 27, 2023

@VityaSchel
I have some Rust codes rely on Porcupine Wake Word SDK and Cobra VAD SDK, which could not work on Raspberry Pi 5 but can work on Raspberry Pi 4.

@VityaSchel
Copy link

@VityaSchel
I have some Rust codes rely on Porcupine Wake Word SDK and Cobra VAD SDK, which could not work on Raspberry Pi 5 but can work on Raspberry Pi 4.

Just wanted to clarify – are you referring to your own code that could not work on raspberry pi 5's hardware or picovoice ai code/libraries meaning their whole ecosystem is not yet available for 5th model?

@xring
Copy link

xring commented Dec 27, 2023

@VityaSchel
I have some Rust codes rely on Porcupine Wake Word SDK and Cobra VAD SDK, which could not work on Raspberry Pi 5 but can work on Raspberry Pi 4.

Just wanted to clarify – are you referring to your own code that could not work on raspberry pi 5's hardware or picovoice ai code/libraries meaning their whole ecosystem is not yet available for 5th model?

same code rely on these two libs not work on Pi 5 but work on Pi 4.
I think picovoice ai code/libraries not yet available for Pi 5.

@XenioxYT
Copy link

I've been following the ongoing discussion about adding support for the Raspberry Pi 5 in the Picovoice SDK, particularly in the Porcupine module (Issue #721). I encountered the same NotImplementedError for the CPU '0xd0b' on my Raspberry Pi 5, as reported by other users.

To temporarily address this, I modified ./pvporcupine/_util.py to include support for this CPU identifier. Here are the changes I made:

# in ./pvporcupine/_util.py:
if '0xb76' == cpu_part:
    return 'arm11' + arch_info
elif '0xc07' == cpu_part:
    return 'cortex-a7' + arch_info
elif '0xd03' == cpu_part:
    return 'cortex-a53' + arch_info
elif '0xd07' == cpu_part:
    return 'cortex-a57' + arch_info
elif '0xd08' == cpu_part:
    return 'cortex-a72' + arch_info
elif '0xc08' == cpu_part:
    return 'beaglebone' + arch_info

# Added lines for Raspberry Pi 5 support
elif '0xd0b' == cpu_part:
    return 'cortex-a72' + arch_info

This change successfully resolved the issue on my Raspberry Pi 5. While I understand that this is just a temporary fix and not an official solution, I thought it might be helpful for others encountering the same problem and for the developers working on comprehensive support for the Raspberry Pi 5.

@ErisMik
Copy link
Contributor

ErisMik commented Feb 2, 2024

Hi all, writing here to let you know that official Raspberry Pi 5 support is live for the following SDKs! Make sure to update to the latest package versions 🚀

Support for remaining SDKs will be coming shortly.

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

6 participants