Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Repository files navigation

MOSS-Audio CubeStudio

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.

English · 简体中文

HuggingFace ModelScope


Screenshots

CubeStudio Streamlit UI

Screenshot file: assets/cubestudio/streamlit-overview-e.png. Naming tips: assets/cubestudio/SCREENSHOTS.txt.


What you get

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.

Quick start

1. Clone and environment

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.

2. Model weights

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-Instruct

See 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 / cpu

If a local path no longer exists after you move the repo, update MOSS_AUDIO_MODEL_ID and restart the API.

3. Run API + UI

# 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.py

In 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.


API cheat sheet

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.


About MOSS-Audio (upstream model)

MOSS-Audio is an open-source audio understanding family from MOSI.AI, OpenMOSS, Shanghai Innovation Institute, and collaborators.


License & citation

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}
}

Star history (upstream MOSS-Audio)

Star History Chart

About

MOSS-Audio CubeStudio — V2 API (FastAPI) & bilingual Streamlit UI for speech/audio understanding, async tasks, YouTube/MP4/audio. | MOSS-Audio CubeStudio:V2 FastAPI 与中英 Streamlit,语音/音频理解、异步任务、YouTube/MP4/音频输入。

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages