# MOSS-TTS-Nano-API

MOSS-TTS-Nano-API is a self-hosted ai app. OpenAI-compatible text-to-speech (TTS) API server wrapping the lightweight MOSS-TTS-Nano model (100M parameters, Fudan OpenMOSS), delivering 48 kHz stereo audio across 20 languages with voice cloning. It is open source and self-hosted, installable on Unraid.

Canonical page: https://ourlocalhost.com/app/3073/moss-tts-nano-api

## Description

OpenAI-compatible text-to-speech (TTS) API server wrapping the lightweight MOSS-TTS-Nano model (100M parameters, Fudan OpenMOSS), delivering 48 kHz stereo audio across 20 languages with voice cloning. Designed for resource-constrained homelab hosts, it runs on CPU or GPU and can share GPU resources with other AI services without conflict.

## Platform availability

Available on 1 of 10 platforms: Unraid.

## Health score

36/100 (Low), based on 3 of 4 factors.
- Maintained: 59 (last commit 165 days ago)
- Popular: 0 (0 GitHub stars)
- Easy to install: 35 (1 install platform, install notes, Docker image)

## Links

- Unraid: https://ca.unraid.net/apps/moss-tts-nano-api-09c1a1v1fignif?q=MOSS-TTS-Nano-API

## Common questions

### How do I enable CPU inference for MOSS-TTS-Nano-API?

Set the DEVICE environment variable to cpu. Use the Docker run command without the GPU flag when running CPU-only.

### Which port does MOSS-TTS-Nano-API use by default?

It listens on port 8080 by default. You can change the server port by setting the PORT environment variable.

### Where should I mount storage so MOSS-TTS-Nano-API keeps the downloaded model?

Mount a host directory to /root/.cache/huggingface in the Docker container. The first start downloads the model from Hugging Face into that cache.

### How can I speed up model downloads in mainland China?

Set the HF_ENDPOINT environment variable to the Hugging Face mirror. This is intended to make model downloads faster for users in mainland China.

### Can MOSS-TTS-Nano-API share a GPU with other AI services?

Yes, the README says it can coexist with other GPU services. It is described as suitable for resource-constrained hosts.

### How do I request voice cloning in MOSS-TTS-Nano-API?

Send a POST request to /v1/audio/speech/clone with form data. Include the input text and a reference audio file upload.

---
Source: Our Local Host (https://ourlocalhost.com/app/3073/moss-tts-nano-api), the self-hosted and open-source app directory.
