Norwegian version of this page

Whisper in TSD

Here is the recipe for how to transcribe using Whisper in TSD.

1. The TSD project in question must already have access to the HPC cluster Colossus. The PI of the project can request access to Colossus by emailing tsd-drift@usit.uio.no with the relevant project number.

2. Login to your project, choose your preferred VM (Windows or Linux) and connect to the server "pxxxx-submit" (xxxx is substituted by the relevant project number) using one of the two following methods:

1. Windows: Open the program named "PuTTY" and type "pxxxx-submit" in the field named "Host Name (or IP address)". Then click "Open".
A new window will open saying "login as:". Type your TSD username and then hit "Enter". Then, input your password (NB! You will not see any indication that you're typing) and hit "Enter".

2. Linux: Open "Terminal" and type "ssh pxxxx-submit" before hitting "Enter". Input your TSD password (NB! You will not see any indication that you're typing) and hit "Enter".

You should now be connected successfully.

3. NB! THE FOLLOWING STEP SHOULD ONLY BE DONE ONCE!
IF THE FOLDER "whisper" ALREADY EXISTS, THIS STEP IS UNNECESSARY.

Copy the Whisper software to a folder under /durable, where everyone in the project can access it. Perform the following two commands:

cd /tsd/pxxxx/data/durable

(Remember to substitute the xxxx with the relevant project number)

cp -rp /shared/software/whisper/ .

Make sure to share the folder with the others in the project by running the following command

chmod -R 774 whisper 

 

4. Make sure the audio files you want to transcribe are located in the folder at the following location: "pxxxx/data/durable/whisper/data/". Easiest way to move files here is through "File Explorer" (Windows) or "Files" (Linux).
NB! File names may only contain legal characters and no spaces.

5. Run the script starting the transcription job from inside the Whisper folder issuing the following two commands:

cd /tsd/pxxxx/data/durable/whisper

(Remember to substitute the xxxx with the relevant project number)

./transcribe_data

You should receive a confirmation that a job was started, with the relevant job ID.

6. You will find the transcribed files in the same folder as your audio/video files (pxxxx/data/durable/whisper/data/) as soon as the transcription is finished.
Remember to empty the data folder before transcribing other files!

See instructional video

This video is subtitled with Whisper both with NOR and EN as parameters, and then the following files came out (which I have exported from TSD) (also note that the Audio in this video is in Norwegian)

 

You can change the subtitles yourself or turn it off. This film is subtitled without being edited afterwards. I used Whisper to translate by changing whisper.sm.

Advanced settings

You can make changes yourself in the file 'Whisper.sm'. This can be relevant when the recordings are longer than 20 minutes or if you want the transcription to be translated.

Here are 2 things you can change:

  1. LANGUAGE=en
    - If you change this to from "no" to "en", you will automatically have the transcription translated (!).
  2. #SBATCH --time=00:20:00
    - if you have large files, you must increase this from 20 min, otherwise you will get a timeout.

Remember to save the file before running the script again.

?pne gjerne med Notepad++
Feel free to open with Notepad++

 

 

By Dagfinn Bergsager
Published Feb. 1, 2023 1:43 PM - Last modified Apr. 9, 2024 11:16 AM