Skip to content

v3.0 Python and C

v3.0 Python and C #232

Workflow file for this run

name: Python Demo
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- '.github/workflows/python-demo.yml'
- 'demo/python/**'
- '!demo/python/README.md'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- '.github/workflows/python-demo.yml'
- 'demo/python/**'
- '!demo/python/README.md'
defaults:
run:
working-directory: demo/python
jobs:
build-github-hosted:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
device: [ cpu:1, cpu ]
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]
include:
- os: ubuntu-latest
install_dep: sudo apt install libportaudio2
- os: windows-latest
- os: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Pre-build dependencies
run: python3 -m pip install --upgrade pip
# ************** REMOVE AFTER RELEASE ********************
- name: Build binding
run: pip install setuptools && pip install wheel && python3 setup.py sdist bdist_wheel
working-directory: binding/python
# ********************************************************
- name: Install dependencies
run: |
${{matrix.install_dep}}
pip install -r requirements.txt
- name: Test streaming
run: >
python3 orca_demo_streaming.py
--access_key ${{secrets.PV_VALID_ACCESS_KEY}}
--text_to_stream "Hello, I am Orca!"
--model_path ../../lib/common/orca_params_en_female.pv
--device ${{ matrix.device }}
- name: Test single
run: >
python3 orca_demo.py
--access_key ${{secrets.PV_VALID_ACCESS_KEY}}
--text "Hello, I am Orca!"
--output_path ./tmp.wav
--model_path ../../lib/common/orca_params_en_female.pv
--device ${{ matrix.device }}
- name: Test get devices
run: >
python3 orca_demo.py --show_inference_devices
build-self-hosted:
runs-on: ${{ matrix.machine }}
strategy:
matrix:
device: [ best ]
machine: [ rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64 ]
include:
- device: gpu
machine: pv-linux
- device: gpu
machine: pv-windows
- device: gpu
machine: pv-ios
steps:
- uses: actions/checkout@v3
# ************** REMOVE AFTER RELEASE ********************
- name: Build binding
run: |
pip install wheel setuptools && cd ../../binding/python && python3 setup.py sdist bdist_wheel && pip install dist/pvorca-3.0.0-py3-none-any.whl --force-reinstall
# ********************************************************
- name: Install dependencies
run: pip3 install -r requirements.txt
- name: Test streaming
run: >
python3 orca_demo_streaming.py
--access_key ${{secrets.PV_VALID_ACCESS_KEY}}
--text_to_stream "Hello, I am Orca!"
--model_path ../../lib/common/orca_params_en_female.pv
--device ${{ matrix.device }}
- name: Test single
run: >
python3 orca_demo.py
--access_key ${{secrets.PV_VALID_ACCESS_KEY}}
--text "Hello, I am Orca!"
--output_path ./tmp.wav
--model_path ../../lib/common/orca_params_en_female.pv
--device ${{ matrix.device }}
- name: Test get devices
run: >
python3 orca_demo.py --show_inference_devices