Skip to content

Commit

Permalink
fix spelling, rm jetson from workflows, install pulseaudio for workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
albho committed Aug 6, 2024
1 parent 28ef8c7 commit 74b80b9
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 13 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/python-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ jobs:
${{matrix.install_dep}}
pip install -r requirements.txt
# GitHub Actions runners do not have sound cards, so a virtual one must be created in order for unit tests to run.
- name: Install PulseAudio on Ubuntu
run: |
sudo apt-get update
sudo apt-get install -y pulseaudio
pulseaudio --check || pulseaudio --start
pactl load-module module-null-sink
- name: Test streaming
run: >
python3 orca_demo_streaming.py
Expand All @@ -67,14 +75,21 @@ jobs:

strategy:
matrix:
machine: [ rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson ]
machine: [ rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64 ]

steps:
- uses: actions/checkout@v3

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

- name: Install PulseAudio
run: |
sudo apt-get update
sudo apt-get install -y pulseaudio
pulseaudio --check || pulseaudio --start
pactl load-module module-null-sink
- name: Test streaming
run: >
python3 orca_demo_streaming.py
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/python-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- 'binding/python/_util.py'
- 'binding/python/test_orca_perf.py'
- 'lib/common/**'
- 'lib/jetson/**'
- 'lib/linux/**'
- 'lib/mac/**'
- 'lib/raspberry-pi/**'
Expand All @@ -25,7 +24,6 @@ on:
- 'binding/python/_util.py'
- 'binding/python/test_orca_perf.py'
- 'lib/common/**'
- 'lib/jetson/**'
- 'lib/linux/**'
- 'lib/mac/**'
- 'lib/raspberry-pi/**'
Expand All @@ -42,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ ubuntu-latest, windows-latest, macos-latest ]
include:
- os: ubuntu-latest
proc_performance_threshold_rtf: 5.0
Expand Down Expand Up @@ -78,7 +76,7 @@ jobs:
strategy:
fail-fast: false
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson]
machine: [ rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64 ]
include:
- machine: rpi3-32
proc_performance_threshold_rtf: 1.0
Expand All @@ -90,8 +88,6 @@ jobs:
proc_performance_threshold_rtf: 2.0
- machine: rpi5-64
proc_performance_threshold_rtf: 2.0
- machine: jetson
proc_performance_threshold_rtf: 2.0

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- 'binding/python/**'
- '!binding/python/README.md'
- 'lib/common/**'
- 'lib/jetson/**'
- 'lib/linux/**'
- 'lib/mac/**'
- 'lib/raspberry-pi/**'
Expand All @@ -22,7 +21,6 @@ on:
- 'binding/python/**'
- '!binding/python/README.md'
- 'lib/common/**'
- 'lib/jetson/**'
- 'lib/linux/**'
- 'lib/mac/**'
- 'lib/raspberry-pi/**'
Expand Down Expand Up @@ -64,7 +62,7 @@ jobs:

strategy:
matrix:
machine: [ rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson ]
machine: [ rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64 ]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "demo/c/dr_libs"]
path = demo/c/dr_libs
url = ../../mackron/dr_libs.git
url = ../../mackron/dr_libs.git
2 changes: 1 addition & 1 deletion demo/c/orca_demo_streaming.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,4 +620,4 @@ int32_t main(int argc, char *argv[]) {
#endif

return result;
}
}
2 changes: 1 addition & 1 deletion demo/python/orca_demo_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def main() -> None:
speaker = PvSpeaker(sample_rate=orca.sample_rate, bits_per_sample=16, buffer_size_secs=buffer_size_secs,
device_index=audio_device_index)
speaker.start()
except ValueError:
except RuntimeError or ValueError:
print(
"\nWarning: Failed to initialize PvSpeaker. Orca will still generate PCM data, but it will not be played.\n")

Expand Down
3 changes: 3 additions & 0 deletions resources/.lint/spell-check/dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ btns
Btns
pltf
usleep
pvspeaker
popleft
appendleft

0 comments on commit 74b80b9

Please sign in to comment.