otherroch/anytran

Python application used to translate multi language text input and voice from various sources into multi language text or voice output

0

stars

181

commits

Python

primary language

May 10, 2026

updated

README

Quick start

  • Clone from GitHub

    • git clone https://github.com/otherroch/anytran.git
  • cd anytran

  • Install system prerequisites

    • python, ffmpeg and other audio packages
    • sudo ./install_pkg.sh
  • Create python 3.12 environment using venv

    • python3.12 -m venv .venv on Linux/Mac

    OR

    • py -3.12 -m venv .venv on Windows
  • alternatively create python 3.12 environment using conda

    • conda create -n anytran python=3.12

      (specify a name and python version)

  • Activate the environment

    • source .venv/bin/activate or . .venv/bin/activate on Linux/Mac

    • .venv\Scripts\activate on Windows

      OR

    • conda activate anytran

  • Install all features

    • may require python -m pip install -U pip
    • pip install --group all -e .
  • For individual feature installs, GPU support, or Linux system prerequisites, see the installation section

Run

Examples:

  • RTSP:
    • anytran --rtsp rtsp://... --scribe-text transcript.txt
  • System output (Windows):
    • anytran --from-output --scribe-text transcript.txt
  • Web server:
    • anytran --web --scribe-text transcript.txt
  • YouTube:
    • anytran --youtube-url https://... --youtube-api-key YOUR_KEY --scribe-text transcript.txt
  • Translate to French (text):
    • anytran --rtsp rtsp://... --output-lang fr --slate-text french.txt
  • Translate to French (voice):
    • anytran --from-output --output-lang fr --slate-voice
  • File input (audio):
    • anytran --input sample.wav --scribe-text transcript.txt
  • File input (audio -> translate):
    • anytran --input sample.wav --output-lang fr --slate-text french.txt
  • File input (text -> translate):
    • anytran --input notes.txt --input-lang en --output-lang es --slate-text spanish.txt
  • File input (text -> translate, local AI backend):
    • anytran --input notes.txt --input-lang en --output-lang fr --slate-text french.txt --slate-backend marianmt
  • Generate voice table (for voice matching):
    • anytran --voice-table-gen --voice-table-lang fr,en

Timing summaries

  • anytran --input sample.wav --timers # Print timing summary by stage
  • anytran --input sample.wav --timers-all # Print all timing summaries (full, by stage, overhead)

Documentation

For a complete reference of all command line options and how they interact with each other, see:

Additional topic guides:

  • Installation — CUDA GPU support, individual feature installs, and Linux system prerequisites
  • Text Translation Backends — details on all translation backends (googletrans, libretranslate, MarianMT, MetaNLLB, TranslateGemma, Gemma 4)
  • Gemma 4 Setup — guide for using Google's Gemma 4 multimodal model for transcription and translation
  • TranslateGemma Setup — guide for using Google's local TranslateGemma AI model
  • TTS Backends — details on all voice synthesis backends (gtts, piper, custom/Qwen3-TTS, fish-speech, IndexTTS)
  • Voice Matching — auto-matching voice features
  • Loop Translation (looptran) — iterative back-translation with --looptran and --tran-converge

License

This project is licensed under the Apache License 2.0.

Contributors

Copilot

102 commits

otherroch

79 commits

otherroch/anytran

Python application used to translate multi language text input and voice from various sources into multi language text or voice output

0

stars

181

commits

Python

primary language

May 10, 2026

updated

README

Quick start

  • Clone from GitHub

    • git clone https://github.com/otherroch/anytran.git
  • cd anytran

  • Install system prerequisites

    • python, ffmpeg and other audio packages
    • sudo ./install_pkg.sh
  • Create python 3.12 environment using venv

    • python3.12 -m venv .venv on Linux/Mac

    OR

    • py -3.12 -m venv .venv on Windows
  • alternatively create python 3.12 environment using conda

    • conda create -n anytran python=3.12

      (specify a name and python version)

  • Activate the environment

    • source .venv/bin/activate or . .venv/bin/activate on Linux/Mac

    • .venv\Scripts\activate on Windows

      OR

    • conda activate anytran

  • Install all features

    • may require python -m pip install -U pip
    • pip install --group all -e .
  • For individual feature installs, GPU support, or Linux system prerequisites, see the installation section

Run

Examples:

  • RTSP:
    • anytran --rtsp rtsp://... --scribe-text transcript.txt
  • System output (Windows):
    • anytran --from-output --scribe-text transcript.txt
  • Web server:
    • anytran --web --scribe-text transcript.txt
  • YouTube:
    • anytran --youtube-url https://... --youtube-api-key YOUR_KEY --scribe-text transcript.txt
  • Translate to French (text):
    • anytran --rtsp rtsp://... --output-lang fr --slate-text french.txt
  • Translate to French (voice):
    • anytran --from-output --output-lang fr --slate-voice
  • File input (audio):
    • anytran --input sample.wav --scribe-text transcript.txt
  • File input (audio -> translate):
    • anytran --input sample.wav --output-lang fr --slate-text french.txt
  • File input (text -> translate):
    • anytran --input notes.txt --input-lang en --output-lang es --slate-text spanish.txt
  • File input (text -> translate, local AI backend):
    • anytran --input notes.txt --input-lang en --output-lang fr --slate-text french.txt --slate-backend marianmt
  • Generate voice table (for voice matching):
    • anytran --voice-table-gen --voice-table-lang fr,en

Timing summaries

  • anytran --input sample.wav --timers # Print timing summary by stage
  • anytran --input sample.wav --timers-all # Print all timing summaries (full, by stage, overhead)

Documentation

For a complete reference of all command line options and how they interact with each other, see:

Additional topic guides:

  • Installation — CUDA GPU support, individual feature installs, and Linux system prerequisites
  • Text Translation Backends — details on all translation backends (googletrans, libretranslate, MarianMT, MetaNLLB, TranslateGemma, Gemma 4)
  • Gemma 4 Setup — guide for using Google's Gemma 4 multimodal model for transcription and translation
  • TranslateGemma Setup — guide for using Google's local TranslateGemma AI model
  • TTS Backends — details on all voice synthesis backends (gtts, piper, custom/Qwen3-TTS, fish-speech, IndexTTS)
  • Voice Matching — auto-matching voice features
  • Loop Translation (looptran) — iterative back-translation with --looptran and --tran-converge

License

This project is licensed under the Apache License 2.0.

Contributors

Copilot

102 commits

otherroch

79 commits

Languages

Python

99.6%