Official Implementation of "MSpoofTTS: Multi-Resolution Spoof-Guided Inference for Discrete Speech Synthesis" (Interspeech 2026)
1
stars
96
commits
Python
primary language
Jun 14, 2026
updated
Paper | Demo | Checkpoints
Neural codec language models can synthesize high-quality speech, but inference in the discrete token space is still vulnerable to token-level artifacts and distribution drift. MSpoofTTS is a training-free inference framework that improves zero-shot speech synthesis with multi-resolution spoof guidance. It evaluates codec-token sequences at multiple temporal granularities to identify locally inconsistent or unnatural patterns, then integrates the resulting authenticity scores into hierarchical decoding to prune weak candidates and rerank hypotheses. The base NeuTTS language model is kept fixed; robustness is improved without retraining or changing its parameters.
git clone https://github.com/Danny-NUS/MSpoofTTS.git
cd MSpoofTTS
conda create -n mspooftts python=3.11 -y
conda activate mspooftts
# NeuTTS requires espeak-ng for phonemization.
brew install espeak-ng # macOS
# sudo apt install espeak-ng # Ubuntu/Debian
pip install -r requirements.txt
Optional backends:
pip install llama-cpp-python # GGUF backbone support
pip install onnxruntime # ONNX codec decoder support
The default example runs vanilla NeuTTS sampling:
python -m examples.basic_example \
--input_text "MSpoofTTS helps neural text-to-speech systems generate more reliable speech by using spoof detection signals during decoding." \
--ref_audio samples/jo.wav \
--ref_text samples/jo.txt \
--output_path generated/output.wav
Run MSpoofTTS-guided decoding by selecting rank_eas_hier. The discriminator checkpoints are downloaded automatically from Chanson-0803/MSpoofTTS:
python -m examples.basic_example \
--input_text "MSpoofTTS is a training-free inference framework that improves discrete speech synthesis with multi-resolution spoof detection guided decoding." \
--ref_audio samples/jo.wav \
--ref_text samples/jo.txt \
--sampling_scheme rank_eas_hier \
--backbone_device cuda \
--codec_device cuda \
--output_path generated/output_mspooftts.wav
Python usage:
from neutts import NeuTTS
import soundfile as sf
tts = NeuTTS(
backbone_repo="neuphonic/neutts-nano",
backbone_device="cuda",
codec_repo="neuphonic/neucodec",
codec_device="cuda",
use_hier=True,
discriminator_repo="Chanson-0803/MSpoofTTS",
)
ref_text = open("samples/jo.txt", encoding="utf-8").read().strip()
ref_codes = tts.encode_reference("samples/jo.wav")
wav = tts.infer(
"MSpoofTTS uses multi-resolution spoof scores during decoding.",
ref_codes,
ref_text,
sampling_scheme="rank_eas_hier",
)
sf.write("generated/output_mspooftts.wav", wav, 24000)
Supported PyTorch decoding schemes:
| Scheme | Description |
|---|---|
orig | Original NeuTTS top-k sampling baseline. |
eas | Entropy-Aware Sampling without discriminator reranking. |
rank_eas_hier | MSpoofTTS hierarchical decoding with multi-resolution spoof guidance. |
This repository is based on NeuTTS. The upstream NeuTTS runtime is kept as the base system; MSpoofTTS additions are marked as (new) below and in code comments where they are mixed into existing files. The neutts/ directory is therefore modified upstream code, not a fully new package.
Discriminator/: multi-resolution token spoof detector modules used by guided decoding.mspooftts/: Hugging Face checkpoint loading utilities for MSpoofTTS discriminator checkpoints.rank_eas_hier in neutts/neutts.py: Entropy-Aware Sampling plus hierarchical discriminator pruning/reranking.examples/basic_example.py: --sampling_scheme, --backbone_device, --codec_device, and --discriminator_repo.neutts/neutts.pyThe original NeuTTS logic for phonemization, backbone loading, codec loading, reference encoding, decoding, streaming, and vanilla orig generation is kept as the base. The MSpoofTTS additions inside this file are:
Discriminator and mspooftts.checkpoints.nucleus_sampling and EASPenalty, used by EAS-based decoding.use_dis, use_hier, discriminator_repo, and discriminator_revision.use_dis=True or use_hier=True._mask_to_speech_only and _lm_to_speech_id_or_none._eas_generate, _rank_sum_select, and _rank_eas_hier_generate.sampling_scheme routing in infer / _infer_torch; orig remains the NeuTTS baseline path.TTSSpoofDetection/
├── assets/ # (new) README figures and project icon
├── Discriminator/ # (new) MSpoofTTS discriminator modules used at inference
├── examples/ # Minimal command-line inference examples
├── generated/ # ignored local inference outputs
├── mspooftts/ # (new) MSpoofTTS checkpoint loading utilities
├── neutts/ # (modified) NeuTTS runtime; new hooks marked in neutts.py
├── neuttsair/ # NeuTTS-Air compatibility wrapper
├── samples/ # Reference audio/text/code samples
├── tests/ # Lightweight loading/inference smoke tests
├── README.md
├── LICENSE
├── LICENSE_APACHE
└── requirements.txt
If you use MSpoofTTS, please cite our paper. Since this repository builds on NeuTTS/NeuCodec components, please also cite NeuCodec when using the codec.
@article{zhao2026hierarchical,
title={Hierarchical Decoding for Discrete Speech Synthesis with Multi-Resolution Spoof Detection},
author={Zhao, Junchuan and Vu, Minh Duc and Wang, Ye},
journal={arXiv preprint arXiv:2603.05373},
year={2026}
}
@article{julian2025finite,
title={Finite Scalar Quantization Enables Redundant and Transmission-Robust Neural Audio Compression at Low Bit-rates},
author={Julian, Harry and Beeson, Rachel and Konathala, Lohith and Ulin, Johanna and Gao, Jiameng},
journal={arXiv preprint arXiv:2509.09550},
year={2025}
}
This repository contains two license scopes:
LICENSE.Discriminator/, mspooftts/, README assets, and the marked (new) inference hooks in neutts/neutts.py: Apache-2.0 — see LICENSE_APACHE.The MSpoofTTS discriminator checkpoints are hosted at Chanson-0803/MSpoofTTS. Please also follow the license and terms on that Hugging Face repository when using the checkpoints.
Python
100.0%
Official Implementation of "MSpoofTTS: Multi-Resolution Spoof-Guided Inference for Discrete Speech Synthesis" (Interspeech 2026)
1
stars
96
commits
Python
primary language
Jun 14, 2026
updated
Paper | Demo | Checkpoints
Neural codec language models can synthesize high-quality speech, but inference in the discrete token space is still vulnerable to token-level artifacts and distribution drift. MSpoofTTS is a training-free inference framework that improves zero-shot speech synthesis with multi-resolution spoof guidance. It evaluates codec-token sequences at multiple temporal granularities to identify locally inconsistent or unnatural patterns, then integrates the resulting authenticity scores into hierarchical decoding to prune weak candidates and rerank hypotheses. The base NeuTTS language model is kept fixed; robustness is improved without retraining or changing its parameters.
git clone https://github.com/Danny-NUS/MSpoofTTS.git
cd MSpoofTTS
conda create -n mspooftts python=3.11 -y
conda activate mspooftts
# NeuTTS requires espeak-ng for phonemization.
brew install espeak-ng # macOS
# sudo apt install espeak-ng # Ubuntu/Debian
pip install -r requirements.txt
Optional backends:
pip install llama-cpp-python # GGUF backbone support
pip install onnxruntime # ONNX codec decoder support
The default example runs vanilla NeuTTS sampling:
python -m examples.basic_example \
--input_text "MSpoofTTS helps neural text-to-speech systems generate more reliable speech by using spoof detection signals during decoding." \
--ref_audio samples/jo.wav \
--ref_text samples/jo.txt \
--output_path generated/output.wav
Run MSpoofTTS-guided decoding by selecting rank_eas_hier. The discriminator checkpoints are downloaded automatically from Chanson-0803/MSpoofTTS:
python -m examples.basic_example \
--input_text "MSpoofTTS is a training-free inference framework that improves discrete speech synthesis with multi-resolution spoof detection guided decoding." \
--ref_audio samples/jo.wav \
--ref_text samples/jo.txt \
--sampling_scheme rank_eas_hier \
--backbone_device cuda \
--codec_device cuda \
--output_path generated/output_mspooftts.wav
Python usage:
from neutts import NeuTTS
import soundfile as sf
tts = NeuTTS(
backbone_repo="neuphonic/neutts-nano",
backbone_device="cuda",
codec_repo="neuphonic/neucodec",
codec_device="cuda",
use_hier=True,
discriminator_repo="Chanson-0803/MSpoofTTS",
)
ref_text = open("samples/jo.txt", encoding="utf-8").read().strip()
ref_codes = tts.encode_reference("samples/jo.wav")
wav = tts.infer(
"MSpoofTTS uses multi-resolution spoof scores during decoding.",
ref_codes,
ref_text,
sampling_scheme="rank_eas_hier",
)
sf.write("generated/output_mspooftts.wav", wav, 24000)
Supported PyTorch decoding schemes:
| Scheme | Description |
|---|---|
orig | Original NeuTTS top-k sampling baseline. |
eas | Entropy-Aware Sampling without discriminator reranking. |
rank_eas_hier | MSpoofTTS hierarchical decoding with multi-resolution spoof guidance. |
This repository is based on NeuTTS. The upstream NeuTTS runtime is kept as the base system; MSpoofTTS additions are marked as (new) below and in code comments where they are mixed into existing files. The neutts/ directory is therefore modified upstream code, not a fully new package.
Discriminator/: multi-resolution token spoof detector modules used by guided decoding.mspooftts/: Hugging Face checkpoint loading utilities for MSpoofTTS discriminator checkpoints.rank_eas_hier in neutts/neutts.py: Entropy-Aware Sampling plus hierarchical discriminator pruning/reranking.examples/basic_example.py: --sampling_scheme, --backbone_device, --codec_device, and --discriminator_repo.neutts/neutts.pyThe original NeuTTS logic for phonemization, backbone loading, codec loading, reference encoding, decoding, streaming, and vanilla orig generation is kept as the base. The MSpoofTTS additions inside this file are:
Discriminator and mspooftts.checkpoints.nucleus_sampling and EASPenalty, used by EAS-based decoding.use_dis, use_hier, discriminator_repo, and discriminator_revision.use_dis=True or use_hier=True._mask_to_speech_only and _lm_to_speech_id_or_none._eas_generate, _rank_sum_select, and _rank_eas_hier_generate.sampling_scheme routing in infer / _infer_torch; orig remains the NeuTTS baseline path.TTSSpoofDetection/
├── assets/ # (new) README figures and project icon
├── Discriminator/ # (new) MSpoofTTS discriminator modules used at inference
├── examples/ # Minimal command-line inference examples
├── generated/ # ignored local inference outputs
├── mspooftts/ # (new) MSpoofTTS checkpoint loading utilities
├── neutts/ # (modified) NeuTTS runtime; new hooks marked in neutts.py
├── neuttsair/ # NeuTTS-Air compatibility wrapper
├── samples/ # Reference audio/text/code samples
├── tests/ # Lightweight loading/inference smoke tests
├── README.md
├── LICENSE
├── LICENSE_APACHE
└── requirements.txt
If you use MSpoofTTS, please cite our paper. Since this repository builds on NeuTTS/NeuCodec components, please also cite NeuCodec when using the codec.
@article{zhao2026hierarchical,
title={Hierarchical Decoding for Discrete Speech Synthesis with Multi-Resolution Spoof Detection},
author={Zhao, Junchuan and Vu, Minh Duc and Wang, Ye},
journal={arXiv preprint arXiv:2603.05373},
year={2026}
}
@article{julian2025finite,
title={Finite Scalar Quantization Enables Redundant and Transmission-Robust Neural Audio Compression at Low Bit-rates},
author={Julian, Harry and Beeson, Rachel and Konathala, Lohith and Ulin, Johanna and Gao, Jiameng},
journal={arXiv preprint arXiv:2509.09550},
year={2025}
}
This repository contains two license scopes:
LICENSE.Discriminator/, mspooftts/, README assets, and the marked (new) inference hooks in neutts/neutts.py: Apache-2.0 — see LICENSE_APACHE.The MSpoofTTS discriminator checkpoints are hosted at Chanson-0803/MSpoofTTS. Please also follow the license and terms on that Hugging Face repository when using the checkpoints.
Python
100.0%