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 nodejs #356

Merged
merged 4 commits into from
Feb 8, 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/nodejs-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,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/nodejs-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,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: 7.6
Expand All @@ -76,6 +76,9 @@ jobs:
- machine: rpi4-64
init_performance_threshold_sec: 5.1
proc_performance_threshold_sec: 3.2
- machine: rpi5-64
init_performance_threshold_sec: 3.0
proc_performance_threshold_sec: 1.5
- machine: jetson
init_performance_threshold_sec: 5.1
proc_performance_threshold_sec: 3.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
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 binding/nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ Leopard is an on-device speech-to-text engine. Leopard 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

- Node.js 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.

## Installation

Expand Down
4 changes: 2 additions & 2 deletions binding/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@picovoice/leopard-node",
"version": "2.0.1",
"version": "2.0.2",
"description": "Picovoice Leopard Node.js binding",
"main": "dist/index.js",
"types": "dist/types/index.d.ts",
Expand Down Expand Up @@ -35,7 +35,7 @@
"bugs": {
"url": "https://github.com/Picovoice/leopard/issues"
},
"homepage": "https://picovoice.ai/products/leopard/",
"homepage": "https://picovoice.ai/platform/leopard/",
"devDependencies": {
"@types/jest": "^27.4.1",
"@types/node": "^18.11.9",
Expand Down
14 changes: 13 additions & 1 deletion binding/nodejs/src/platforms.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2022-2023 Picovoice Inc.
// Copyright 2022-2024 Picovoice Inc.
//
// You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
// file accompanying this source.
Expand Down Expand Up @@ -34,6 +34,7 @@ const ARM_CPU_64 = '-aarch64';
const ARM_CPU_CORTEX_A53 = 'cortex-a53';
const ARM_CPU_CORTEX_A57 = 'cortex-a57';
const ARM_CPU_CORTEX_A72 = 'cortex-a72';
const ARM_CPU_CORTEX_A76 = 'cortex-a76';

const SUPPORTED_NODEJS_SYSTEMS = new Set([
SYSTEM_LINUX,
Expand Down Expand Up @@ -71,6 +72,14 @@ SYSTEM_TO_LIBRARY_PATH.set(
`${SYSTEM_LINUX}/${ARM_CPU_CORTEX_A72}${ARM_CPU_64}`,
`${PLATFORM_RASPBERRY_PI}/${ARM_CPU_CORTEX_A72}${ARM_CPU_64}/pv_leopard.node`
);
SYSTEM_TO_LIBRARY_PATH.set(
`${SYSTEM_LINUX}/${ARM_CPU_CORTEX_A76}`,
`${PLATFORM_RASPBERRY_PI}/${ARM_CPU_CORTEX_A76}/pv_leopard.node`
);
SYSTEM_TO_LIBRARY_PATH.set(
`${SYSTEM_LINUX}/${ARM_CPU_CORTEX_A76}${ARM_CPU_64}`,
`${PLATFORM_RASPBERRY_PI}/${ARM_CPU_CORTEX_A76}${ARM_CPU_64}/pv_leopard.node`
);
SYSTEM_TO_LIBRARY_PATH.set(
`${SYSTEM_LINUX}/${ARM_CPU_CORTEX_A57}${ARM_CPU_64}`,
`${PLATFORM_JETSON}/${ARM_CPU_CORTEX_A57}${ARM_CPU_64}/pv_leopard.node`
Expand Down Expand Up @@ -100,6 +109,7 @@ function getLinuxPlatform(): string {
switch (cpuPart) {
case '0xd03':
case '0xd08':
case '0xd0b':
return PLATFORM_RASPBERRY_PI;
case '0xd07':
return PLATFORM_JETSON;
Expand All @@ -122,6 +132,8 @@ function getLinuxMachine(arch: string): string {
return ARM_CPU_CORTEX_A57 + archInfo;
case '0xd08':
return ARM_CPU_CORTEX_A72 + archInfo;
case '0xd0b':
return ARM_CPU_CORTEX_A76 + archInfo;
default:
throw new LeopardRuntimeError(`Unsupported CPU: '${cpuPart}'`);
}
Expand Down
2 changes: 1 addition & 1 deletion demo/nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Leopard is an on-device speech-to-text engine. Leopard 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

Expand Down
8 changes: 4 additions & 4 deletions demo/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@picovoice/leopard-node-demo",
"version": "2.0.1",
"version": "2.0.2",
"description": "Picovoice Leopard Node.js file-based and microphone demos",
"scripts": {
"file": "node file.js",
Expand All @@ -16,15 +16,15 @@
"author": "Picovoice Inc.",
"license": "Apache-2.0",
"dependencies": {
"@picovoice/leopard-node": "=2.0.1",
"@picovoice/pvrecorder-node": "=1.2.1",
"@picovoice/leopard-node": "=2.0.2",
"@picovoice/pvrecorder-node": "=1.2.2",
"commander": "^6.1.0",
"readline": "^1.3.0",
"wavefile": "^11.0.0",
"prettier": "^2.6.2"
},
"devDependencies": {},
"homepage": "https://picovoice.ai/products/leopard/",
"homepage": "https://picovoice.ai/platform/leopard/",
"repository": {
"type": "git",
"url": "https://github.com/Picovoice/leopard.git",
Expand Down
16 changes: 8 additions & 8 deletions demo/nodejs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# yarn lockfile v1


"@picovoice/leopard-node@=2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@picovoice/leopard-node/-/leopard-node-2.0.1.tgz#bd265ca9733ee7f4b7720a8f3a30d88d5ea3b510"
integrity sha512-eVHTlgE2nKBBi1t4uZgnU7jAkWTDRvwZJ2JDcw/9oQUUo3LhDjM8zLHJXL4hgKJrspEVOUi+jrj4E5XBBMfJZg==
"@picovoice/leopard-node@=2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@picovoice/leopard-node/-/leopard-node-2.0.2.tgz#537f6a8dbeefc2234e9c4c588c2dafa623ada9cf"
integrity sha512-7MFeDdKKLR+H1gyUQXX8djfKgOIQLTsRlGkxwNoXjbXyfx6lkOfYdU27+Wlyi+6dOKFW3c4DNTbCbzIzCZSyMw==

"@picovoice/pvrecorder-node@=1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@picovoice/pvrecorder-node/-/pvrecorder-node-1.2.1.tgz#8e112ecc7a4836aa4fa92d62ac7942d8a2366db8"
integrity sha512-7TtRMh04PSVn542Oq1v/MGLFuNPdUrrv+f7qbCGOWRc8y6ox+FATigdQqLRbRey4kZWf40dNHQFdVPCk5ZcXnQ==
"@picovoice/pvrecorder-node@=1.2.2":
version "1.2.2"
resolved "https://registry.yarnpkg.com/@picovoice/pvrecorder-node/-/pvrecorder-node-1.2.2.tgz#41c39719b408e29c581b3094a9ff4c59f282b026"
integrity sha512-GuzZhWslbR4TLE3VxTiqjax8Mc8f1nB69bY5jag4ETlCxo7q/KpeUbWRvojhtNVPvpFLbospZAb6vfgxkEqgJQ==

commander@^6.1.0:
version "6.2.1"
Expand Down
Loading