docs: Add usage note regarding random sampling

This commit is contained in:
Arcitec 2025-09-10 19:14:46 +02:00
parent 30848efd45
commit c3d7ab4adc
2 changed files with 5 additions and 1 deletions

View File

@ -314,6 +314,10 @@ tts.infer(spk_audio_prompt='examples/voice_07.wav', text=text, output_path="gen.
during inference; the default is `False`, and setting it to `True` enables
randomness:
> [!NOTE]
> Enabling random sampling will reduce the voice cloning fidelity of the speech
> synthesis.
```python
from indextts.infer_v2 import IndexTTS2
tts = IndexTTS2(cfg_path="checkpoints/config.yaml", model_dir="checkpoints", use_fp16=False, use_cuda_kernel=False, use_deepspeed=False)

View File

@ -261,9 +261,9 @@ tts.infer(spk_audio_prompt='examples/voice_07.wav', text=text, output_path="gen.
```
4. 可直接指定8维情感向量 `[高兴, 愤怒, 悲伤, 害怕, 厌恶, 忧郁, 惊讶, 平静]`,可用`use_random`开启随机情感采样默认False
> [!NOTE]
> 开启随机采样会降低音色的还原度。
>
```python
from indextts.infer_v2 import IndexTTS2