Add MOSS-TTS-v1.5 (delay) and MOSS-Audio-Tokenizer
Author: ted-mosi
Pull request: yes

<!-- ci-dashboard-badge:start -->
[![CI](https://transformers-ci.lor-e.huggingface.cool/badge/pr?pr=46447)](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=46447)
<!-- ci-dashboard-badge:end -->

# What does this PR do?

  This PR adds native Transformers support for:

  - `MossTTSDelayModel`
  - `MossTTSDelayProcessor`
  - `MossAudioTokenizerModel`
  - `AutoModelForTextToWaveform`
  - `AutoModelForAudioTokenization`
  - Model docs and tests for both [MOSS-TTS-v1.5 (delay)](https://huggingface.co/OpenMOSS-Team/MOSS-TTS-v1.5) and [MOSS-Audio-Tokenizer](https://huggingface.co/OpenMOSS-Team/MOSS-Audio-Tokenizer)

  ## Architecture notes

  MOSS-TTS-v1.5 uses a delay-pattern TTS generation format with text tokens plus multiple audio VQ channels. The processor handles user/assistant message
  construction, reference-audio tokenization, delay/de-delay conversion, and waveform decoding through the native MOSS audio tokenizer.

  MOSS-Audio-Tokenizer is added as a native audio-tokenizer model so MOSS-TTS no longer depends on Hub remote code for audio tokenization.

## Before submitting
- [x] I confirm that this is not a pure code agent PR.
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [x] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [x] Did you write any new necessary tests?

## AI assistance disclosure

  AI assistance was used while drafting and testing parts of this PR. I reviewed the changed files, checked the implementation against existing Transformers
  model patterns, and ran the relevant local tests listed below. I am responsible for the final code and for responding to review feedback.

## Who can review?

@eustlb @ebezzam @vasqu

Comments:
Hi @eustlb, thanks for your review. I'm working on addressing your proposed changes.

One question I have is that we would like to add another MossTTSLocal model, which architecturally differs from the MossTTSDelay model from this PR. Do you recommend us submitting a different PR for adding the MossTTSLocal model? Or just do it in this PR? Note that they share the same MossAudioTokenizer as their codec to construct audio.

Thank you!

Hi @eustlb, thanks again for your previous round of review. I've addressed all your comments, please let me know what you think of them.

The `circleci` tests currently fail and the root cause was an error with `download and unzip hub cache`. I don't think this is due to my code changes, and it's most likely due to the pipeline infra being flaky, but let me know if there's anything that I can do to fix it.

Hi @eustlb, just want to follow up on this PR. I'd appreciate your advice!


@ebezzam @eustlb

Thank you for your review! I have finished addressing all review comments. Please let me know what you think!

One note about the CICD pipeline, I got one failure for the `test_processors [shard 2/8]` but it previously succeeded while the only difference was a doc change, which is unrelated to this test, so I think it is due to the CICD pipeline flakiness.

I don't think I have the permission to run it, so could you please re-run that test for me to see if it passes?

Thank you!

<!-- ci-dashboard-recap:start -->

---

### CI recap

**Dashboard:** [View test results in Grafana](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=46447)
**Latest run:** [28741912898:2](https://github.com/huggingface/transformers/actions/runs/28741912898)
**Result:** `failure` | **Jobs:** 15 | **Tests:** 171,201 | **Failures:** 6 | **Duration:** 23h 44m

<!-- ci-dashboard-recap:end -->

Hi @ebezzam , thank you for the previous round of code review.

I have carefully addressed all your comments, and extend those ideas to the entire PR.

I do find the code to be greatly improved after applying your suggestions! Please let me know what you think of them this time!

One note is that I don't think the pipeline failure is due to my changes, but let me know if there's anything that I can do to fix it.

**[For maintainers]** Suggested jobs to run (before merge)

run-slow: auto, moss_audio_tokenizer, moss_tts_delay

Thank you for your contribution 🤗!

## CI Security Gate — automatic approval blocked

This PR was **not** automatically approved for CI because the security gate failed.

**Possible reasons:**
- The PR touches 50 or more files — only PRs with fewer than 50 changed files are automatically approved
- A changed file is outside the allowed directories (`src/`, `tests/`, `docs/`, `utils/`), has a disallowed extension (only `.py`, `.txt`, `.md` permitted outside `tests/` and `docs/`), or is not `.md`/`.yml` inside `docs/`
- A new high-severity security issue was detected in the changed Python files (Bandit check)

See the [workflow run](https://github.com/huggingface/transformers/actions/runs/29490892742) for the exact violations.

A maintainer can review and manually approve CI if a finding is a false positive.

Hi @ebezzam , thanks for your previous round of code review. I have carefully addressed each. There's a CICD pipeline failure that I don't think it's relevant to my code.

Please let me know what you think on this one! Looking forward to your feedback!