Translates English text from a string to another language using SmolLM3, then speaks the translations using Piper1-gpl
Install Ollama by following instructions here: https://ollama.com/download
Create local Ollama LLM instance for SmolLM3 with this command:
ollama create translator-smollm3 -f SmolLM3.modelfile
Create and activate a python virtual environment with:
python -m venv translator_venv
source translator_venv/bin/activateInstall python dependencies
pip install -r requirements.txtDownload the voices using the helper script
./download_voices.shusage: Translator [-h] [-l LANGUAGE] [-r] [-t] [input]
Translates a word or phrase from english to another language and then speak the translation.
positional arguments: input
options: -h, --help show this help message and exit -l LANGUAGE, --language LANGUAGE -r, --replay -t, --history
Made with: SmolLM3 & Piper1-gpl