Skip to content

Commit

Permalink
Upgrade to wyoming 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
synesthesiam committed Feb 18, 2024
1 parent 4e5753a commit 1c1be7c
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 15 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
---
name: test

# yamllint disable-line rule:truthy
on:
workflow_dispatch:
push:
branches: [master]

pull_request:

permissions:
contents: read

jobs:
test_linux:
name: "test on linux"
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: setup
run: |
script/setup --dev
- name: test
run: |
- uses: actions/checkout@v4.1.1
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python_version }}"
cache: "pip"
cache-dependency-path: requirements_dev.txt
- run: |
test $(script/run --version) = $(cat wyoming_porcupine1/VERSION)
script/lint
script/test
- run: script/setup --dev
- run: script/lint
- run: script/test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ htmlcov
/.venv/
.mypy_cache/
__pycache__/
.tox/

/dist/
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pvporcupine~=1.9.0
wyoming==1.5.2
wyoming==1.5.3
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ mypy==0.991
pylint==2.15.9
pytest==7.4.4
pytest-asyncio==0.23.3
tox==4.13.0
6 changes: 3 additions & 3 deletions tests/test_porcupine1.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ async def test_porcupine1() -> None:
assert len(info.wake) == 1, "Expected one wake service"
wake = info.wake[0]
assert len(wake.models) > 0, "Expected at least one model"
assert any(
m.name == "porcupine" for m in wake.models
), "Expected porcupine model"
porcupine_model = next((m for m in wake.models if m.name == "porcupine"), None)
assert porcupine_model is not None, "Expected porcupine model"
assert porcupine_model.phrase == "porcupine"
break

# We want to use the porcupine model
Expand Down
14 changes: 14 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[tox]
env_list =
py{38,39,310,311,312}
minversion = 4.12.1

[testenv]
description = run the tests with pytest
package = wheel
wheel_build_env = .pkg
deps =
pytest>=7,<8
pytest-asyncio<1
commands =
pytest {tty:--color=yes} {posargs}
2 changes: 1 addition & 1 deletion wyoming_porcupine1/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.2.0
3 changes: 2 additions & 1 deletion wyoming_porcupine1/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async def main() -> None:
wake=[
WakeProgram(
name="porcupine1",
description="On-device wake word detection powered by deep learning ",
description="On-device wake word detection powered by deep learning",
attribution=Attribution(
name="Picovoice", url="https://github.com/Picovoice/porcupine"
),
Expand All @@ -151,6 +151,7 @@ async def main() -> None:
WakeModel(
name=kw.name,
description=f"{kw.name} ({kw.language})",
phrase=kw.name,
attribution=Attribution(
name="Picovoice",
url="https://github.com/Picovoice/porcupine",
Expand Down

0 comments on commit 1c1be7c

Please sign in to comment.