Views
No views yet
main branch of
dots.tts and its recommended
dependencies:1git clone --branch main --single-branch https://github.com/studio-dots-ai/dots.tts.git
2cd dots.tts
3python -m pip install -e . -c constraints/recommended.txt1dots.tts.edit \
2 --model-name-or-path dots-studio/dots.tts.edit \
3 --source-audio /path/to/source.wav \
4 --instruction 'Hello <sub targ="small">brave</sub> world.' \
5 --output edited.wav--source-text and --target-text to override the derived transcripts.
Source-speaker guidance defaults to auto: it is disabled when the instruction
contains at least one operation and every operation is emo, bg, or
enhance, and enabled for text, pitch, rate, pause, speaker-transfer, or mixed
edits. Pass bare --use-xvector (or
--use-xvector on) to force it on, and --use-xvector off to force it off.
Speaker guidance uses a default scale of 1.5; override it with
--speaker-scale when needed.1import soundfile as sf
2
3from dots_tts.edit_runtime import DotsTtsEditRuntime
4
5runtime = DotsTtsEditRuntime.from_pretrained(
6 "dots-studio/dots.tts.edit",
7 precision="bfloat16",
8)
9result = runtime.generate_edit(
10 source_audio_path="/path/to/source.wav",
11 instruction='Hello <sub targ="small">brave</sub> world.',
12 # source_text and target_text are optional overrides.
13 # use_xvector defaults to "auto"; pass True or False to override it.
14)
15sf.write(
16 "edited.wav",
17 result["audio"].float().cpu().squeeze().numpy(),
18 result["sample_rate"],
19)<del>, <ins>,
<sub targ="replacement">, <emo>, <pitch>, <rate>, <enhance>,
<bg>, <pause/>, and <spk_transfer/>. Malformed instructions and
instructions that derive an empty source or target transcript are rejected.DotsTtsEditRuntime also provides generate and generate_stream for
zero-shot TTS with the same checkpoint. See the
code repository for examples.1cd apps/edit_playground/frontend
2npm ci
3npm run build
4cd ../../..
5python apps/edit_playground/app.py \
6 --model-name-or-path dots-studio/dots.tts.edit \
7 --optimizedots.tts project for the terms
that apply to the weights and code.