This guide explains how to set up and run the fully open-source, locally-run MediaTranslator application which requires no cloud services.
- Java JDK 21 or higher
- Maven for dependency management
- FFmpeg (for audio extraction and processing)
- Ollama (for LLM capabilities) - https://ollama.com
- OpenAI Whisper locally installed:
- Install
whisper.cpp:- Clone from https://github.com/ggerganov/whisper.cpp
- In the directory, run
make - Download a model, e.g.
sh ./models/download-ggml-model.sh large-v3-turbo-q8_0
- Install
- eSpeak:
sudo apt-get install espeak(Linux) - Pico2Wave:
sudo apt-get install libttspico-utils(Linux) - Mac's built-in 'say' command (MacOS only)
- Python pyttsx3:
pip install pyttsx3
- Install Ollama from https://ollama.com
- Pull a model for translation and text enhancement:
ollama pull mistral # Basic, fast model ollama pull llama3 # Alternative option ollama pull mixtral # More capable for complex tasks - Ensure the Ollama service is running before using the application
- Check the model is available:
ollama list
mvn clean package
java -jar target/media-translator-1.0-SNAPSHOT.jar
- Create a settings file
settings.properties, based onsrc/main/resources/settings-example.properties - Run the application
- The application will process the file and generate the translated audio
- Make sure either whisper.cpp is properly installed
- The application will try multiple TTS options in order
- If using pyttsx3, ensure you have compatible voices installed for your target language
- Check that the Ollama service is running on http://localhost:11434
- Verify you have pulled the model you're trying to use
The application supports translation between any language that Ollama models can handle. Speech synthesis capabilities may vary depending on your chosen TTS system, but commonly supported languages include:
- English (en)
- Spanish (es)
- French (fr)
- German (de)
- Italian (it)
- Portuguese (pt)
- Russian (ru)
- Chinese (zh)
- Japanese (ja)
To add more language support for Text-to-Speech, install additional language packs for your chosen TTS system.