Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dcc:itsol:whisper:setup [2024/08/07 12:52] – moved content from libguides to wiki giuliodcc:itsol:whisper:setup [2025/10/30 13:39] (current) – ran spell- and grammar check giulio
Line 1: Line 1:
 {{indexmenu_n>1}} {{indexmenu_n>1}}
-===== Tool setup and installation =====+===== Initial Setup =====
  
-==== Setting up on the VRW and HPC ====+==== Setting up on HPC using the portal ====
  
-The guide below will take you through some basic steps to start running automatic transcription jobs on the high performance computing cluster from a Windows computer. In short it entails:+The guide below will take you through some basic steps to start running automatic transcription jobs on the High Performance Computing (HPC) cluster from a Windows computer. Before you can get started with setting Whisper up, you need to first​​​ [[https://portal.hb.hpc.rug.nl/public/start.html|Request a Hábrók (HPC) account or log into the HPC portal]]
  
-  * ​​​​​​[[https://iris.service.rug.nl/tas/public/ssp/content/serviceflow?unid=84efb629e7484b728dbbf8dfef78fdad|Get a Habrok (HPC) account]] +{{ :dcc:itsol:whisper:hb_portal_1.png?direct&900 | }}
-  * [[https://mobaxterm.mobatek.net/download-home-edition.html|Install the Mobaxterm SSH client]] +
-  * [[https://wiki.hpc.rug.nl/habrok/connecting_to_the_system/windows|Connect to HPC with the Mobaxterm client]] +
-  * Create a folder “whisper_audio” in the root folder of your HPC session by inputting the following command: +
-    * ''mkdir $HOME/whisper_audio'' {{ :dcc:itsol:whisper:insta_1.png?direct&800 | }} +
-  * In the same way, you should also create an output folder in the same place by inputting: +
-    * ''mkdir $HOME/whisper_output''  +
-  * If this step of the installation succeeded, then you should be able to display the new folders in MobaXterm as shown in the figures below. {{ :dcc:itsol:whisper:insta_2.png?direct&800 | }} +
-  * You can also use the left-hand folder navigation to check if the new folders are there. {{ :dcc:itsol:whisper:insta_3.png?direct&800 | }}+
  
-==== Building the virtual environment and installing Whisper ====+Once you have an HPC account, you can navigate to the ''Files'' tab in the top menu bar and select ''/scratch/p-number''. Before we can run the script for the transcription, we need to make sure that the folders are set up correctly in your HPC environment.
  
-**NoteThis step is only needed for the first time you set up Whisper.** After you have installed the program for the first time, you can skip directly to the next part of the guide to run the program.+{{ :dcc:itsol:whisper:hb_portal_2a.png?direct&900 | }}
  
-When logged in to your session in the Mobaxterm terminalor in any other terminal, you will have a prompt where you can enter commands. In order to run Whisper, you will need to create the proper environment in your HPC session. To do socopy the grey highlighted lines below one by one into your terminal and run them separately.+In this window, you will be able to manage your files and folders in HPC. To begin withmake sure that you are in the folder with your p-number in the ''/scratch/'' partition of Hábrók. In the next steps, you will need to create a main folder for Whisper, then two subfolders for the input and output data. To create the main folderclick on ''New Directory'' as shown below. Please make sure that you write "whisper" in lower case. When the folder appears in your window, click on its name to open the next window.
  
-**Note**To copy text into the terminal, ''ctrl+V'' will not work. Use either the right mouse click, then select paste from the drop-down menu or, if you have a mouse wheel, click on the terminal with the mouse wheel to paste the text directly.+{{ :dcc:itsol:whisper:hb_portal_3.png?direct&900 | }}
  
-**Steps to follow to install whisper**:+Once inside the Whisper main folder, you need to create two subfolders. Once again, use ''New Directory'' to create each new folder. Call them "input" and "output", respectively, taking care to use lowercase letters. Do not worry if you do not see any ''.sh'' file or ''slurm'' file in your file view. They will come later.
  
-  * First, you need to load a module that whisper will need to run. To do, copy-paste the line highlighted in grey below into the terminal, as shown in the figure. +{{ :dcc:itsol:whisper:hb_portal_4.png?direct&900 | }}
-    * ''module load PyTorch/1.12.1-foss-2022a-CUDA-11.7.0'' {{ :dcc:itsol:whisper:insta_4.png?direct&800 | }} +
-  * Then you need to create the virtual environment where you will install whisper. Copy-paste the line below into the terminal. +
-    * ''python3 -m venv $HOME/.envs/whisper'' {{ :dcc:itsol:whisper:insta_5.png?direct&800 | }} +
-  * Now, activate the newly created environment, by copy-pasting the line below. +
-    * ''source $HOME/.envs/whisper/bin/activate'' {{ :dcc:itsol:whisper:insta_6.png?direct&800 | }} +
-  * Before you install whisper, you need to make sure to have the latest version of some programs. Copy the two lines below separately into the terminal, as shown in the figures: +
-    * ''pip install --upgrade pip'' {{ :dcc:itsol:whisper:insta_7.png?direct&800 | }} +
-    * ''pip install --upgrade wheel'' {{ :dcc:itsol:whisper:insta_8.png?direct&800 | }} +
-  * Finally, you can install whisper by running the command below: +
-    * ''pip install git+https://github.com/openai/whisper.git'' {{ :dcc:itsol:whisper:insta_9.png?direct&800 | }} +
-  * If everything went well, this is the screen you expect to see. {{ :dcc:itsol:whisper:insta_10.png?direct&800 | }} +
-  * As a final step, type ''deactivate'' into the terminal, then press "enter". After this initial installation, you won't be needing to manually activate the whisper environment anymore. {{ :dcc:itsol:whisper:insta_11.png?direct&800 | }} +
-  * If you wish to fully close the environment and also close the HPC session directly, type ''exit'' instead of ''deactivate''.+
  
 +==== Upload your data before launching the job ====
  
-**Note**: The version numbers displayed in this guide for the programs you have installed and upgraded reflect the most recent versions at the time this guide was writtenThe numbers might change in your case, as newer versions might have been released in the time since.+Now that you have the folder structure ready, you can upload the audio file(s) you wish to transcribeClick on the "input" folder to open its window view, then click ''Upload'' and follow the instructions to transfer your audio to the HPC environment. Please note that the example here contains a single filebut that Whisper can transcribe multiple files in the same job. Feel free to upload as many audio files as needed. The only limitation you have is that the maximum runtime of Whisper, as it is set up now, covers about 20 hours of interviews. If you need to transcribe more than this amount of time, please consider splitting the data into two separate batches and launching two separate jobs.
  
 +{{ :dcc:itsol:whisper:hb_portal_4a.png?direct&900 | }}
  
-[[dcc:itsol:whisper:scripts| → Move to the next step]]+[[dcc:itsol:whisper:running| → Move to the next step]]