stas-server is an alternative standalone translation server for Sugoi Translator.
stas-server name is an abbreviation of Sugoi Translator Alternative Standalone Server.
Not affiliated with Sugoi Translator.
The project is in active development.
- Async server (bottle.py with tornado)
- Multiline support
- Newlines support
- Batch support
- Only translate Japanese
-
Access-Control-Allow-Private-Network
header - XUAT Placeholder support
- CUDA support (Tested)
- Detailed documentation
- Cache support when running (Reset on Server Shutdown)
- V8 and above models directory support
- Sugoi Japanese Toolkit from MingShiba. If you are using a version lower than V7, you need to apply CudaInstallForToolKit from the Sugoi Translator Discord. Starting from V8, ct2Model is available by default. Make sure to note the path to the models folder.
For V8 and above, the usual path is
[EXTRACTEDFOLDER]/Code/backendServer/Program-Backend/Sugoi-Japanese-Translator/offlineTranslation/models
.
For V7 and below using CudaInstallForToolKit (you need to run this first), the usual path is[EXTRACTEDFOLDER]/Code/backendServer/Program-Backend/Sugoi-Japanese-Translator/offlineTranslation/ct2
. Inside thect2
folder,ct2_models
needs to be renamed toct2Model
.
- Python 3.12 recommended. For Python 3.13, you absolutely need to use my Python Package Index. Python 3.14 and above are still not supported.
This project is not intended as a library, so installation through uv
is recommended.
It is recommended to use my Python Package Index for as shown as below to install this package.
You can also directly download the wheel in the Releases and install the package.
uv tool install stas-server --index https://mddanish00.github.io/python-index/simple
uv tool upgrade stas-server
Usage: stas-server [OPTIONS] [PORT]
Run stas-server, an alternative standalone translation server for Sugoi
Translator.
Options:
-v, --version Show the version and exit.
--cuda Enable CUDA.
--no-cache Disable cache.
--models_dir DIRECTORY Path to models folder. [required]
-h, --help Show this message and exit.
Name | Default | Description |
---|---|---|
port | 14366 |
Port of the server. |
cuda | false |
Enable CUDA support. |
models_dir | ./models |
Path to models directory. By default, the program will use the folder named models in the current working directory. |
This project is developed using the latest Python and managed by uv.
To start developing for this project, make sure to install uv. It will automatically download uv-managed Python if your system Python is not 3.13. It will not clash with your system Python because it is only used for this project.
Refer to uv official docs for the installation instructions.
You need to make sure install ICU if in Linux yourself. For Windows, you need to use my python index to install PyICU.
Initialise the virtual environment and install dependencies.
uv sync
Launch and test the server.
uv run stas-server
Build the project wheel.
uv build --wheel
This project is licensed under the MIT license.
- Thanks to MingShiba for creating the Sugoi Japanese Toolkit and making high-quality (still machine translation) available to enjoy many untranslated Japanese works.
- Thanks to Tenerezza and bimbmsm on Sugoi Toolkit Discord for CudaInstallForToolKit script for adding CT2 support. Some of the code is based on the included CT2 multiline server script.
- Thanks to Vin-meido for Sugoi Translator XUAT support. Some of the code is based on the included server.py.