Skip to content

Commit

Permalink
Raspberry Pi 5 Support (#94)
Browse files Browse the repository at this point in the history
* Initial Raspberry PI 5 support

* Mac libs

* Windows libs

* RPI5 libs

* Node libs

* Actions update

* Update Python package and Demo

* Update Rust package and Demo

* Update Node package and Demo

* Update Dotnet package and demo

* Update Go package and demo

* Update go demo

* Update C demo

* Fix C demo action

* Fix C build action

* Update supported go versions

* Add mingw to GO
  • Loading branch information
ErisMik authored Jan 30, 2024
1 parent 643f838 commit 7179b3d
Show file tree
Hide file tree
Showing 60 changed files with 100 additions and 50 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/c-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
runs-on: ${{ matrix.machine }}
strategy:
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone]
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone]
include:
- machine: rpi2
pv_recorder_platform: raspberry-pi2
Expand All @@ -65,6 +65,8 @@ jobs:
pv_recorder_platform: raspberry-pi4
- machine: rpi4-64
pv_recorder_platform: raspberry-pi4-64
- machine: rpi5-64
pv_recorder_platform: raspberry-pi5-64
- machine: jetson
pv_recorder_platform: jetson-nano
- machine: beaglebone
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
runs-on: ${{ matrix.machine }}
strategy:
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone]
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone]
include:
- machine: rpi2
pv_recorder_platform: raspberry-pi2
Expand All @@ -64,6 +64,9 @@ jobs:
- machine: rpi4-64
pv_recorder_platform: raspberry-pi4-64
output_dir: raspberry-pi/cortex-a72-aarch64
- machine: rpi5-64
pv_recorder_platform: raspberry-pi5-64
output_dir: raspberry-pi/cortex-a76-aarch64
- machine: jetson
pv_recorder_platform: jetson-nano
output_dir: jetson/cortex-a57-aarch64
Expand Down Expand Up @@ -153,4 +156,4 @@ jobs:
with:
name: all-libs
path: all-libs
retention-days: 3
retention-days: 3
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

strategy:
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone]
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:

strategy:
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone, pv-windows]
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone, pv-windows]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go-codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: 1.21

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: 1.21

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/go-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,19 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go: [ '1.16', '1.17', '1.18' ]
go: [ '1.16', '1.17', '1.18', '1.19', '1.20', '1.21', 'stable' ]

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Mingw
uses: egor-tensin/setup-mingw@v2
if: ${{ (matrix.os == 'windows-latest') && (matrix.go != 'stable') && (matrix.go < 1.20) }}
with:
version: 11.2.0

- name: Setup go
uses: actions/setup-go@v4
with:
Expand All @@ -52,7 +58,7 @@ jobs:

strategy:
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone, pv-windows]
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone, pv-windows]

steps:
- uses: actions/checkout@v3
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
go: [ '1.16', '1.17', '1.18' ]
go: [ '1.16', '1.17', '1.18', '1.19', '1.20', '1.21', 'stable' ]

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Mingw
uses: egor-tensin/setup-mingw@v2
if: ${{ (matrix.os == 'windows-latest') && (matrix.go != 'stable') && (matrix.go < 1.20) }}
with:
version: 11.2.0

- name: Setup go
uses: actions/setup-go@v4
with:
Expand All @@ -67,7 +73,7 @@ jobs:

strategy:
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone, pv-windows]
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone, pv-windows]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nodejs-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -52,7 +52,7 @@ jobs:

strategy:
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone, pv-windows]
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone, pv-windows]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:

strategy:
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone, pv-windows]
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone, pv-windows]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'

- name: Install dependencies
run: pip install flake8 pep8-naming
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
Expand All @@ -50,7 +50,7 @@ jobs:

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
Expand All @@ -58,7 +58,7 @@ jobs:

strategy:
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone, pv-windows]
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone, pv-windows]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, beaglebone, jetson]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, beaglebone, jetson]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:

strategy:
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone, pv-windows]
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone, pv-windows]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Install CSpell
run: npm install -g cspell
Expand Down
2 changes: 1 addition & 1 deletion binding/dotnet/PvRecorder/PvRecorder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net6.0;netcoreapp3.0;netstandard2.0</TargetFrameworks>
<Version>1.2.4</Version>
<Version>1.2.5</Version>
<Authors>Picovoice</Authors>
<Company />
<Product>PvRecorder</Product>
Expand Down
1 change: 1 addition & 0 deletions binding/dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Platforms compatible with .NET Core 3.0+:
- 2
- 3 (32 and 64 bit)
- 4 (32 and 64 bit)
- 5 (32 and 64 bit)
- NVIDIA Jetson Nano
- BeagleBone

Expand Down
Binary file modified binding/go/embedded/lib/linux/x86_64/libpv_recorder.so
Binary file not shown.
Binary file modified binding/go/embedded/lib/mac/arm64/libpv_recorder.dylib
Binary file not shown.
Binary file modified binding/go/embedded/lib/mac/x86_64/libpv_recorder.dylib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified binding/go/embedded/lib/windows/amd64/libpv_recorder.dll
Binary file not shown.
3 changes: 2 additions & 1 deletion binding/go/embedded/scripts/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ case $kernel in
"0xd03") kernel="raspberry-pi" arch="cortex-a53"$arch_info ;;
"0xd07") kernel="jetson" arch="cortex-a57"$arch_info ;;
"0xd08") kernel="raspberry-pi" arch="cortex-a72"$arch_info ;;
"0xd0b") kernel="raspberry-pi" arch="cortex-a76"$arch_info ;;
"0xc08") kernel="beaglebone" arch=$arch_info ;;
*) exit 1;;
esac
Expand All @@ -41,4 +42,4 @@ case $kernel in
esac

