CubeStudio is the application layer in this repository: FastAPI (V2) + Streamlit around the open-source MOSS-Audio audio-understanding models. Inference uses the src/ package aligned with upstream MOSS-Audio.
Screenshot file: assets/cubestudio/streamlit-overview-e.png. Naming tips: assets/cubestudio/SCREENSHOTS.txt.
| Area | Capability |
|---|---|
| UI | Streamlit CubeStudio — bilingual (中文 / English), tasks, polling, cancel, progress when the API reports it. |
| API | GET /health, POST /inference/sync, POST /tasks + GET /tasks/{id} + cancel + retry, POST /tasks/batch, POST /batch/run-sync, metrics, export. |
| Media | YouTube URL, local MP4 (audio extracted server-side), path or upload audio; priority YouTube > video > audio. Long media: ffmpeg chunking + per-chunk inference; optional save_chunks. |
| Runtime | MOSS_AUDIO_MODEL_ID, MOSS_AUDIO_DEVICE; optional V2_QUEUE_BACKEND=redis + V2_REDIS_URL. |
| Training | finetune/, train-acestep.py — separate from the Streamlit product path. |
Replace YOUR_GITHUB_USERNAME with your GitHub user or org (or any Git host URL you use).
git clone https://github.com/YOUR_GITHUB_USERNAME/moss-audio-CubeStudio.git
cd moss-audio-CubeStudio
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
python -m pip install --upgrade pip
pip install -e ".[torch-runtime]" # adjust torch / index for your platform (see upstream MOSS-Audio docs)
pip install fastapi uvicorn streamlit requests
# as needed: torchcodec, yt-dlp, etc.Set MOSS_AUDIO_MODEL_ID to a Hugging Face repo id or a local snapshot directory. This repo resolves paths like weights/MOSS-Audio-4B-Instruct from the repository root (see src/hf_inference.py).
Download snapshots under the repo-root weights/ folder (already listed in .gitignore, so it will not be committed):
mkdir -p weights
pip install "huggingface_hub[cli]" # if you do not have huggingface-cli yet
# Pick one (local folder name should match MOSS_AUDIO_MODEL_ID)
huggingface-cli download OpenMOSS-Team/MOSS-Audio-4B-Instruct \
--local-dir weights/MOSS-Audio-4B-Instruct
huggingface-cli download OpenMOSS-Team/MOSS-Audio-8B-Thinking \
--local-dir weights/MOSS-Audio-8B-Thinking
huggingface-cli download OpenMOSS-Team/MOSS-Audio-8B-Instruct \
--local-dir weights/MOSS-Audio-8B-InstructSee the Hugging Face collection for more variants. If Hugging Face is slow from your region, use the ModelScope collection and place the snapshot under weights/ with the same folder name.
export MOSS_AUDIO_MODEL_ID="weights/MOSS-Audio-8B-Thinking"
# or an absolute path:
# export MOSS_AUDIO_MODEL_ID="/path/to/MOSS-Audio-8B-Thinking"
export MOSS_AUDIO_DEVICE=mps # Apple Silicon; or cuda:0 / cpuIf a local path no longer exists after you move the repo, update MOSS_AUDIO_MODEL_ID and restart the API.
# Terminal 1 — API (default http://127.0.0.1:18080)
python -m v2.apps.api.main
# Terminal 2 — Streamlit
streamlit run v2/apps/streamlit_app.pyIn the sidebar, set API Base URL to http://127.0.0.1:18080.
More detail: v2/README.md · Design docs index: v2/docs/README.md.
| Method | Path | Purpose |
|---|---|---|
| GET | /health |
Liveness |
| POST | /inference/sync |
Blocking inference |
| POST | /tasks |
Async task |
| GET | /tasks/{task_id} |
Task detail + progress |
| POST | /tasks/{task_id}/cancel |
Cancel |
| POST | /tasks/{task_id}/retry |
Retry |
| POST | /tasks/batch |
Directory → many tasks |
| POST | /batch/run-sync |
Synchronous batch |
Interactive docs: http://127.0.0.1:18080/docs.
MOSS-Audio is an open-source audio understanding family from MOSI.AI, OpenMOSS, Shanghai Innovation Institute, and collaborators.
- Weights: Hugging Face — MOSS-Audio
- Usage & serving:
moss_audio_usage_guide.md - Fine-tuning:
finetune/FINETUNE.md - Upstream code: OpenMOSS/MOSS-Audio
Model and src/ code follow upstream Apache 2.0 where applicable. See LICENSE.
@misc{mossaudio2026,
title={MOSS-Audio Technical Report},
author={OpenMOSS Team},
year={2026},
howpublished={\url{https://github.com/OpenMOSS/MOSS-Audio}},
note={GitHub repository}
}