Test PyPi #161
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test PyPi | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["publish-pypi-wheels"] | |
branches: [main] | |
types: | |
- completed | |
schedule: | |
- cron: '0 18 * * 0' | |
jobs: | |
test-df-output: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["3.9"] | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
# Python and poetry install | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
cache: 'pip' | |
cache-dependency-path: '**/requirements.txt' | |
python-version: ${{ matrix.python }} | |
- name: Update PATH | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Update Path for Windows and Windows Deps | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH | |
pip install soundfile | |
pip install msvc-runtime | |
- name: Install DeepFilterNet and Deps | |
run: | | |
pip install torch torchaudio --extra-index-url https://download.pytorch.org/whl/cpu | |
pip install deepfilternet onnxruntime | |
pip install -r DeepFilterNet/requirements_eval.txt | |
pip install -r DeepFilterNet/requirements_dnsmos.txt | |
# Test deepFilter executable | |
- name: Test deepFilter script | |
working-directory: DeepFilterNet | |
env: | |
DNS_AUTH_KEY: ${{ secrets.DNS_AUTH_KEY }} | |
run: | | |
mkdir ../out | |
python -c "import torch, torchaudio; print(torch.__version__); print(torchaudio.__version__)" | |
deepFilter --no-delay-compensation ../assets/noisy_snr0.wav -m DeepFilterNet -o ../out | |
deepFilter --no-delay-compensation ../assets/noisy_snr0.wav -m DeepFilterNet2 -o ../out | |
deepFilter --no-delay-compensation ../assets/noisy_snr0.wav -m DeepFilterNet3 -o ../out | |
python df/scripts/dnsmos_dns5.py eval-sample ../assets/noisy_snr0.wav -t 3.604316132288559 2.682694789493083 2.58449544791776 2.981942 | |
python df/scripts/dnsmos_dns5.py eval-sample ../out/noisy_snr0_DeepFilterNet.wav -t 3.347275035532741 4.0226200060870045 3.0721500373065647 3.6992884 | |
python df/scripts/dnsmos_dns5.py eval-sample ../out/noisy_snr0_DeepFilterNet2.wav -t 3.356522067484457 4.094995405584476 3.1071521784172025 3.737621 | |
python df/scripts/dnsmos_dns5.py eval-sample ../out/noisy_snr0_DeepFilterNet3.wav -t 3.4399468223627174 4.144957235621709 3.2074756563112996 3.7088842 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: enhanced-${{ runner.os }} | |
path: out/*wav |