Skip to content

Commit

Permalink
Added support for Windows ARM64 (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt200-ok authored Jan 16, 2025
1 parent 93e23da commit 205d48d
Show file tree
Hide file tree
Showing 23 changed files with 101 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ body:
- Web (WASM)
- Linux (x86_64)
- macOS (x86_64, arm64)
- Windows (x86_64)
- Windows (x86_64, arm64)
- Raspberry Pi
validations:
required: true
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/c-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,18 @@ jobs:
strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64]
make_file: ["Unix Makefiles"]
include:
- machine: pv-windows-arm64
make_file: "MinGW Makefiles"

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

- name: Create build directory
run: cmake -B ./build
run: cmake -G "${{ matrix.make_file }}" -B ./build

- name: Build micdemo
run: cmake --build ./build --target eagle_demo_mic
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]

steps:
- uses: actions/checkout@v3
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/nodejs-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,28 @@ jobs:
- name: Machine state after
working-directory: resources/.scripts
run: bash machine-state.sh

perf-windows-arm64:
runs-on: ${{ matrix.machine }}

strategy:
fail-fast: false
matrix:
machine: [pv-windows-arm64]
include:
- machine: pv-windows-arm64
num_test_iterations: 20
enroll_performance_threshold_sec: 0.5
proc_performance_threshold_sec: 0.6

steps:
- uses: actions/checkout@v3

- name: Pre-build dependencies
run: npm install --global yarn

- name: Install dependencies
run: yarn install

- name: Test
run: yarn test perf.test.ts --access_key=${{secrets.PV_VALID_ACCESS_KEY}} --num_test_iterations=${{matrix.num_test_iterations}} --enroll_performance_threshold_sec=${{matrix.enroll_performance_threshold_sec}} --proc_performance_threshold_sec=${{matrix.proc_performance_threshold_sec}}
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]

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

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]

steps:
- uses: actions/checkout@v3
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/python-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,32 @@ jobs:
- name: Machine state after
working-directory: resources/.scripts
run: bash machine-state.sh

perf-windows-arm64:
runs-on: ${{ matrix.machine }}

strategy:
fail-fast: false
matrix:
machine: [pv-windows-arm64]
include:
- machine: pv-windows-arm64
profiler_performance_threshold_sec: 0.5
recognizer_performance_threshold_sec: 0.6

steps:
- uses: actions/checkout@v3

- name: Pre-build dependencies
run: python3 -m pip install --upgrade pip

- name: Install dependencies
run: pip3 install -r requirements.txt

- name: Test
run: >
python3 test_eagle_perf.py
--access-key ${{secrets.PV_VALID_ACCESS_KEY}}
--num-test-iterations 20
--profiler-performance-threshold-sec ${{matrix.profiler_performance_threshold_sec}}
--recognizer-performance-threshold-sec ${{matrix.recognizer_performance_threshold_sec}}
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Eagle is an on-device speaker recognition engine. Eagle is:
- Language-agnostic and text-independent
- Optimized for real-time processing
- Cross-Platform:
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64)
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Raspberry Pi (3, 4, 5)
Expand Down
4 changes: 2 additions & 2 deletions binding/nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Eagle is an on-device speaker recognition engine. Eagle is:

- Private; All voice processing runs locally.
- Cross-Platform:
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64)
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Raspberry Pi (3, 4, 5)

## Compatibility

- Node.js 16+
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), and Raspberry Pi (3, 4, 5).
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64), and Raspberry Pi (3, 4, 5).

## Installation

Expand Down
2 changes: 1 addition & 1 deletion binding/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{
"name": "@picovoice/eagle-node",
"version": "1.0.2",
"version": "1.0.3",
"description": "Picovoice Eagle Node.js binding",
"main": "dist/index.js",
"types": "dist/types/index.d.ts",
Expand Down
10 changes: 7 additions & 3 deletions binding/nodejs/src/platforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ SYSTEM_TO_LIBRARY_PATH.set(
`${SYSTEM_WINDOWS}/${X86_64}`,
`${PLATFORM_WINDOWS}/amd64/pv_eagle.node`
);
SYSTEM_TO_LIBRARY_PATH.set(
`${SYSTEM_WINDOWS}/${ARM_64}`,
`${PLATFORM_WINDOWS}/arm64/pv_eagle.node`
);

function absoluteLibraryPath(libraryPath: string): string {
return path.resolve(__dirname, LIBRARY_PATH_PREFIX, libraryPath);
Expand Down Expand Up @@ -127,7 +131,7 @@ export function getPlatform(): string {
return PLATFORM_MAC;
}

if (system === SYSTEM_WINDOWS && arch === X86_64) {
if (system === SYSTEM_WINDOWS && (arch === X86_64 || arch === ARM_64)) {
return PLATFORM_WINDOWS;
}

Expand Down Expand Up @@ -175,9 +179,9 @@ export function getSystemLibraryPath(): string {
}
break;
case SYSTEM_WINDOWS:
if (arch === X86_64) {
if (arch === X86_64 || arch === ARM_64) {
return absoluteLibraryPath(
SYSTEM_TO_LIBRARY_PATH.get(`${SYSTEM_WINDOWS}/${X86_64}`)
SYSTEM_TO_LIBRARY_PATH.get(`${SYSTEM_WINDOWS}/${arch}`)
);
}
break;
Expand Down
4 changes: 2 additions & 2 deletions binding/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Eagle is an on-device speaker recognition engine. Eagle is:

- Private; All voice processing runs locally.
- Cross-Platform:
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64)
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Raspberry Pi (3, 4, 5)

## Compatibility

- Python 3.8 or higher
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), and Raspberry Pi (3, 4, 5).
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64), and Raspberry Pi (3, 4, 5).

## Installation

Expand Down
5 changes: 4 additions & 1 deletion binding/python/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ def default_library_path(relative: str = "") -> str:
os.path.dirname(__file__), relative, "lib/raspberry-pi/%s/libpv_eagle.so" % linux_machine
)
elif platform.system() == "Windows":
return os.path.join(os.path.dirname(__file__), relative, "lib", "windows", "amd64", "libpv_eagle.dll")
if platform.machine().lower() == 'amd64':
return os.path.join(os.path.dirname(__file__), relative, "lib", "windows", "amd64", "libpv_eagle.dll")
elif platform.machine().lower() == 'arm64':
return os.path.join(os.path.dirname(__file__), relative, "lib", "windows", "arm64", "libpv_eagle.dll")

