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

Rpi5 Various #303

Merged
merged 10 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,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
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,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/go-codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup 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 @@ -41,7 +41,7 @@ jobs:
- name: Setup 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
4 changes: 2 additions & 2 deletions .github/workflows/go-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]
go: [ '1.16', '1.17', '1.18', '1.19', '1.20', 'stable' ]
go: [ '1.16', '1.17', '1.18', '1.19', '1.20', '1.21', 'stable' ]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -56,7 +56,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/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go: [ '1.16', '1.17', '1.18', '1.19', '1.20', 'stable' ]
go: [ '1.16', '1.17', '1.18', '1.19', '1.20', '1.21', 'stable' ]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -71,7 +71,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
2 changes: 1 addition & 1 deletion .github/workflows/java-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,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
5 changes: 4 additions & 1 deletion .github/workflows/java-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
strategy:
fail-fast: false
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson]
include:
- machine: rpi3-32
init_performance_threshold_sec: 14.0
Expand All @@ -75,6 +75,9 @@ jobs:
- machine: rpi4-64
init_performance_threshold_sec: 7.8
proc_performance_threshold_sec: 5.0
- machine: rpi5-64
init_performance_threshold_sec: 7.8
proc_performance_threshold_sec: 5.0
- machine: jetson
init_performance_threshold_sec: 7.8
proc_performance_threshold_sec: 5.5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,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/rust-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,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 All @@ -83,4 +83,4 @@ jobs:

- name: Test
run: cargo run --release -- --access_key ${{secrets.PV_VALID_ACCESS_KEY}} --input_audio_path ../../../resources/audio_samples/test.wav
working-directory: demo/rust/filedemo
working-directory: demo/rust/filedemo
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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 binding/dotnet/Cheetah/Cheetah.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;netcoreapp3.0;netstandard2.0</TargetFrameworks>
<Version>2.0.0</Version>
<Version>2.0.1</Version>
<Authors>Picovoice</Authors>
<Company />
<Product>Cheetah Speech-to-Text Engine</Product>
Expand Down Expand Up @@ -117,4 +117,4 @@
<PackagePath></PackagePath>
</None>
</ItemGroup>
</Project>
</Project>
4 changes: 3 additions & 1 deletion binding/dotnet/Cheetah/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static string PvLinuxMachine()
case "0xd03": return "cortex-a53" + archInfo;
case "0xd07": return "cortex-a57" + archInfo;
case "0xd08": return "cortex-a72" + archInfo;
case "0xd0b": return "cortex-a76" + archInfo;
default:
throw new PlatformNotSupportedException($"This device (CPU part = {cpuPart}) is not supported by Picovoice.");
}
Expand All @@ -87,7 +88,8 @@ public static string PvLinuxEnv()
{
case "0xc07":
case "0xd03":
case "0xd08": return "raspberry-pi";
case "0xd08":
case "0xd0b": return "raspberry-pi";
case "0xd07": return "jetson";
default:
throw new PlatformNotSupportedException($"This device (CPU part = {cpuPart}) is not supported by Picovoice.");
Expand Down
3 changes: 2 additions & 1 deletion binding/dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is:
- Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64)
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Raspberry Pi (4, 3) and NVIDIA Jetson Nano
- Raspberry Pi (5, 4, 3) and NVIDIA Jetson Nano

## Requirements

Expand All @@ -36,6 +36,7 @@ Platforms compatible with .NET Core 3.0+:
- Raspberry Pi:
- 3 (32 and 64 bit)
- 4 (32 and 64 bit)
- 5 (32 and 64 bit)
- NVIDIA Jetson Nano

Platform compatible with .NET 6.0+:
Expand Down
4 changes: 2 additions & 2 deletions binding/go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is:
- Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64)
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Raspberry Pi (4, 3) and NVIDIA Jetson Nano
- Raspberry Pi (5, 4, 3) and NVIDIA Jetson Nano

## Compatibility

