Skip to content

roman01la/sub-deep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transcribe audio and translate transcribed subtitles using WhisperX running on JarvisLabs.ai for $0.49/hr and DeepL API. Takes 2-3 minutes of compute time to transcribe a short clip.

Usage

  1. Add your SSH key to your JarvisLabs.ai account at https://cloud.jarvislabs.ai/listsshkeys

  2. Create .env file with the following content

DEEPL_KEY={your deepl.com API key}
JARVISLABS_KEY={your jarvislabs.ai API key}
JARVISLABS_UID={your jarvislabs.ai email address}
  1. Install deps and run the script. This will spin up a small instance, upload audio file, transcribe it, download back and call DeepL API to translate subtitles.
yarn # install deps

# transcribe and translate
./transcribe.js audio.wav ./subs.srt uk en /path/to/id_rsa ssh-passphrase

CLI arguments in order:

  1. WAV file
  2. relative path to output file for SRT subtitles
  3. Input language in the audio file
  4. Output language for translated subtitles (will be saved on disk with _{lang} suffix in the filename)
  5. Absolute path to your private SSH key
  6. A pass phrase for your private key

You can retreive WAV audio from video file using ffmpeg

ffmpeg -i video.mp4 -vn -ac 1 audio.wav

If you find this tool useful — consider endorcing my work with a small donation

About

Transcribe and translate audio with AI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published