diff --git a/.github/workflows/nodejs-codestyle.yml b/.github/workflows/nodejs-codestyle.yml index 5c7520a7..1c3d08e3 100644 --- a/.github/workflows/nodejs-codestyle.yml +++ b/.github/workflows/nodejs-codestyle.yml @@ -27,9 +27,6 @@ jobs: with: node-version: lts/* - - name: Pre-build dependencies - run: npm install yarn - - name: Run Binding Linter run: yarn && yarn lint working-directory: binding/nodejs diff --git a/.github/workflows/nodejs-demos.yml b/.github/workflows/nodejs-demos.yml index 8067022c..9a646bc8 100644 --- a/.github/workflows/nodejs-demos.yml +++ b/.github/workflows/nodejs-demos.yml @@ -46,9 +46,6 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: Pre-build dependencies - run: npm install yarn - - name: Install dependencies run: yarn install @@ -60,7 +57,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] include: - machine: rpi2 platform: raspberry-pi @@ -72,6 +69,8 @@ jobs: platform: raspberry-pi - machine: rpi4-64 platform: raspberry-pi + - machine: rpi5-64 + platform: raspberry-pi - machine: jetson platform: jetson - machine: beaglebone @@ -80,9 +79,6 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Pre-build dependencies - run: npm install --global yarn - - name: Install dependencies run: yarn install diff --git a/.github/workflows/nodejs-perf.yml b/.github/workflows/nodejs-perf.yml index eea3ffee..77d46857 100644 --- a/.github/workflows/nodejs-perf.yml +++ b/.github/workflows/nodejs-perf.yml @@ -54,9 +54,6 @@ jobs: with: node-version: 18.x - - name: Pre-build dependencies - run: npm install yarn - - name: Install dependencies run: yarn install @@ -68,7 +65,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] include: - machine: rpi2 num_test_iterations: 20 @@ -85,6 +82,9 @@ jobs: - machine: rpi4-64 num_test_iterations: 50 performance_threshold_sec: 0.32 + - machine: rpi5-64 + num_test_iterations: 50 + performance_threshold_sec: 0.16 - machine: jetson num_test_iterations: 50 performance_threshold_sec: 0.42 @@ -95,9 +95,6 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Pre-build dependencies - run: npm install --global yarn - - name: Install dependencies run: yarn install diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 632e991f..f467c166 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -56,9 +56,6 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: Pre-build dependencies - run: npm install yarn - - name: Install dependencies run: yarn install @@ -70,14 +67,11 @@ 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 - - name: Pre-build dependencies - run: npm install --global yarn - - name: Install dependencies run: yarn install diff --git a/binding/nodejs/README.md b/binding/nodejs/README.md index 17c77b86..34657028 100644 --- a/binding/nodejs/README.md +++ b/binding/nodejs/README.md @@ -34,7 +34,7 @@ This binding is for running Rhino on **NodeJS 12+** on the following platforms: - Windows (x86_64) - Linux (x86_64) - macOS (x86_64, arm64) -- Raspberry Pi (2,3,4) +- Raspberry Pi (2, 3, 4, 5) - NVIDIA Jetson (Nano) - BeagleBone diff --git a/binding/nodejs/package.json b/binding/nodejs/package.json index 494d01bd..b35dc3ac 100644 --- a/binding/nodejs/package.json +++ b/binding/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@picovoice/rhino-node", - "version": "3.0.2", + "version": "3.0.3", "description": "Picovoice Rhino Node.js binding", "main": "dist/index.js", "types": "dist/types/index.d.ts", @@ -43,7 +43,7 @@ "@typescript-eslint/parser": "^5.19.0", "eslint": "^8.13.0", "eslint-plugin-jest": "^27.1.6", - "jest": "^27.5.1", + "jest": "^27.5.1", "mkdirp": "^3.0.1", "ncp": "^2.0.0", "npm-run-all": "^4.1.5", diff --git a/binding/nodejs/src/platforms.ts b/binding/nodejs/src/platforms.ts index 9ab9f25c..71b8b3b0 100644 --- a/binding/nodejs/src/platforms.ts +++ b/binding/nodejs/src/platforms.ts @@ -1,5 +1,5 @@ // -// Copyright 2020-2023 Picovoice Inc. +// Copyright 2020-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. @@ -36,6 +36,7 @@ const ARM_CPU_CORTEX_A7 = 'cortex-a7'; 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, @@ -77,6 +78,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_rhino.node` ); +SYSTEM_TO_LIBRARY_PATH.set( + `${SYSTEM_LINUX}/${ARM_CPU_CORTEX_A76}`, + `${PLATFORM_RASPBERRY_PI}/${ARM_CPU_CORTEX_A76}/pv_rhino.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_rhino.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_rhino.node` @@ -111,6 +120,7 @@ function getLinuxPlatform(): string { case '0xc07': case '0xd03': case '0xd08': + case '0xd0b': return PLATFORM_RASPBERRY_PI; case '0xd07': return PLATFORM_JETSON; @@ -137,6 +147,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; case '0xc08': return PLATFORM_BEAGLEBONE; default: diff --git a/demo/nodejs/README.md b/demo/nodejs/README.md index 7ad5b6c2..7ae379ca 100644 --- a/demo/nodejs/README.md +++ b/demo/nodejs/README.md @@ -33,12 +33,12 @@ To learn more about Rhino, see the [product](https://picovoice.ai/products/rhino ## Compatibility -These demos run Rhino on **NodeJS 12+** on the following platforms: +These demos run Rhino on **NodeJS 16+** on the following platforms: - Windows (x86_64) - Linux (x86_64) - macOS (x86_64, arm64) -- Raspberry Pi (2,3,4) +- Raspberry Pi (2, 3, 4, 5) - NVIDIA Jetson (Nano) - BeagleBone diff --git a/demo/nodejs/package.json b/demo/nodejs/package.json index b3c5f68e..96d392b5 100644 --- a/demo/nodejs/package.json +++ b/demo/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@picovoice/rhino-node-demo", - "version": "3.0.1", + "version": "3.0.2", "description": "Picovoice Rhino NodeJS file-based and microphone demos", "scripts": { "file": "node file.js", @@ -16,8 +16,8 @@ "author": "Picovoice Inc.", "license": "Apache-2.0", "dependencies": { - "@picovoice/pvrecorder-node": "~1.2.1", - "@picovoice/rhino-node": "~3.0.2", + "@picovoice/pvrecorder-node": "~1.2.2", + "@picovoice/rhino-node": "~3.0.3", "commander": "^6.1.0", "wavefile": "^11.0.0" }, diff --git a/demo/nodejs/yarn.lock b/demo/nodejs/yarn.lock index 23e9fd3c..84a18eea 100644 --- a/demo/nodejs/yarn.lock +++ b/demo/nodejs/yarn.lock @@ -2,15 +2,15 @@ # yarn lockfile v1 -"@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== -"@picovoice/rhino-node@~3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@picovoice/rhino-node/-/rhino-node-3.0.2.tgz#9e0b34d97a4eb3550270914f4b564eebe331347d" - integrity sha512-0pFxkFkMHKhFsZ/iIo7fW6zTpQgvLPUn+soGucfzU6Gd3GrAw/7MjqQwpps2c/rW62WFcPBghB7m+fcAe22bmQ== +"@picovoice/rhino-node@~3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@picovoice/rhino-node/-/rhino-node-3.0.3.tgz#3faac1088a6de016c38d9535572c34e497c3ba63" + integrity sha512-a9JyvBggbmhsV8Z5iV6dYlLzhy2ZSR9NNNG/whbK8SnSLSUEjWEkHufVNQTRkOg1BRq1D4OIVPz2kvwJfanYQQ== commander@^6.1.0: version "6.2.1"