
Deploy Ultimate Voice Cloner | (Just Updated) 4GB CPU Voice Cloning, MOSS-TTS, Answers Cold
Zero-shot voice cloning on CPU, MOSS-TTS-Nano. One POST route, key-gated
voice-cloner
Just deployed
Deploy and Host Ultimate Voice Cloner on Railway
Ultimate Voice Cloner does one thing: you POST a short reference clip of a voice plus some text, and it returns a WAV of that text spoken in that voice. There is no voice menu, no transcription, no model picker and no second endpoint — one route, key-gated, with every model weight already inside the image.
About Hosting Ultimate Voice Cloner
The model is MOSS-TTS-Nano, the 0.1B-parameter member of the OpenMOSS MOSS-TTS family, paired with MOSS-Audio-Tokenizer-Nano. Both are Apache-2.0, so commercial use is allowed — which is why the two better-known zero-shot cloners are not in here. XTTS-v2 ships under the Coqui Public Model License (non-commercial), and F5-TTS has MIT code but CC-BY-NC-4.0 checkpoints; the licence that binds is the one on the weights, and handing a one-click deploy of either to strangers would be handing them a problem.
MOSS-TTS-Nano is the smallest checkpoint in its family — the flagship MOSS-TTS is 8B parameters and 17 GB of weights — and zero-shot cloning from a reference clip is its primary documented workflow rather than a side capability. It runs on CPU through OpenMOSS's own ONNX Runtime stack, so there is no GPU anywhere in this template and no PyTorch in the image.
Every weight is baked in at build time. Nothing is fetched from Hugging Face at boot. That matters more than it sounds: templates that download weights on first use either serve errors until the download finishes or get killed outright by Railway's healthcheck timeout. Measured here, the container is healthy about 11 seconds after start with the model loaded and the clone path warmed, and the very first request after a cold deploy is answered — measured live on Railway at HTTP 200 in 14.5 seconds wall clock, not a timeout.
API_KEY is generated for you and the service refuses to start without it.
An unauthenticated speech endpoint on a public URL is CPU-bound work anyone who
finds the URL can spend on your account, so failing closed is the only sane
default.
The entrypoint also sizes the inference thread pool from /sys/fs/cgroup/cpu.max
rather than nproc. Containers report the host's core count instead of their own
share — on Railway this service sees 32 cores and is given 8 — so an inference
container that trusts nproc starts four times more threads than it has CPU for.
RAM floor: 4 GB. Measured serving 8 of 8 consecutive requests at
--memory 4g with a flat 2.03 GB resident, and OOM-killed at 3 GB (exit 137,
which is the error Railway shows you nothing useful about). Railway's Trial cap
is 1 GB per service and Free is 0.5 GB, so this needs Hobby or better.
It is slower than real time, and that is the honest number. On Railway's 8 vCPU share the measured real-time factor is 1.5-1.8 — roughly 11 seconds of compute for 7 seconds of speech. A 0.1B autoregressive model on a CPU share does not beat real time, and if you need it to, you need a GPU and a different template. What you get instead is an 11-second cold start and a first request that works.
Cloning fidelity, measured rather than claimed, as cosine similarity between
speaker embeddings (Resemblyzer VoiceEncoder) with a 13.3-second reference:
| Pair | Similarity |
|---|---|
| output vs reference voice | 0.917 |
| untouched base voice vs reference voice | 0.589 |
| output vs untouched base voice | 0.570 |
The output moves from 0.59 to 0.92 similarity with the target speaker and away from the base voice. That is the clone working.
Why Deploy Ultimate Voice Cloner
- One route, so there is one thing to secure.
POST /v1/cloneand aGET /healthfor Railway. Nothing else is exposed. - The first request works. Weights baked in, and
/healthstays 503 until the clone path is warm — including the codec encoder, which only the clone path touches and which a naive warmup misses. - Permissive licence end to end. Apache-2.0 weights, so whatever you build on top is yours to sell.
- No volume, no database, no second service. Stateless, so it bills you for compute and nothing else.
- Reference clips can be whatever your users recorded. wav, mp3, m4a, flac and ogg are all decoded; 3-30 seconds of clean speech is the sweet spot.
- 20 languages, 48 kHz stereo output.
Common Use Cases
- Narrating your own content in your own voice without re-recording it
- Consistent character voices for games, audio drama and video
- Accessibility: giving a personal voice back to text-to-speech
- Localised voiceover that keeps the original speaker's timbre
Dependencies for Ultimate Voice Cloner Hosting
None. Single service, no database, no volume, no external API.
Deployment Dependencies
- MOSS-TTS-Nano — Apache-2.0
- MOSS-TTS-Nano-100M-ONNX weights — Apache-2.0
- MOSS-Audio-Tokenizer-Nano-ONNX weights — Apache-2.0
- Source for this image — MIT
Implementation Details
curl -X POST https://.up.railway.app/v1/clone \
-H "Authorization: Bearer $API_KEY" \
-F reference=@my-voice.mp3 \
-F text="Hello from a voice that did not record this sentence." \
-o cloned.wav
Responses carry X-Audio-Seconds, X-Generation-Seconds and
X-Real-Time-Factor so you can measure your own share rather than trust this
page. A missing or wrong key gets 401. Requests over MAX_TEXT_CHARS (default
1200) get 413.
Template Content
voice-cloner
ghcr.io/bon5co/voice-cloner-railway