Skip to content

Commit

Permalink
added windows arm64 libs
Browse files Browse the repository at this point in the history
  • Loading branch information
matt200-ok committed Jan 13, 2025
1 parent 93e23da commit 887b1dd
Show file tree
Hide file tree
Showing 22 changed files with 123 additions and 26 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
18 changes: 17 additions & 1 deletion .github/workflows/nodejs-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

# ************ REMOVE AFTER RELEASE ***************
- name: build local binding
run: |
yarn install
yarn build
working-directory: binding/nodejs
# ************ REMOVE AFTER RELEASE ***************

- name: Install dependencies
run: yarn install

Expand All @@ -53,11 +61,19 @@ 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

# ************ REMOVE AFTER RELEASE ***************
- name: build local binding
run: |
yarn install
yarn build
working-directory: binding/nodejs
# ************ REMOVE AFTER RELEASE ***************

- name: Install dependencies
run: yarn install

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
18 changes: 17 additions & 1 deletion .github/workflows/python-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ jobs:
- name: Pre-build dependencies
run: python -m pip install --upgrade pip

# ************ REMOVE AFTER RELEASE ***************
- name: build local binding
run: |
python3 -m pip install setuptools wheel
python3 -m setup sdist bdist_wheel
working-directory: binding/python
# ************ REMOVE AFTER RELEASE ***************

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

Expand All @@ -63,14 +71,22 @@ 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

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

# ************ REMOVE AFTER RELEASE ***************
- name: build local binding
run: |
python3 -m pip install setuptools wheel
python3 -m setup sdist bdist_wheel
working-directory: binding/python
# ************ REMOVE AFTER RELEASE ***************

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

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
4 changes: 2 additions & 2 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,7 +24,7 @@
"author": "Picovoice Inc.",
"license": "Apache-2.0",
"dependencies": {
"@picovoice/eagle-node": "=1.0.2",
"@picovoice/eagle-node": "../../binding/nodejs",
"@picovoice/pvrecorder-node": "^1.2.2",
"commander": "^6.1.0",
"readline": "^1.3.0",
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
2 changes: 1 addition & 1 deletion demo/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pveagle==1.0.2
../../binding/python/dist/pveagle-1.0.3-py3-none-any.whl
pvrecorder==1.2.2
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.2"],
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 887b1dd

Please sign in to comment.