Skip to content

Update main.py

Update main.py #26

Workflow file for this run

name: Convert Audio to MakeCode
on:
push:
paths:
- "audio/**"
- "main.py"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install numpy scipy
- name: Create output folder
run: mkdir -p output
- name: Convert all WAV files to MakeCode
run: |
for file in audio/*.wav; do
[ -f "$file" ] || continue
base=$(basename "$file" .wav)
python main.py -i "$file" -o "output/${base}.ts"
done
- name: Commit and push generated files
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add output/*.ts
git commit -m "Auto-generate MakeCode audio files" || echo "No changes to commit"
git push --force