Skip to content

feat: add speech-brain-asr-whisper-large-v2-commonvoice-fa #87

feat: add speech-brain-asr-whisper-large-v2-commonvoice-fa

feat: add speech-brain-asr-whisper-large-v2-commonvoice-fa #87

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Run ASR model benchmark
on:
workflow_dispatch:
pull_request:
push:
branches:
- next
jobs:
benchmark:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- path: wav2vec2-large-xlsr-persian-v3
- path: nemo
- path: whisper-large-v3
- path: speech-brain-asr-whisper-large-v2-commonvoice-fa
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install ffmpeg
run: |
sudo apt-get install -y ffmpeg
- name: Install dependencies
run: pip3 install -r ${{ matrix.path }}/requirements.txt
- name: Run Python script to transcript and generate report
id: benchmark_run
run: |
cd ${{ matrix.path }}
python main.py
- name: Generate comment
run: |
cd ${{ matrix.path }}
report=$(cat result.json | jq -r '[.transcription, .werBeforeNormalization, .normalizedTranscription, .werAfterNormalization] | @csv')
echo "## ASR Benchmark Report for ${{ matrix.path }}" >> $GITHUB_STEP_SUMMARY
echo "| Transcription | WER Before Normalization | Normalized Transcription | WER After Normalization |" >> $GITHUB_STEP_SUMMARY
echo "|---|---|---|---|" >> $GITHUB_STEP_SUMMARY
echo "$report" | awk -F, '{print "| " $1 " | " $2 " | " $3 " | " $4 " |"}' >> $GITHUB_STEP_SUMMARY