diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index bd226a82..f806ac82 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -61,7 +61,7 @@ body: - Web (WASM) - Linux (x86_64) - macOS (x86_64, arm64) - - Windows (x86_64) + - Windows (x86_64, arm64) - Raspberry Pi validations: required: true diff --git a/.github/workflows/c-demos.yml b/.github/workflows/c-demos.yml index a065fb16..25bda5df 100644 --- a/.github/workflows/c-demos.yml +++ b/.github/workflows/c-demos.yml @@ -118,6 +118,7 @@ jobs: strategy: matrix: machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64] + make_file: ["Unix Makefiles"] include: - machine: rpi3-32 platform: raspberry-pi @@ -134,6 +135,10 @@ jobs: - machine: rpi5-64 platform: raspberry-pi arch: cortex-a76-aarch64 + - machine: pv-windows-arm64 + platform: windows + arch: arm64 + make_file: "MinGW Makefiles" steps: - uses: actions/checkout@v3 @@ -141,7 +146,7 @@ jobs: submodules: recursive - name: Create build directory - run: cmake -B ./build + run: cmake -G "${{ matrix.make_file }}" -B ./build - name: Build demo run: cmake --build ./build --target cheetah_demo_file diff --git a/.github/workflows/dotnet-demos.yml b/.github/workflows/dotnet-demos.yml index d5d7078b..febace93 100644 --- a/.github/workflows/dotnet-demos.yml +++ b/.github/workflows/dotnet-demos.yml @@ -52,7 +52,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 diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6fc5d6e3..a7cf2f1e 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -59,6 +59,14 @@ jobs: binding-framework: net8.0 test-framework: net8.0 exclude: + - os: ubuntu-latest + dotnet-version: 2.1.x + - os: ubuntu-latest + dotnet-version: 3.0.x + - os: ubuntu-latest + dotnet-version: 3.1.x + - os: ubuntu-latest + dotnet-version: 5.0.x - os: macos-latest dotnet-version: 2.1.x - os: macos-latest @@ -80,6 +88,12 @@ jobs: with: dotnet-version: ${{ matrix.dotnet-version }} + - name: Set up .NET (8) + if: ${{ matrix.os == 'ubuntu-latest' && matrix.dotnet-version == '6.0.x' }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.0.x + - name: Build binding run: dotnet build Cheetah/Cheetah.csproj --framework ${{ matrix.binding-framework }} -v n @@ -93,7 +107,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 diff --git a/.github/workflows/go-codestyle.yml b/.github/workflows/go-codestyle.yml deleted file mode 100644 index 0d9508aa..00000000 --- a/.github/workflows/go-codestyle.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Go Codestyle - -on: - workflow_dispatch: - push: - branches: [ master ] - paths: - - '**/*.go' - - '.github/workflows/go-codestyle.yml' - pull_request: - branches: [ master, 'v[0-9]+.[0-9]+' ] - paths: - - '**/*.go' - - '.github/workflows/go-codestyle.yml' - -jobs: - check-go-binding-codestyle: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Setup go - uses: actions/setup-go@v4 - with: - go-version: 1.21 - - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - working-directory: binding/go - # TODO: figure out why the linter complains about this?? - args: --exclude="could not import C" - - check-go-micdemo-codestyle: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Setup go - uses: actions/setup-go@v4 - with: - go-version: 1.21 - - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - working-directory: demo/go/micdemo - - check-go-filedemo-codestyle: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Setup go - uses: actions/setup-go@v4 - with: - go-version: 1.18 - - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - working-directory: demo/go/filedemo diff --git a/.github/workflows/go-demos.yml b/.github/workflows/go-demos.yml deleted file mode 100644 index 73341ced..00000000 --- a/.github/workflows/go-demos.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Go Demos - -on: - workflow_dispatch: - push: - branches: [ master ] - paths: - - 'demo/go/**' - - '!demo/go/README.md' - - '.github/workflows/go-demos.yml' - pull_request: - branches: [ master, 'v[0-9]+.[0-9]+' ] - paths: - - 'demo/go/**' - - '!demo/go/README.md' - - '.github/workflows/go-demos.yml' - -defaults: - run: - working-directory: demo/go - -jobs: - build-github-hoster: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - go: [ '1.16', '1.17', '1.18', '1.19', '1.20', '1.21', 'stable' ] - - steps: - - uses: actions/checkout@v3 - - - name: Set up Mingw - uses: egor-tensin/setup-mingw@v2 - if: ${{ (matrix.os == 'windows-latest') && (matrix.go != 'stable') && (matrix.go < 1.20) }} - with: - version: 11.2.0 - - - name: Setup go - uses: actions/setup-go@v3 - with: - go-version: ${{ matrix.go }} - - - name: Build micdemo - run: go build micdemo/cheetah_mic_demo.go - - - name: Build filedemo - run: go build filedemo/cheetah_file_demo.go - - - name: Test filedemo - run: ./cheetah_file_demo -access_key ${{secrets.PV_VALID_ACCESS_KEY}} -input_audio_path ../../resources/audio_samples/test.wav - - build-self-hoster: - runs-on: ${{ matrix.machine }} - - strategy: - matrix: - machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64] - - steps: - - uses: actions/checkout@v3 - - - name: Build micdemo - run: go build micdemo/cheetah_mic_demo.go - - - name: Build filedemo - run: go build filedemo/cheetah_file_demo.go - - - name: Test filedemo - run: ./cheetah_file_demo -access_key ${{secrets.PV_VALID_ACCESS_KEY}} -input_audio_path ../../resources/audio_samples/test.wav diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index f8e0c38d..00000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Go - -on: - workflow_dispatch: - push: - branches: [ master ] - paths: - - 'binding/go/**' - - '!binding/go/README.md' - - 'lib/common/**' - - 'lib/linux/**' - - 'lib/mac/**' - - 'lib/raspberry-pi/**' - - 'lib/windows/**' - - '.github/workflows/go.yml' - pull_request: - branches: [ master, 'v[0-9]+.[0-9]+' ] - paths: - - 'binding/go/**' - - '!binding/go/README.md' - - 'lib/common/**' - - 'lib/linux/**' - - 'lib/mac/**' - - 'lib/raspberry-pi/**' - - 'lib/windows/**' - - '.github/workflows/go.yml' - -defaults: - run: - working-directory: binding/go - -jobs: - build-github-hosted: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - go: [ '1.16', '1.17', '1.18', '1.19', '1.20', '1.21', 'stable' ] - - steps: - - uses: actions/checkout@v3 - - - name: Set up Mingw - uses: egor-tensin/setup-mingw@v2 - if: ${{ (matrix.os == 'windows-latest') && (matrix.go != 'stable') && (matrix.go < 1.20) }} - with: - version: 11.2.0 - - - name: Setup go - uses: actions/setup-go@v3 - with: - go-version: ${{ matrix.go }} - - - name: Pre-build dependencies - run: ./copy.sh - - - name: Build - run: go build - - - name: Test - run: go test -modfile="go_test.mod" -v -access_key ${{secrets.PV_VALID_ACCESS_KEY}} - - build-self-hosted: - runs-on: ${{ matrix.machine }} - - strategy: - matrix: - machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64] - - steps: - - uses: actions/checkout@v3 - - - name: Pre-build dependencies - run: ./copy.sh - - - name: Build - run: go build - - - name: Test - run: go test -modfile="go_test.mod" -timeout 30m -v -access_key ${{secrets.PV_VALID_ACCESS_KEY}} diff --git a/.github/workflows/java-demos.yml b/.github/workflows/java-demos.yml index bf94a0dd..edf48aeb 100644 --- a/.github/workflows/java-demos.yml +++ b/.github/workflows/java-demos.yml @@ -48,7 +48,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 diff --git a/.github/workflows/java-perf.yml b/.github/workflows/java-perf.yml index 05d03477..51f14afe 100644 --- a/.github/workflows/java-perf.yml +++ b/.github/workflows/java-perf.yml @@ -95,3 +95,24 @@ 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 + init_performance_threshold_sec: 4.5 + proc_performance_threshold_sec: 1.0 + + steps: + - uses: actions/checkout@v3 + + - name: Build + run: ./gradlew assemble + + - name: Test + run: ./gradlew test --info --tests CheetahPerformanceTest -DpvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" -DnumTestIterations="50" -DinitPerformanceThresholdSec="${{matrix.init_performance_threshold_sec}}" -DprocPerformanceThresholdSec="${{matrix.proc_performance_threshold_sec}}" diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 19168fa2..66422779 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -52,7 +52,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 diff --git a/.github/workflows/nodejs-demos.yml b/.github/workflows/nodejs-demos.yml index 919efae4..8cf25796 100644 --- a/.github/workflows/nodejs-demos.yml +++ b/.github/workflows/nodejs-demos.yml @@ -50,7 +50,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 diff --git a/.github/workflows/nodejs-perf.yml b/.github/workflows/nodejs-perf.yml index dff36f85..a3af6536 100644 --- a/.github/workflows/nodejs-perf.yml +++ b/.github/workflows/nodejs-perf.yml @@ -95,3 +95,24 @@ 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 + init_performance_threshold_sec: 3.0 + proc_performance_threshold_sec: 0.8 + + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: yarn install + + - name: Test + run: yarn test perf.test.ts --access_key=${{secrets.PV_VALID_ACCESS_KEY}} --num_test_iterations=50 --init_performance_threshold_sec=${{matrix.init_performance_threshold_sec}} --proc_performance_threshold_sec=${{matrix.proc_performance_threshold_sec}} diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 1a866bcd..6ea22c85 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -50,7 +50,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 diff --git a/.github/workflows/python-demos.yml b/.github/workflows/python-demos.yml index a3eb9394..15fb0245 100644 --- a/.github/workflows/python-demos.yml +++ b/.github/workflows/python-demos.yml @@ -50,7 +50,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 diff --git a/.github/workflows/python-perf.yml b/.github/workflows/python-perf.yml index 33530fec..7e3ab5d7 100644 --- a/.github/workflows/python-perf.yml +++ b/.github/workflows/python-perf.yml @@ -103,3 +103,24 @@ 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 + init_performance_threshold_sec: 4.0 + proc_performance_threshold_sec: 1.0 + + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Test + run: python3 test_cheetah_perf.py ${{secrets.PV_VALID_ACCESS_KEY}} 50 ${{matrix.init_performance_threshold_sec}} ${{matrix.proc_performance_threshold_sec}} diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 02c6dea4..03a9630e 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -60,7 +60,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 diff --git a/.github/workflows/rust-codestyle.yml b/.github/workflows/rust-codestyle.yml deleted file mode 100644 index bcfa721a..00000000 --- a/.github/workflows/rust-codestyle.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: Rust Codestyle - -on: - workflow_dispatch: - push: - branches: [ master ] - paths: - - '.github/workflows/rust-codestyle.yml' - - 'binding/rust/**/*.rs' - - 'demo/rust/**/*.rs' - pull_request: - branches: [ master, 'v[0-9]+.[0-9]+' ] - paths: - - '.github/workflows/rust-codestyle.yml' - - 'binding/rust/**/*.rs' - - 'demo/rust/**/*.rs' - -env: - CARGO_TERM_COLOR: always - -defaults: - run: - shell: bash - -jobs: - check-rust-binding-codestyle: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Rust pre-build - run: bash copy.sh - working-directory: binding/rust - - - name: Rust dependencies - if: matrix.os == 'ubuntu-latest' - run: sudo apt install libasound2-dev -y - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Run clippy - run: cargo clippy -- -D warnings - working-directory: binding/rust - - check-rust-filedemo-codestyle: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Rust dependencies - if: matrix.os == 'ubuntu-latest' - run: sudo apt install libasound2-dev -y - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Run clippy - run: cargo clippy -- -D warnings - working-directory: demo/rust/filedemo - - check-rust-micdemo-codestyle: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Rust dependencies - if: matrix.os == 'ubuntu-latest' - run: sudo apt install libasound2-dev -y - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Run clippy - run: cargo clippy -- -D warnings - working-directory: demo/rust/micdemo diff --git a/.github/workflows/rust-demos.yml b/.github/workflows/rust-demos.yml deleted file mode 100644 index 12c5bb6b..00000000 --- a/.github/workflows/rust-demos.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: Rust Demos - -on: - workflow_dispatch: - push: - branches: [ master ] - paths: - - '.github/workflows/rust-demos.yml' - - 'demo/rust/**' - - '!demo/rust/README.md' - pull_request: - branches: [ master, 'v[0-9]+.[0-9]+' ] - paths: - - '.github/workflows/rust-demos.yml' - - 'demo/rust/**' - - '!demo/rust/README.md' - -defaults: - run: - working-directory: demo/rust - shell: bash - -jobs: - build-github-hosted: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - - steps: - - uses: actions/checkout@v3 - - - name: Rust dependencies - if: matrix.os == 'ubuntu-latest' - run: sudo apt install libasound2-dev -y - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Rust build micdemo - run: cargo build --verbose - working-directory: demo/rust/micdemo - - - name: Rust build filedemo - run: cargo build --verbose - working-directory: demo/rust/filedemo - - - 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 - - build-self-hosted: - runs-on: ${{ matrix.machine }} - - strategy: - matrix: - machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64] - - steps: - - uses: actions/checkout@v3 - - - name: Rust dependencies - if: matrix.os == 'ubuntu-latest' - run: sudo apt install libasound2-dev -y - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - - - name: Rust build micdemo - run: cargo build --verbose - working-directory: demo/rust/micdemo - - - name: Rust build filedemo - run: cargo build --verbose - working-directory: demo/rust/filedemo - - - 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 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 7cee798b..00000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: Rust - -on: - workflow_dispatch: - push: - branches: [ master ] - paths: - - 'binding/rust/**' - - '!binding/rust/README.md' - - 'lib/common/**' - - 'lib/linux/**' - - 'lib/mac/**' - - 'lib/raspberry-pi/**' - - 'lib/windows/**' - - '.github/workflows/rust.yml' - pull_request: - branches: [ master, 'v[0-9]+.[0-9]+' ] - paths: - - 'binding/rust/**' - - '!binding/rust/README.md' - - 'lib/common/**' - - 'lib/linux/**' - - 'lib/mac/**' - - 'lib/raspberry-pi/**' - - 'lib/windows/**' - - '.github/workflows/rust.yml' - -env: - CARGO_TERM_COLOR: always - -defaults: - run: - working-directory: binding/rust - shell: bash - -jobs: - build-github-hosted: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - - steps: - - uses: actions/checkout@v3 - - - name: Rust pre-build - run: bash copy.sh - - - name: Rust dependencies - if: matrix.os == 'ubuntu-latest' - run: sudo apt install libasound2-dev -y - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Rust build - run: cargo build --verbose - - - name: Rust run tests - run: PV_ACCESS_KEY=${{secrets.PV_VALID_ACCESS_KEY}} cargo test --verbose - - build-self-hosted: - runs-on: ${{ matrix.machine }} - - strategy: - matrix: - machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64] - - steps: - - uses: actions/checkout@v3 - - - name: Rust pre-build - run: bash copy.sh - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - - - name: Rust build - run: cargo build --verbose - - - name: Rust run tests - run: PV_ACCESS_KEY=${{secrets.PV_VALID_ACCESS_KEY}} cargo test --verbose diff --git a/README.md b/README.md index 2334e54b..ff8dc215 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: - [Accurate](https://picovoice.ai/docs/benchmark/stt/) - [Compact and Computationally-Efficient](https://github.com/Picovoice/speech-to-text-benchmark#rtf) - Cross-Platform: - - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64) + - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64) - Android and iOS - Chrome, Safari, Firefox, and Edge - Raspberry Pi (3, 4, 5) diff --git a/binding/dotnet/Cheetah/Cheetah.csproj b/binding/dotnet/Cheetah/Cheetah.csproj index aff70714..02e9a07b 100644 --- a/binding/dotnet/Cheetah/Cheetah.csproj +++ b/binding/dotnet/Cheetah/Cheetah.csproj @@ -1,7 +1,7 @@  net8.0;net6.0;netcoreapp3.0;netstandard2.0; - 2.1.0 + 2.1.1 Picovoice Cheetah Speech-to-Text Engine @@ -18,7 +18,7 @@ - Private; All voice processing runs locally. - Accurate - Compact and Computationally-Efficient - - Cross-Platform: Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (3, 4, 5) + - Cross-Platform: Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64), Raspberry Pi (3, 4, 5) true pv_circle_512.png @@ -60,10 +60,17 @@ lib\windows\amd64\libpv_cheetah.dll false + + + build/net6.0/lib/windows/arm64/libpv_cheetah.dll; + build/net8.0/lib/windows/arm64/libpv_cheetah.dll; + + PreserveNewest + lib\windows\arm64\libpv_cheetah.dll + false + - build/netstandard2.0/libpv_cheetah.so; - build/netcoreapp3.0/lib/linux/x86_64/libpv_cheetah.so; build/net6.0/lib/linux/x86_64/libpv_cheetah.so; build/net8.0/lib/linux/x86_64/libpv_cheetah.so; @@ -86,7 +93,6 @@ - build/netcoreapp3.0/lib/raspberry-pi; build/net6.0/lib/raspberry-pi; build/net8.0/lib/raspberry-pi; diff --git a/binding/dotnet/Cheetah/Utils.cs b/binding/dotnet/Cheetah/Utils.cs index 9ba717bb..f2b8e89b 100644 --- a/binding/dotnet/Cheetah/Utils.cs +++ b/binding/dotnet/Cheetah/Utils.cs @@ -41,6 +41,10 @@ public static string PvLibraryPath(string libName) { return Path.Combine(AppContext.BaseDirectory, $"lib/{_env}/amd64/{libName}.dll"); } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && _arch == Architecture.Arm64) + { + return Path.Combine(AppContext.BaseDirectory, $"lib/{_env}/arm64/{libName}.dll"); + } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && _arch == Architecture.X64) { return Path.Combine(AppContext.BaseDirectory, $"lib/{_env}/x86_64/{libName}.dylib"); diff --git a/binding/dotnet/README.md b/binding/dotnet/README.md index d8f3a0dc..63f7368c 100644 --- a/binding/dotnet/README.md +++ b/binding/dotnet/README.md @@ -10,7 +10,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: - [Accurate](https://picovoice.ai/docs/benchmark/stt/#results) - [Compact and Computationally-Efficient](https://github.com/Picovoice/speech-to-text-benchmark#rtf) - Cross-Platform: - - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64) + - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64) - Android and iOS - Chrome, Safari, Firefox, and Edge - Raspberry Pi (3, 4, 5) @@ -23,24 +23,23 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: Platform compatible with .NET Framework 4.6.1+: -- Windows (x86_64) +- Windows (x86_64, arm64) Platforms compatible with .NET Core 2.0+: -- Linux (x86_64) - macOS (x86_64) - Windows (x86_64) -Platforms compatible with .NET Core 3.0+: +Platform compatible with .NET 6.0+: - Raspberry Pi: - 3 (32 and 64 bit) - 4 (32 and 64 bit) - 5 (32 and 64 bit) -Platform compatible with .NET 6.0+: - - macOS (arm64) +- Linux (x86_64) +- Windows (arm64) ## Installation diff --git a/binding/java/README.md b/binding/java/README.md index 43ece9c3..9ab5ced4 100644 --- a/binding/java/README.md +++ b/binding/java/README.md @@ -10,7 +10,7 @@ Cheetah is an on-device speech-to-text engine. Cheetah is: - [Accurate](https://picovoice.ai/docs/benchmark/stt/) - [Compact and Computationally-Efficient](https://github.com/Picovoice/speech-to-text-benchmark#rtf) - 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) diff --git a/binding/java/build.gradle b/binding/java/build.gradle index 75b2a4c9..aaeadcfd 100644 --- a/binding/java/build.gradle +++ b/binding/java/build.gradle @@ -7,7 +7,7 @@ plugins { ext { PUBLISH_GROUP_ID = 'ai.picovoice' - PUBLISH_VERSION = '2.1.0' + PUBLISH_VERSION = '2.1.1' PUBLISH_ARTIFACT_ID = 'cheetah-java' } @@ -50,7 +50,10 @@ task copyMacLib(type: Copy) { into "${outputDir}/cheetah/lib/java/mac/" } task copyWindowsLib(type: Copy) { - from('../../lib/java/windows/amd64/libpv_cheetah_jni.dll') into "${outputDir}/cheetah/lib/java/windows/amd64/" + from('../../lib/java/windows/') + include('amd64/libpv_cheetah_jni.dll', + 'arm64/libpv_cheetah_jni.dll') + into "${outputDir}/cheetah/lib/java/windows/" } task copyRPILib(type: Copy) { from('../../lib/java/raspberry-pi/') diff --git a/binding/java/gradle/wrapper/gradle-wrapper.properties b/binding/java/gradle/wrapper/gradle-wrapper.properties index 774fae87..d6e308a6 100644 --- a/binding/java/gradle/wrapper/gradle-wrapper.properties +++ b/binding/java/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/binding/java/src/ai/picovoice/cheetah/Utils.java b/binding/java/src/ai/picovoice/cheetah/Utils.java index 9fb50aee..0d3f81ba 100644 --- a/binding/java/src/ai/picovoice/cheetah/Utils.java +++ b/binding/java/src/ai/picovoice/cheetah/Utils.java @@ -162,6 +162,8 @@ private static String getArchitecture() throws RuntimeException { } else if (ENVIRONMENT_NAME.equals("windows")) { if (isX86_64) { return "amd64"; + } else if (isArm) { + return "arm64"; } } else if (ENVIRONMENT_NAME.equals("linux")) { if (isX86_64) { @@ -215,7 +217,9 @@ public static String getPackagedModelPath() { public static String getPackagedLibraryPath() { switch (ENVIRONMENT_NAME) { case "windows": - return RESOURCE_DIRECTORY.resolve("lib/java/windows/amd64/libpv_cheetah_jni.dll").toString(); + return RESOURCE_DIRECTORY.resolve("lib/java/windows") + .resolve(ARCHITECTURE) + .resolve("libpv_cheetah_jni.dll").toString(); case "mac": return RESOURCE_DIRECTORY.resolve("lib/java/mac") .resolve(ARCHITECTURE) diff --git a/binding/nodejs/README.md b/binding/nodejs/README.md index 6de1e8de..3c40ff60 100644 --- a/binding/nodejs/README.md +++ b/binding/nodejs/README.md @@ -10,7 +10,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: - Accurate [[1]](https://picovoice.ai/docs/benchmark/stt/#results) - Compact and Computationally-Efficient [[2]](https://github.com/Picovoice/speech-to-text-benchmark#rtf) - Cross-Platform: - - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64) + - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64) - Android and iOS - Chrome, Safari, Firefox, and Edge - Raspberry Pi (3, 4, 5) @@ -18,7 +18,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: ## 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 diff --git a/binding/nodejs/package.json b/binding/nodejs/package.json index 850e82f3..5a9ac83f 100644 --- a/binding/nodejs/package.json +++ b/binding/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@picovoice/cheetah-node", - "version": "2.1.0", + "version": "2.1.1", "description": "Picovoice Cheetah Node.js binding", "main": "dist/index.js", "types": "dist/types/index.d.ts", diff --git a/binding/nodejs/src/platforms.ts b/binding/nodejs/src/platforms.ts index d5ea1ca3..aacc44f6 100644 --- a/binding/nodejs/src/platforms.ts +++ b/binding/nodejs/src/platforms.ts @@ -82,6 +82,10 @@ SYSTEM_TO_LIBRARY_PATH.set( `${SYSTEM_WINDOWS}/${X86_64}`, `${PLATFORM_WINDOWS}/amd64/pv_cheetah.node` ); +SYSTEM_TO_LIBRARY_PATH.set( + `${SYSTEM_WINDOWS}/${ARM_64}`, + `${PLATFORM_WINDOWS}/arm64/pv_cheetah.node` +); function absoluteLibraryPath(libraryPath: string): string { return path.resolve(__dirname, LIBRARY_PATH_PREFIX, libraryPath); @@ -137,7 +141,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; } @@ -188,9 +192,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; diff --git a/binding/python/README.md b/binding/python/README.md index d1dd5dd2..4ce60ca9 100644 --- a/binding/python/README.md +++ b/binding/python/README.md @@ -10,7 +10,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: - [Accurate](https://picovoice.ai/docs/benchmark/stt/) - [Compact and Computationally-Efficient](https://github.com/Picovoice/speech-to-text-benchmark#rtf) - Cross-Platform: - - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64) + - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64) - Android and iOS - Chrome, Safari, Firefox, and Edge - Raspberry Pi (3, 4, 5) @@ -18,7 +18,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: ## 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 diff --git a/binding/python/_util.py b/binding/python/_util.py index af9db8a3..b07b1b03 100644 --- a/binding/python/_util.py +++ b/binding/python/_util.py @@ -70,7 +70,10 @@ def default_library_path(relative): relative, 'lib/raspberry-pi/%s/libpv_cheetah.so' % linux_machine) elif platform.system() == 'Windows': - return os.path.join(os.path.dirname(__file__), relative, 'lib/windows/amd64/libpv_cheetah.dll') + if platform.machine().lower() == 'amd64': + return os.path.join(os.path.dirname(__file__), relative, 'lib/windows/amd64/libpv_cheetah.dll') + elif platform.machine().lower() == 'arm64': + return os.path.join(os.path.dirname(__file__), relative, 'lib/windows/arm64/libpv_cheetah.dll') raise NotImplementedError('Unsupported platform.') diff --git a/binding/python/setup.py b/binding/python/setup.py index 09bc33bc..7141df1d 100644 --- a/binding/python/setup.py +++ b/binding/python/setup.py @@ -48,7 +48,7 @@ setuptools.setup( name="pvcheetah", - version="2.1.0", + version="2.1.1", author="Picovoice", author_email="hello@picovoice.ai", description="Cheetah Speech-to-Text Engine.", diff --git a/demo/dotnet/CheetahDemo/CheetahDemo.csproj b/demo/dotnet/CheetahDemo/CheetahDemo.csproj index c17ede74..29197334 100644 --- a/demo/dotnet/CheetahDemo/CheetahDemo.csproj +++ b/demo/dotnet/CheetahDemo/CheetahDemo.csproj @@ -19,7 +19,7 @@ - - + + diff --git a/demo/dotnet/README.md b/demo/dotnet/README.md index 8e07a38b..a5a1799f 100644 --- a/demo/dotnet/README.md +++ b/demo/dotnet/README.md @@ -10,7 +10,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: - [Accurate](https://picovoice.ai/docs/benchmark/stt/#results) - [Compact and Computationally-Efficient](https://github.com/Picovoice/speech-to-text-benchmark#rtf) - Cross-Platform: - - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64) + - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64) - Android and iOS - Chrome, Safari, Firefox, and Edge - Raspberry Pi (3, 4, 5) @@ -23,7 +23,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: - Linux (x86_64) - macOS (x86_64) -- Windows (x86_64) +- Windows (x86_64, arm64) - Raspberry Pi: - 3 (32 and 64 bit) - 4 (32 and 64 bit) diff --git a/demo/java/README.md b/demo/java/README.md index f197c17b..2498c2bc 100644 --- a/demo/java/README.md +++ b/demo/java/README.md @@ -10,7 +10,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: - [Accurate](https://picovoice.ai/docs/benchmark/stt/) - [Compact and Computationally-Efficient](https://github.com/Picovoice/speech-to-text-benchmark#rtf) - 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) @@ -18,7 +18,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: ## Compatibility - Java 11+ -- 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 diff --git a/demo/java/build.gradle b/demo/java/build.gradle index 038962d7..b1174c42 100644 --- a/demo/java/build.gradle +++ b/demo/java/build.gradle @@ -15,14 +15,14 @@ sourceSets { } dependencies { - implementation 'ai.picovoice:cheetah-java:2.1.0' + implementation 'ai.picovoice:cheetah-java:2.1.1' implementation 'commons-cli:commons-cli:1.4' } jar { manifest { attributes "Main-Class": "ai.picovoice.cheetahdemo.MicDemo", - "Class-Path": "cheetah-2.1.0.jar;commons-cli-1.4.jar" + "Class-Path": "cheetah-2.1.1.jar;commons-cli-1.4.jar" } from sourceSets.main.output exclude "**/FileDemo.class" @@ -33,7 +33,7 @@ jar { task fileDemoJar(type: Jar) { manifest { attributes "Main-Class": "ai.picovoice.cheetahdemo.FileDemo", - "Class-Path": "cheetah-2.1.0.jar;commons-cli-1.4.jar" + "Class-Path": "cheetah-2.1.1.jar;commons-cli-1.4.jar" } from sourceSets.main.output exclude "**/MicDemo.class" diff --git a/demo/java/gradle/wrapper/gradle-wrapper.properties b/demo/java/gradle/wrapper/gradle-wrapper.properties index 774fae87..d6e308a6 100644 --- a/demo/java/gradle/wrapper/gradle-wrapper.properties +++ b/demo/java/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/demo/nodejs/README.md b/demo/nodejs/README.md index af422c0f..ac91beef 100644 --- a/demo/nodejs/README.md +++ b/demo/nodejs/README.md @@ -10,7 +10,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: - Accurate [[1]](https://picovoice.ai/docs/benchmark/stt/#results) - Compact and Computationally-Efficient [[2]](https://github.com/Picovoice/speech-to-text-benchmark#rtf) - Cross-Platform: - - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64) + - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64) - Android and iOS - Chrome, Safari, Firefox, and Edge - Raspberry Pi (3, 4, 5) @@ -18,7 +18,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: ## 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 diff --git a/demo/nodejs/package.json b/demo/nodejs/package.json index 8c3cf70e..abb70212 100644 --- a/demo/nodejs/package.json +++ b/demo/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@picovoice/cheetah-node-demo", - "version": "2.1.0", + "version": "2.1.1", "description": "Picovoice Cheetah Node.js file-based and microphone demos", "scripts": { "file": "node file.js", @@ -16,8 +16,8 @@ "author": "Picovoice Inc.", "license": "Apache-2.0", "dependencies": { - "@picovoice/cheetah-node": "~2.1.0", - "@picovoice/pvrecorder-node": "^1.2.4", + "@picovoice/cheetah-node": "~2.1.1", + "@picovoice/pvrecorder-node": "^1.2.5", "commander": "^6.1.0", "readline": "^1.3.0", "wavefile": "^11.0.0" diff --git a/demo/nodejs/yarn.lock b/demo/nodejs/yarn.lock index 87356cfc..ea1c40ac 100644 --- a/demo/nodejs/yarn.lock +++ b/demo/nodejs/yarn.lock @@ -2,15 +2,15 @@ # yarn lockfile v1 -"@picovoice/cheetah-node@~2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@picovoice/cheetah-node/-/cheetah-node-2.1.0.tgz#d68a86b55bc21bf586a23f4c33563dce58b18385" - integrity sha512-B63Aqmjs2berQ/YVEooIJTSQVXrJ/naz5YG5ZG+mlyfahYaOBbudXAdQP4FxTiQBlGLNhQSqZjllgoEs394n1Q== +"@picovoice/cheetah-node@~2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@picovoice/cheetah-node/-/cheetah-node-2.1.1.tgz#ecc1762c56b090670853b52def624574d4cca015" + integrity sha512-nP+VTZYVqHF3BNz8BIuP5MAFCFJVVX6HWAQq5DStZ5c26yCUQwXs+orIlXeEpNZqlZOEvhkxbwACqFwORC3Ktw== -"@picovoice/pvrecorder-node@^1.2.4": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@picovoice/pvrecorder-node/-/pvrecorder-node-1.2.4.tgz#1e67a1f82a144ad3c8e3f77c18fdbfe1ab5880cf" - integrity sha512-s8l6LtJnTHZ+FfIgXJZ9d8pKONSWs04v5q83F2zmfRr9IV1m7SQ5RlsmL0FO7NsB0GjIar3qHndryAQCjgSInw== +"@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" diff --git a/demo/python/README.md b/demo/python/README.md index 3b1febc0..ac5a68b3 100644 --- a/demo/python/README.md +++ b/demo/python/README.md @@ -10,7 +10,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: - [Accurate](https://picovoice.ai/docs/benchmark/stt/) - [Compact and Computationally-Efficient](https://github.com/Picovoice/speech-to-text-benchmark#rtf) - Cross-Platform: - - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64) + - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64) - Android and iOS - Chrome, Safari, Firefox, and Edge - Raspberry Pi (3, 4, 5) @@ -18,7 +18,7 @@ Cheetah is an on-device streaming speech-to-text engine. Cheetah is: ## 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 diff --git a/demo/python/requirements.txt b/demo/python/requirements.txt index 71bb9cbc..0bf0c809 100644 --- a/demo/python/requirements.txt +++ b/demo/python/requirements.txt @@ -1,2 +1,2 @@ -pvcheetah==2.1.0 -pvrecorder==1.2.3 +pvcheetah==2.1.1 +pvrecorder==1.2.4 diff --git a/demo/python/setup.py b/demo/python/setup.py index 0e240324..d48fcdf6 100644 --- a/demo/python/setup.py +++ b/demo/python/setup.py @@ -28,7 +28,7 @@ setuptools.setup( name="pvcheetahdemo", - version="2.1.0", + version="2.1.1", author="Picovoice", author_email="hello@picovoice.ai", description="Cheetah speech-to-text engine demos", @@ -36,7 +36,7 @@ long_description_content_type="text/markdown", url="https://github.com/Picovoice/cheetah", packages=["pvcheetahdemo"], - install_requires=["pvcheetah==2.1.0", "pvrecorder==1.2.3"], + install_requires=["pvcheetah==2.1.1", "pvrecorder==1.2.4"], include_package_data=True, classifiers=[ "Development Status :: 5 - Production/Stable", diff --git a/lib/java/windows/arm64/libpv_cheetah_jni.dll b/lib/java/windows/arm64/libpv_cheetah_jni.dll new file mode 100644 index 00000000..be8d5911 Binary files /dev/null and b/lib/java/windows/arm64/libpv_cheetah_jni.dll differ diff --git a/lib/node/windows/arm64/pv_cheetah.node b/lib/node/windows/arm64/pv_cheetah.node new file mode 100644 index 00000000..441db43e Binary files /dev/null and b/lib/node/windows/arm64/pv_cheetah.node differ diff --git a/lib/windows/arm64/libpv_cheetah.dll b/lib/windows/arm64/libpv_cheetah.dll new file mode 100644 index 00000000..1c3b21a1 Binary files /dev/null and b/lib/windows/arm64/libpv_cheetah.dll differ