raise NotImplementedError("Unsupported platform.")

Expand Down
2 changes: 1 addition & 1 deletion binding/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

setuptools.setup(
name="pveagle",
version="1.0.2",
version="1.0.3",
author="Picovoice",
author_email="[email protected]",
description="Eagle Speaker Recognition Engine",
Expand Down
4 changes: 2 additions & 2 deletions demo/nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Eagle is an on-device speaker recognition engine. Eagle is:

- Private; All voice processing runs locally.
- Cross-Platform:
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64)
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Raspberry Pi (5, 4, 3)

## Compatibility

- Node.js 12+
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), and Raspberry Pi (3, 4, 5).
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64), and Raspberry Pi (3, 4, 5).

## Installation

Expand Down
6 changes: 3 additions & 3 deletions demo/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@picovoice/eagle-node-demo",
"version": "1.0.3",
"version": "1.0.4",
"description": "Picovoice Eagle Node.js file-based and microphone demos",
"scripts": {
"file": "node file.js",
Expand All @@ -24,8 +24,8 @@
"author": "Picovoice Inc.",
"license": "Apache-2.0",
"dependencies": {
"@picovoice/eagle-node": "=1.0.2",
"@picovoice/pvrecorder-node": "^1.2.2",
"@picovoice/eagle-node": "=1.0.3",
"@picovoice/pvrecorder-node": "^1.2.5",
"commander": "^6.1.0",
"readline": "^1.3.0",
"wavefile": "^11.0.0"
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/eagle-node@=1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@picovoice/eagle-node/-/eagle-node-1.0.2.tgz#cef55d40a9db2ce2a49c4e624b1413cb8460687f"
integrity sha512-nMG8NkRg7gjMVSWF82O1kv9DLd5N3NYIk6c6N6I0A1+7x0wT1cNaOPBWRKxDUDvm1lIVUy2DmEk4AOgEieUtnQ==
"@picovoice/eagle-node@=1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@picovoice/eagle-node/-/eagle-node-1.0.3.tgz#9d1ef04191a845fe7e414bff47816492c5bd1d61"
integrity sha512-zMzDd8aqJaCIV45dY2bzbwTueN0nJUabkjfODeYc5vrRrY+gEvDf9lTUZ2z1LPaTGACMAVoCWUE7VbAduUhY5w==

"@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/pvrecorder-node@^1.2.5":
version "1.2.5"
resolved "https://registry.yarnpkg.com/@picovoice/pvrecorder-node/-/pvrecorder-node-1.2.5.tgz#a47e11d347979ef0f1b083657ff69dd9bd2efe5c"
integrity sha512-bnid5oInf22JRdrZ75z8ooewOza0whYI9w/oSQSZbkDvddylPPrY6x+1L1qIyf5Tb8ZtzKQL+aQ9m8SazgRHFg==

commander@^6.1.0:
version "6.2.1"
Expand Down
4 changes: 2 additions & 2 deletions demo/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Eagle is an on-device speaker recognition engine. Eagle is:

- Private; All voice processing runs locally.
- Cross-Platform:
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64)
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Raspberry Pi (3, 4, 5)

## Compatibility

- Python 3.8+
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), and Raspberry Pi (3, 4, 5).
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64), and Raspberry Pi (3, 4, 5).

## Installation

Expand Down
4 changes: 2 additions & 2 deletions demo/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pveagle==1.0.2
pvrecorder==1.2.2
pveagle==1.0.3
pvrecorder==1.2.4
4 changes: 2 additions & 2 deletions demo/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@

setuptools.setup(
name="pveagledemo",
version="1.0.3",
version="1.0.4",
author="Picovoice",
author_email="[email protected]",
description="Eagle Speaker Recognition Engine demos",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Picovoice/eagle",
packages=["pveagledemo"],
install_requires=["pveagle==1.0.2", "pvrecorder==1.2.2"],
install_requires=["pveagle==1.0.3", "pvrecorder==1.2.4"],
include_package_data=True,
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down
Binary file added lib/node/windows/arm64/pv_eagle.node
Binary file not shown.
Binary file added lib/windows/arm64/libpv_eagle.dll
Binary file not shown.

0 comments on commit 205d48d

Please sign in to comment.