- go 1.16+
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (4, 3), and NVIDIA Jetson Nano.
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (5, 4, 3), and NVIDIA Jetson Nano.
- **Windows**: The Go binding requires `cgo`, which means that you need to install a gcc compiler like [Mingw](http://mingw-w64.org/) to build it properly.
- Go versions less than `1.20` requires `gcc` version `11` or lower.

Expand Down
2 changes: 2 additions & 0 deletions binding/go/cheetah.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ func getLinuxDetails() (string, string) {
return "jetson", "cortex-a57" + archInfo
case "0xd08":
return "raspberry-pi", "cortex-a72" + archInfo
case "0xd0b":
return "raspberry-pi", "cortex-a76" + archInfo
default:
log.Fatalf("Unsupported CPU:\n%s", cpuPart)
return "", ""
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion binding/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Cheetah is an on-device speech-to-text engine. Cheetah is:
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Raspberry Pi (4, 3) and NVIDIA Jetson Nano
- Raspberry Pi (5, 4, 3) and NVIDIA Jetson Nano

## Compatibility

Expand Down
6 changes: 4 additions & 2 deletions binding/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

ext {
PUBLISH_GROUP_ID = 'ai.picovoice'
PUBLISH_VERSION = '2.0.0'
PUBLISH_VERSION = '2.0.1'
PUBLISH_ARTIFACT_ID = 'cheetah-java'
}

Expand Down Expand Up @@ -57,7 +57,9 @@ task copyRPILib(type: Copy) {
include('cortex-a53/libpv_cheetah_jni.so',
'cortex-a53-aarch64/libpv_cheetah_jni.so',
'cortex-a72/libpv_cheetah_jni.so',
'cortex-a72-aarch64/libpv_cheetah_jni.so')
'cortex-a72-aarch64/libpv_cheetah_jni.so',
'cortex-a76/libpv_cheetah_jni.so',
'cortex-a76-aarch64/libpv_cheetah_jni.so')
into("${outputDir}/cheetah/lib/java/raspberry-pi/")
}
task copyJetsonLib(type: Copy) {
Expand Down
3 changes: 3 additions & 0 deletions binding/java/src/ai/picovoice/cheetah/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public static String getEnvironmentName() throws RuntimeException {
switch (cpuPart) {
case "0xd03":
case "0xd08":
case "0xd0b":
return "raspberry-pi";
case "0xd07":
return "jetson";
Expand Down Expand Up @@ -179,6 +180,8 @@ private static String getArchitecture() throws RuntimeException {
return "cortex-a57" + archInfo;
case "0xd08":
return "cortex-a72" + archInfo;
case "0xd0b":
return "cortex-a76" + archInfo;
default:
throw new RuntimeException(
String.format(
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_cheetah"
version = "2.0.0"
version = "2.0.2"
edition = "2018"
description = "The Rust bindings for Picovoice's Cheetah library"
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions binding/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is:
- Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64)
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Raspberry Pi (4, 3) and NVIDIA Jetson Nano
- Raspberry Pi (5, 4, 3) and NVIDIA Jetson Nano

## Compatibility

- Rust 1.54+
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (4, 3), and NVIDIA Jetson Nano.
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (5, 4, 3), and NVIDIA Jetson Nano.

## Installation

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",
_ => "unsupported",
};

Expand Down Expand Up @@ -72,7 +73,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; 2] = ["cortex-a53", "cortex-a72"];
const RPI_MACHINES: [&str; 3] = ["cortex-a53", "cortex-a72", "cortex-a76"];
const JETSON_MACHINES: [&str; 1] = ["cortex-a57"];

let machine = find_machine_type();
Expand Down
4 changes: 2 additions & 2 deletions demo/dotnet/CheetahDemo/CheetahDemo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Picovoice.Cheetah" Version="2.0.0" />
<PackageReference Include="PvRecorder" Version="1.2.4" />
<PackageReference Include="Picovoice.Cheetah" Version="2.0.1" />
<PackageReference Include="PvRecorder" Version="1.2.5" />
</ItemGroup>
</Project>
11 changes: 6 additions & 5 deletions demo/dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is:
- Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64)
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Raspberry Pi (4, 3) and NVIDIA Jetson Nano
- Raspberry Pi (5, 4, 3) and NVIDIA Jetson Nano

## Requirements

Expand All @@ -27,6 +27,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is:
- Raspberry Pi:
- 3 (32 and 64 bit)
- 4 (32 and 64 bit)
- 5 (32 and 64 bit)
- NVIDIA Jetson Nano

## Installation
Expand Down Expand Up @@ -59,7 +60,7 @@ Cheetah/demo/dotnet/CheetahDemo
Run the following in the terminal:

```console
dotnet run -c FileDemo.Release -- \
dotnet run -c FileDemo.Release -- \
--input_audio_path ${AUDIO_PATH} \
--access_key ${ACCESS_KEY} \
```
Expand Down Expand Up @@ -87,13 +88,13 @@ It provides information about various audio input devices on the box. This is an
```
index: 0, device name: USB Audio Device
index: 1, device name: MacBook Air Microphone
```
```

You can use the device index to specify which microphone to use for the demo. For instance, if you want to use the USB Audio Device
You can use the device index to specify which microphone to use for the demo. For instance, if you want to use the USB Audio Device
in the above example, you can invoke the demo application as below:

```console
dotnet run -c MicDemo.Release -- \
--access_key ${ACCESS_KEY} \
--audio_device_index 0
```
```
4 changes: 2 additions & 2 deletions demo/go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module cheetahdemo
go 1.16

require (
github.com/Picovoice/cheetah/binding/go/v2 v2.0.0
github.com/Picovoice/pvrecorder/binding/go v1.2.1
github.com/Picovoice/cheetah/binding/go/v2 v2.0.1
github.com/Picovoice/pvrecorder/binding/go v1.2.2
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/go-audio/audio v1.0.0
github.com/go-audio/wav v1.0.0
Expand Down
8 changes: 4 additions & 4 deletions demo/go/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/Picovoice/cheetah/binding/go/v2 v2.0.0 h1:BiMaqxjeQetR0cF8rhX+gTq7kMMZroE7aBZVvfpx2Ns=
github.com/Picovoice/cheetah/binding/go/v2 v2.0.0/go.mod h1:BKQPVuV+8xxEBLuCdwTxgj4bVsUTiuQg4YJ7oJt9uh4=
github.com/Picovoice/pvrecorder/binding/go v1.2.1 h1:p99fkYMFbTS4g4WwbhSPkT9PHvlEoVYGaNoqxCITiEo=
github.com/Picovoice/pvrecorder/binding/go v1.2.1/go.mod h1:gQdvBAjoKmRxMFh8W9cVKWcqHsWvu+d13sCPVFm7dhg=
github.com/Picovoice/cheetah/binding/go/v2 v2.0.1 h1:HNykHdTfuwFj8mSfkoVpboeECTI4Uwy9sEe6kSj+G04=
github.com/Picovoice/cheetah/binding/go/v2 v2.0.1/go.mod h1:BKQPVuV+8xxEBLuCdwTxgj4bVsUTiuQg4YJ7oJt9uh4=
github.com/Picovoice/pvrecorder/binding/go v1.2.2 h1:UN0u60hVR+s8kYmVSITS4UbTihHzeNxlNkJKYoKaVbo=
github.com/Picovoice/pvrecorder/binding/go v1.2.2/go.mod h1:gQdvBAjoKmRxMFh8W9cVKWcqHsWvu+d13sCPVFm7dhg=
github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
Expand Down
4 changes: 2 additions & 2 deletions demo/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is:
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Raspberry Pi (4, 3) and NVIDIA Jetson Nano
- Raspberry Pi (5, 4, 3) and NVIDIA Jetson Nano

## Compatibility

- Java 11+
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (4, 3), and NVIDIA Jetson Nano.
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (5, 4, 3), and NVIDIA Jetson Nano.

## Installation

Expand Down
Loading
Loading