dots.tts
Collection
dots.tts • 10 items • Updated • 18
This repository provides a standalone dots.tts artifact for fixed two-step double-streaming TTS inference.
The sampling and streaming contracts are stored in config.json and selected automatically.
Sampling and streaming cadence options should be omitted.
import torch
import soundfile as sf
from dots_tts.runtime_double_streaming import DotsTtsRuntimeDoubleStreaming
runtime = DotsTtsRuntimeDoubleStreaming.from_pretrained(
"dots-studio/dots.tts-mf-2steps-stts",
precision="bfloat16",
optimize=True,
max_generate_length=500,
)
text = "Hello from two-step double streaming."
text_token_ids = runtime.model.tokenizer.encode(text, add_special_tokens=False)
session = runtime.start_double_streaming(
prompt_audio_path="/path/to/reference.wav",
prompt_text="The exact transcript spoken in the reference audio.",
)
chunks = []
for token_id in text_token_ids:
chunk = session.push_text_token(token_id)
if chunk is not None:
chunks.append(chunk.detach().cpu())
for chunk in session.finish_text():
chunks.append(chunk.detach().cpu())
audio = torch.cat(chunks, dim=-1).float().squeeze().numpy()
sf.write("double_streaming.wav", audio, runtime.sample_rate)
For a complete command-line example, see
scripts/example_double_streaming.py.
Passing incompatible sampling values raises an error. Streaming cadence is selected from the artifact configuration.
This model is intended for fixed two-step double-streaming inference. Other sampling or streaming settings are not claimed. High-fidelity voice cloning must be used only with authorization and consent; do not use it for impersonation, fraud, or disinformation.
@article{dotstts2026,
title = {dots.tts Technical Report},
author = {dots.tts Team},
year = {2026},
eprint = {2606.07080},
archivePrefix = {arXiv},
primaryClass = {cs.SD},
}
Released under Apache-2.0.