Fiction or Non-Fiction, academic or casual, theory or non-theory, feel free to mention books of any genre and on any topic.

Previous week’s thread.

  • Makan@lemmygrad.mlM
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 month ago

    Wait

    Wait wait wait…

    This does translation from English into Spanish?!

    For subtitles in a video, correct?

    Hopefully, I am following this convo along well enough.

    Anyway, a translation tool, preferably one I don’t really have to pay for, is what I want for my YouTube and TikTok channels, and one that can put subtitles I the video and put the subtitles or lines basically where they should be as the video goes along lol

    • CriticalResist8@lemmygrad.ml
      link
      fedilink
      arrow-up
      6
      ·
      1 month ago

      yep, it does everything.

      stt transcribe 'file.mp4' --target-lang es,fr,pt,jp --format srt will transcribe the audio from the video (auto-detects language), then translate the result into their own .srt (subtitles) files. You can chain arguments together such as es,fr,pt,jp -> it will create a different file for each combination. so one .srt for spanish, one .srt for french, etc.

      stt translate 'file.txt' --source-lang en --target-lang --format txt,srt will only translate a previously existing text file. you can chain --format (or any argument, including the input files) to output the translation as plain text file, and another .srt file

      if you have pandoc and yt-dlp installed, the app integrates with them to provide more input and output formats with pandoc, and yt-dlp to download the video automatically from a web page (so instead of ‘file.mp4’ you can provide a youtube link). It automatically uses them, you don’t have to do anything special.

      it also needs python 3.10 or higher and ffmpeg to work. It downloads the models on first use, expect about 5-10 gigabytes of download. Needs I would say around 4GB of Vram at the minimum to work.

      translation can be hit or miss in terms of quality, some language pairs work better than others. If it’s bad, just open deepseek web, switch to expert, paste the original subtitles, and tell it to ‘translate these subtitles to [language], output within three backticks for code formatting’.