mirror of
https://github.com/Picovoice/porcupine.git
synced 2022-01-28 03:27:53 +03:00
C actions (#616)
This commit is contained in:
30
.github/actions/c-filedemo/action.yml
vendored
Normal file
30
.github/actions/c-filedemo/action.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Run filedemo
|
||||
|
||||
inputs:
|
||||
access_key:
|
||||
required: true
|
||||
library_path:
|
||||
required: true
|
||||
model_path:
|
||||
required: true
|
||||
keyword_path:
|
||||
required: true
|
||||
sensitivity:
|
||||
default: 0.5
|
||||
audio_path:
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: >
|
||||
./build/porcupine_demo_file
|
||||
-a ${{ inputs.access_key }}
|
||||
-l ${{ inputs.library_path }}
|
||||
-m ${{ inputs.model_path }}
|
||||
-k ${{ inputs.keyword_path }}
|
||||
-t ${{ inputs.sensitivity }}
|
||||
-w ${{ inputs.audio_path }}
|
||||
working-directory: demo/c
|
||||
shell: bash
|
||||
|
||||
172
.github/workflows/c-demos.yml
vendored
172
.github/workflows/c-demos.yml
vendored
@@ -19,17 +19,175 @@ defaults:
|
||||
working-directory: demo/c
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
build-micdemo-github-hosted:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.8]
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
submodules: recursive
|
||||
|
||||
- name: Create build directory
|
||||
run: cmake -B ./build
|
||||
|
||||
- name: Build micdemo
|
||||
run: cmake --build ./build --target porcupine_demo_mic
|
||||
|
||||
build-micdemo-self-hosted:
|
||||
runs-on: ${{ matrix.machine }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
machine: [rpi2, rpi3, rpi4, jetson, beaglebone]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Create build directory
|
||||
run: cmake -B ./build
|
||||
|
||||
- name: Build micdemo
|
||||
run: cmake --build ./build --target porcupine_demo_mic
|
||||
|
||||
build-filedemo-github-hosted:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
ext: so
|
||||
- os: windows-latest
|
||||
platform: windows
|
||||
arch: amd64
|
||||
ext: dll
|
||||
- os: macos-latest
|
||||
platform: mac
|
||||
arch: x86_64
|
||||
ext: dylib
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Create build directory
|
||||
run: cmake -B ./build
|
||||
|
||||
- name: Build filedemo
|
||||
run: cmake --build ./build --target porcupine_demo_file
|
||||
|
||||
- uses: ./.github/actions/c-filedemo
|
||||
name: Run filedemo (en)
|
||||
with:
|
||||
access_key: ${{ secrets.PV_VALID_ACCESS_KEY }}
|
||||
library_path: ../../lib/${{ matrix.platform }}/${{ matrix.arch }}/libpv_porcupine.${{ matrix.ext }}
|
||||
model_path: ../../lib/common/porcupine_params.pv
|
||||
keyword_path: ../../resources/keyword_files/${{ matrix.platform }}/porcupine_${{ matrix.platform }}.ppn
|
||||
audio_path: ../../resources/audio_samples/multiple_keywords.wav
|
||||
|
||||
- uses: ./.github/actions/c-filedemo
|
||||
name: Run filedemo (de)
|
||||
with:
|
||||
access_key: ${{ secrets.PV_VALID_ACCESS_KEY }}
|
||||
library_path: ../../lib/${{ matrix.platform }}/${{ matrix.arch }}/libpv_porcupine.${{ matrix.ext }}
|
||||
model_path: ../../lib/common/porcupine_params_de.pv
|
||||
keyword_path: ../../resources/keyword_files_de/${{ matrix.platform }}/ananas_${{ matrix.platform }}.ppn
|
||||
audio_path: ../../resources/audio_samples/multiple_keywords_de.wav
|
||||
|
||||
- uses: ./.github/actions/c-filedemo
|
||||
name: Run filedemo (es)
|
||||
with:
|
||||
access_key: ${{ secrets.PV_VALID_ACCESS_KEY }}
|
||||
library_path: ../../lib/${{ matrix.platform }}/${{ matrix.arch }}/libpv_porcupine.${{ matrix.ext }}
|
||||
model_path: ../../lib/common/porcupine_params_es.pv
|
||||
keyword_path: ../../resources/keyword_files_es/${{ matrix.platform }}/manzana_${{ matrix.platform }}.ppn
|
||||
audio_path: ../../resources/audio_samples/multiple_keywords_es.wav
|
||||
|
||||
- uses: ./.github/actions/c-filedemo
|
||||
name: Run filedemo (fr)
|
||||
with:
|
||||
access_key: ${{ secrets.PV_VALID_ACCESS_KEY }}
|
||||
library_path: ../../lib/${{ matrix.platform }}/${{ matrix.arch }}/libpv_porcupine.${{ matrix.ext }}
|
||||
model_path: ../../lib/common/porcupine_params_fr.pv
|
||||
keyword_path: ../../resources/keyword_files_fr/${{ matrix.platform }}/framboise_${{ matrix.platform }}.ppn
|
||||
audio_path: ../../resources/audio_samples/multiple_keywords_fr.wav
|
||||
|
||||
build-filedemo-self-hosted:
|
||||
runs-on: ${{ matrix.machine }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
machine: [rpi2, rpi3, rpi4, jetson, beaglebone]
|
||||
include:
|
||||
- machine: rpi2
|
||||
platform: raspberry-pi
|
||||
arch: cortex-a7
|
||||
- machine: rpi3
|
||||
platform: raspberry-pi
|
||||
arch: cortex-a53
|
||||
- machine: rpi4
|
||||
platform: raspberry-pi
|
||||
arch: cortex-a72
|
||||
- machine: jetson
|
||||
platform: jetson
|
||||
arch: cortex-a57-aarch64
|
||||
- machine: beaglebone
|
||||
platform: beaglebone
|
||||
arch: ''
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Create build directory
|
||||
run: cmake -B ./build
|
||||
|
||||
- name: Build filedemo
|
||||
run: cmake --build ./build --target porcupine_demo_file
|
||||
|
||||
- uses: ./.github/actions/c-filedemo
|
||||
name: Run filedemo (en)
|
||||
with:
|
||||
access_key: ${{ secrets.PV_VALID_ACCESS_KEY }}
|
||||
library_path: ../../lib/${{ matrix.platform }}/${{ matrix.arch }}/libpv_porcupine.so
|
||||
model_path: ../../lib/common/porcupine_params.pv
|
||||
keyword_path: ../../resources/keyword_files/${{ matrix.platform }}/porcupine_${{ matrix.platform }}.ppn
|
||||
audio_path: ../../resources/audio_samples/multiple_keywords.wav
|
||||
|
||||
- uses: ./.github/actions/c-filedemo
|
||||
name: Run filedemo (de)
|
||||
with:
|
||||
access_key: ${{ secrets.PV_VALID_ACCESS_KEY }}
|
||||
library_path: ../../lib/${{ matrix.platform }}/${{ matrix.arch }}/libpv_porcupine.so
|
||||
model_path: ../../lib/common/porcupine_params_de.pv
|
||||
keyword_path: ../../resources/keyword_files_de/${{ matrix.platform }}/ananas_${{ matrix.platform }}.ppn
|
||||
audio_path: ../../resources/audio_samples/multiple_keywords_de.wav
|
||||
|
||||
- uses: ./.github/actions/c-filedemo
|
||||
name: Run filedemo (es)
|
||||
with:
|
||||
access_key: ${{ secrets.PV_VALID_ACCESS_KEY }}
|
||||
library_path: ../../lib/${{ matrix.platform }}/${{ matrix.arch }}/libpv_porcupine.so
|
||||
model_path: ../../lib/common/porcupine_params_es.pv
|
||||
keyword_path: ../../resources/keyword_files_es/${{ matrix.platform }}/manzana_${{ matrix.platform }}.ppn
|
||||
audio_path: ../../resources/audio_samples/multiple_keywords_es.wav
|
||||
|
||||
- uses: ./.github/actions/c-filedemo
|
||||
name: Run filedemo (fr)
|
||||
with:
|
||||
access_key: ${{ secrets.PV_VALID_ACCESS_KEY }}
|
||||
library_path: ../../lib/${{ matrix.platform }}/${{ matrix.arch }}/libpv_porcupine.so
|
||||
model_path: ../../lib/common/porcupine_params_fr.pv
|
||||
keyword_path: ../../resources/keyword_files_fr/${{ matrix.platform }}/framboise_${{ matrix.platform }}.ppn
|
||||
audio_path: ../../resources/audio_samples/multiple_keywords_fr.wav
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.4)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(porcupine_demo_c)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
You need a C99-compatible compiler to build these demos.
|
||||
|
||||
## Requirements
|
||||
- The demo requires [CMake](https://cmake.org/) version 3.4 or higher.
|
||||
- The demo requires [CMake](https://cmake.org/) version 3.13 or higher.
|
||||
- **For Windows Only**: [MinGW](http://mingw-w64.org/doku.php) is required to build the demo.
|
||||
|
||||
## AccessKey
|
||||
|
||||
Reference in New Issue
Block a user