Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| dcc:itsol:whisper:scripts [2024/08/07 13:22] – moved content from LibGuides to wiki giulio | dcc:itsol:whisper:scripts [2025/10/30 13:37] (current) – deleted page giulio | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{indexmenu_n> | ||
| - | ===== Building the scripts ===== | ||
| - | We will **run Whisper using a script** in order to facilitate the use of the tool. Follow the steps here to set up the script and run it, read the next section of the guide to learn more about the content of the script file itself. | ||
| - | |||
| - | In order to run the script, you will first have to create it. Open your text editor of choice and copy the highlighted code below into the new file. Save the file with the name: | ||
| - | |||
| - | |||
| - | ---- | ||
| - | |||
| - | ---- | ||
| - | |||
| - | |||
| - | ''# | ||
| - | |||
| - | ''# | ||
| - | |||
| - | ''# | ||
| - | |||
| - | ''# | ||
| - | |||
| - | \\ | ||
| - | |||
| - | '' | ||
| - | |||
| - | '' | ||
| - | |||
| - | '' | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ---- | ||
| - | |||
| - | |||
| - | **You can now close the editor**. | ||
| - | |||
| - | The example below uses the '' | ||
| - | |||
| - |   * Type or copy '' | ||
| - |   * Press the " | ||
| - |   * Click on the terminal with the mouse wheel to paste the content of the script into the file. If you see the message in the figure displayed, click " | ||
| - | * Double-check that the content of the script is correct. If it is, it should look exactly like in the picture below. | ||
| - |   * **Note**: The colors displayed are also important, because it means that the editor recognizes the words in the text as script commands. {{ : | ||
| - |   * Finally, to save the file and exit from '' | ||
| - |   * If you want to make sure that the script has been saved, type '' | ||
| - | |||
| - | ==== Content of the batch script ==== | ||
| - | |||
| - | The **batch script** you created **is the starting point for all your jobs relating to Whisper**. Below is a brief explanation of the different lines present in the file. Please read the next steps carefully if you wish to modify the content of the script. For convenience' | ||
| - | |||
| - | ++++ Click to display | | ||
| - |   * ''# | ||
| - | |||
| - | This first line is used to tell the cluster what it should use to interpret/ | ||
| - | |||
| - | \\ | ||
| - | |||
| - | The next three lines specify certain parameters for the batch script: | ||
| - | |||
| - |   * ''# | ||
| - | |||
| - | This line specifies the maximum time your job will run on the cluster. The format is '' | ||
| - | |||
| - |   * ''# | ||
| - | |||
| - | This line tells the cluster that the script is asking for 1 GPU to be allocated to this job. For Whisper, 1 GPU is more than enough to run the transcription, | ||
| - | |||
| - |   * ''# | ||
| - | |||
| - | This line specifies the amount of Memory/RAM asked for this job. In the default case, the script asks for 16GB of RAM to be allocated. | ||
| - | |||
| - | \\ | ||
| - | |||
| - | The next two lines make sure that the virtual environment and the dependencies that Whisper needs to run are correctly loaded: | ||
| - | |||
| - |   * '' | ||
| - | |||
| - | This line loads the program packages that Whisper needs to run. Please be sure to not modify it, otherwise the script is not going to load the correct dependencies. | ||
| - | |||
| - |   * '' | ||
| - | |||
| - | This line activates the virtual environment for Whisper. As it is part of the script, you won't have to deactivate the environment once the script is launched. Once again, leave this part of the script unchanged. | ||
| - | |||
| - | Finally, the last line is the actual command to run Whisper: | ||
| - | |||
| - |   * '' | ||
| - | |||
| - | If you wish to modify the location of the input audio, then you need to specify its '' | ||
| - | |||
| - | ++++ | ||
| - | |||
| - | [[dcc: | ||