# Voice Management

Source: https://docs.vieneu.io/docs/api/voice-management

## Preset Voices

### `list_preset_voices()`

```python
voices = tts.list_preset_voices()
# Returns: List[tuple[str, str]]  →  [(description, voice_id), ...]
```

### `get_preset_voice()`

```python
voice = tts.get_preset_voice(voice_name: str = None)
# Returns: dict  →  {"codes": Tensor, "text": str}
```

### Using a Preset Voice

```python
voices = tts.list_preset_voices()
voice = tts.get_preset_voice("bac_si_tuyen")
audio = tts.infer(text="Chào bạn!", voice=voice)
```

## LoRA Adapters

### `load_lora_adapter()`

```python
success = tts.load_lora_adapter(
    lora_repo_id: str,
    hf_token: str = None,
)
```

### `unload_lora_adapter()`

```python
success = tts.unload_lora_adapter()
```

## voices.json Format

```json
{
  "default_voice": "voice_name",
  "presets": {
    "voice_name": {
      "description": "Description of the voice",
      "text": "Transcript of the reference audio",
      "codes": [42, 17, 89, 55, ...]
    }
  }
}
```
