Skip to content

Commit

Permalink
Add script to download whisperx models
Browse files Browse the repository at this point in the history
  • Loading branch information
philmcmahon committed Jan 21, 2025
1 parent 66090cd commit f7b8e7b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions roles/whisperx/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,26 @@
name: whisperx
executable: pip3

- name: Install dependencies needed for downloading models
pip:
name:
- huggingface_hub
- typer
executable: pip3

- name: Download model fetch script
get_url:
url: "https://raw.githubusercontent.com/guardian/transcription-service/refs/heads/add-whisperx-support/scripts/download_whisperx_models.py"
dest: "/tmp/download_whisperx_models.py"
mode: "0755"

- name: Download whisperx models
command: "python3 /tmp/download_whisperx_models.py --whisper-models --diarization-models --torch-align-models --huggingface-token {{ huggingface_token }}"

- name: Remove download script dependencies
pip:
name:
- huggingface_hub
- typer
state: absent
executable: pip3

0 comments on commit f7b8e7b

Please sign in to comment.