echo -n "$kernel $arch"
exit 0
exit 0
2 changes: 1 addition & 1 deletion binding/nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PvRecorder is an easy-to-use, cross-platform audio recorder designed for real-ti
## Compatibility

- Node.js 14+
- Runs on Linux (x86_64), macOS (x86_64 and arm64), Windows (x86_64), Raspberry Pi (2, 3, 4), NVIDIA Jetson (Nano), and BeagleBone.
- Runs on Linux (x86_64), macOS (x86_64 and arm64), Windows (x86_64), Raspberry Pi (2, 3, 4, 5), NVIDIA Jetson (Nano), and BeagleBone.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion binding/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@picovoice/pvrecorder-node",
"version": "1.2.1",
"version": "1.2.2",
"description": "Audio recorder sdk for Nodejs.",
"main": "dist/index.js",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion binding/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

setuptools.setup(
name="pvrecorder",
version="1.2.1",
version="1.2.2",
author="Picovoice",
author_email="[email protected]",
description="Recorder library for Picovoice.",
Expand Down
2 changes: 1 addition & 1 deletion binding/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pv_recorder"
version = "1.2.1"
version = "1.2.2"
edition = "2018"
description = "Rust recorder library for Picovoice"
license = "Apache-2.0"
Expand Down
1 change: 1 addition & 0 deletions binding/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ PvRecorder is an easy-to-use, cross-platform audio recorder designed for real-ti
- 2
- 3 (32 and 64 bit)
- 4 (32 and 64 bit)
- 5 (32 and 64 bit)
- NVIDIA Jetson Nano
- BeagleBone

Expand Down
3 changes: 2 additions & 1 deletion binding/rust/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ fn find_machine_type() -> String {
"0xd03" => "cortex-a53",
"0xd07" => "cortex-a57",
"0xd08" => "cortex-a72",
"0xd0b" => "cortex-a76",
"0xc08" => "beaglebone",
_ => "unsupported",
};
Expand Down Expand Up @@ -73,7 +74,7 @@ fn base_library_path() -> PathBuf {

#[cfg(all(target_os = "linux", any(target_arch = "arm", target_arch = "aarch64")))]
fn base_library_path() -> PathBuf {
const RPI_MACHINES: [&str; 4] = ["arm11", "cortex-a7", "cortex-a53", "cortex-a72"];
const RPI_MACHINES: [&str; 5] = ["arm11", "cortex-a7", "cortex-a53", "cortex-a72", "cortex-a76"];
const JETSON_MACHINES: [&str; 1] = ["cortex-a57"];

let machine = find_machine_type();
Expand Down
8 changes: 6 additions & 2 deletions demo/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(NOT PV_RECORDER_PLATFORM)
message(FATAL_ERROR "No `PV_RECORDER_PLATFORM` value was given. Valid platforms are: \n"
"linux, mac-arm64, mac-x86_64, windows, raspberry-pi, raspberry-pi2, "
"raspberry-pi3-32, raspberry-pi3-64, raspberry-pi4-32, raspberry-pi4-64, "
"jetson-nano, beaglebone")
"raspberry-pi5-32, raspberry-pi5-64, jetson-nano, beaglebone")
endif()

if (${PV_RECORDER_PLATFORM} STREQUAL "beaglebone")
Expand All @@ -30,6 +30,10 @@ elseif (${PV_RECORDER_PLATFORM} STREQUAL "raspberry-pi4")
set(PV_RECORDER_LIB_DIR ${CMAKE_SOURCE_DIR}/../../lib/raspberry-pi/cortex-a72)
elseif (${PV_RECORDER_PLATFORM} STREQUAL "raspberry-pi4-64")
set(PV_RECORDER_LIB_DIR ${CMAKE_SOURCE_DIR}/../../lib/raspberry-pi/cortex-a72-aarch64)
elseif (${PV_RECORDER_PLATFORM} STREQUAL "raspberry-pi5")
set(PV_RECORDER_LIB_DIR ${CMAKE_SOURCE_DIR}/../../lib/raspberry-pi/cortex-a76)
elseif (${PV_RECORDER_PLATFORM} STREQUAL "raspberry-pi5-64")
set(PV_RECORDER_LIB_DIR ${CMAKE_SOURCE_DIR}/../../lib/raspberry-pi/cortex-a76-aarch64)
elseif (${PV_RECORDER_PLATFORM} STREQUAL "windows")
set(PV_RECORDER_LIB_DIR ${CMAKE_SOURCE_DIR}/../../lib/windows/amd64)
else ()
Expand All @@ -44,4 +48,4 @@ target_link_libraries(pv_recorder_demo pv_recorder)
add_custom_command(TARGET pv_recorder_demo
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PV_RECORDER_LIB_DIR} ${CMAKE_BINARY_DIR}
)
)
2 changes: 1 addition & 1 deletion demo/c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PvRecorder is an easy-to-use, cross-platform audio recorder designed for real-ti
- Linux (x86_64)
- macOS (x86_64, arm64)
- Windows (amd64)
- Raspberry Pi (Zero, 2, 3 and 4)
- Raspberry Pi (Zero, 2, 3, 4 and 5)
- NVIDIA Jetson Nano
- BeagleBone

Expand Down
2 changes: 1 addition & 1 deletion demo/dotnet/PvRecorderDemo/PvRecorderDemo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="PvRecorder" Version="1.2.4" />
<PackageReference Include="PvRecorder" Version="1.2.5" />
</ItemGroup>

</Project>
Loading

0 comments on commit 7179b3d

Please sign in to comment.