https://samiailab.samas.no/abo/
This project is a real-time simultaneous translator that transcribes Northern Sámi speech into text and then translates the text into a selected target language. The solution is built with a Python backend for transcription and a web interface that handles translation, using the following services:
- Transcription (backend):
GetmanY1/wav2vec2-large-sami-cont-pt-22k-finetuned - Translation (frontend): TartuNLP Tahetorn_9B for translating Northern Sámi into various national and Sámi languages
The application can translate from Northern Sámi into the following languages:
- Norwegian
- Finnish
- Russian
- English
- Sámi languages: Northern Sámi (improved text), Southern Sámi, Lule Sámi, Inari Sámi, Skolt Sámi, Kildin Sámi, Pite Sámi, Ume Sámi
| Model | Type | Typical Use |
|---|---|---|
GetmanY1/wav2vec2-large-sami-cont-pt-22k-finetuned |
Wav2Vec2 CTC | Lightweight model trained on Sámi Parliament recordings, outputs Northern Sámi text (CTC). |
The Wav2Vec2 model requires mono PCM 16 kHz audio. The model always runs in float32.
You can easily run the project using the prebuilt Docker image from GitHub Container Registry (GHCR). This provides the correct environment for PyTorch and GPU support without manually installing Python and dependencies.
⚠️ There is also a helper script for Windows/WSL (wsl-run-transkripsjon.ps1), but it is untested/incomplete and should only be used as guidance.
Requirements:
- Docker installed on the system
- NVIDIA GPU and NVIDIA Container Toolkit installed for GPU acceleration
Command:
docker run --gpus all -p 5000:5000 ghcr.io/SamiAILab/transkripsjon-samisk-norsk:latest--gpus all: Gives the Docker container access to all NVIDIA GPUs-p 5000:5000: Exposes the web interface on port 5000
Usage:
When the container is running, open http://localhost:5000 in your browser or use your local IP address from other devices on the network.
git clone https://github.com/SamiAILab/transkripsjon-samisk-norsk.git
cd transkripsjon-samisk-norskThe image is configured for NVIDIA GPUs and includes PyTorch with CUDA support.
docker build -t transkripsjon-samisk-norsk .docker run --gpus all -p 5000:5000 transkripsjon-samisk-norskRequirements:
- Python 3.8+
- ffmpeg installed and available in PATH:
- Ubuntu/Debian:
sudo apt install ffmpeg - macOS:
brew install ffmpeg - Windows: Download from ffmpeg.org and add it to PATH
- Ubuntu/Debian:
- CUDA-compatible GPU (recommended): CPU execution is supported but significantly slower.
- Internet connection: Required for translation through the TartuNLP API
Steps:
-
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate
-
Install PyTorch for NVIDIA GPU:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu129
-
Install remaining dependencies:
pip install -r requirements.txt
-
Start the server:
python main.py
The server starts and loads the models. This may take some time. Once ready, it listens on
http://0.0.0.0:5000.
- Same machine: Open a browser and go to http://localhost:5000
- Another device on the network: Find the server IP address (for example
192.168.1.123) and openhttp://YUOR_IP_ADDRESS:5000
Usage:
- Click «Start recording» and allow microphone access in the browser.
- Speak Northern Sámi. The transcribed Northern Sámi text appears in the left box, and the translation follows shortly after in the right box.
- Select target language from the dropdown menu (visible when “Translation” or “Both” is selected).
- Use the buttons «Transcription», «Translation» og «Both» to choose which text boxes are displayed.
- Click «Stop recording» to finish.
- Backend (Python): Handles audio streaming, speech recognition via Wav2Vec2, Voice Activity Detection (VAD) and punctuation restoration
- Frontend (JavaScript): Receives transcribed text and calls the TartuNLP Tahetorn_9B to translate into the selected language
- API: TartuNLP Tahetorn_9B provides free machine translation between Northern Sámi and other Sámi languages as well as some national languages
- Missing GPU/driver errors: Verify that NVIDIA drivers and NVIDIA Container Toolkit are correctly installed.
- CUDA version mismatch: Docker image was built with CUDA 12.9 your device might have an older version. Downgrade to a known, stable CUDA version in the Docker image.
- CPU fallback is supported, but performance is significantly lower with large models.
- Translation not working: Check your internet connection, since translation requires access to the TartuNLP API.
- Transcription: GetmanY1/wav2vec2-large-sami-cont-pt-22k-finetuned
- Translation: TartuNLP Tahetorn_9B
- Voice Activity Detection: Silero VAD
- Punctuation Restoration: Stanza NLP
- Original repository: Tarjei Bitustøyl