> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kugelaudio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Voices

> List, create, update, and manage voices and their reference audio

## List Available Voices

```java theme={null}
import com.kugelaudio.sdk.Voice;
import com.kugelaudio.sdk.VoiceListResponse;

// List all available voices (returns VoiceListResponse)
VoiceListResponse result = client.voices().list();

for (Voice voice : result.getVoices()) {
    System.out.println(voice.getId() + ": " + voice.getName());
    System.out.println("  Sex: " + voice.getSex());
    System.out.println("  Quality: " + voice.getQuality());
}
System.out.printf("Showing %d of %d%n", result.getVoices().size(), result.getTotal());

// Filter by language and paginate
VoiceListResponse page = client.voices().list("de", true, 10, 0);
```

## Get a Specific Voice

```java theme={null}
import com.kugelaudio.sdk.VoiceDetail;

VoiceDetail voice = client.voices().get(1071);
System.out.println("Voice: " + voice.getName());
System.out.println("Quality: " + voice.getQuality());
```

## Create a Voice

```java theme={null}
import java.nio.file.Path;
import java.util.List;

VoiceDetail voice = client.voices().create(
    "My Custom Voice",
    "female",
    "en", // required by this SDK signature; see note below
    List.of(Path.of("reference1.wav"), Path.of("reference2.wav"))
);
System.out.println("Created voice: " + voice.getId());
```

<Note>
  The current Java SDK serializes its `language` argument under the legacy
  `language` key, while the API accepts `supported_languages`. Voice creation
  still succeeds, but that argument does not set the returned voice's language
  list; use the REST endpoint when you need to set `supported_languages`.
</Note>

## Update a Voice

```java theme={null}
import java.util.Map;

VoiceDetail voice = client.voices().update(1071, Map.of(
    "name", "Updated Name"
));
```

The map can carry API field names, but `is_public` is not accepted by the
current update endpoint; call `publish()` below to make a voice public.

## Delete a Voice

```java theme={null}
client.voices().delete(1071);
```

## Manage Reference Audio

```java theme={null}
import com.kugelaudio.sdk.VoiceReference;

// List references
List<VoiceReference> refs = client.voices().listReferences(1071);
for (VoiceReference ref : refs) {
    System.out.println(ref.getId() + ": " + ref.getReferenceText());
}

// Add a new reference
VoiceReference ref = client.voices().addReference(
    123,
    Path.of("new_reference.wav"),
    "Optional transcript of the audio."
);

// Delete a reference
client.voices().deleteReference(1071, 456);
```

The current Java `VoiceReference` model maps `id` and `reference_text`
correctly, but its legacy `filename` property is not populated by the current
API response. See [Types](/sdks/java/types#voice) for the other legacy voice
model fields.

## Publish a Voice

Request that your voice be made publicly available. An admin will verify it before it becomes visible to others.

```java theme={null}
VoiceDetail voice = client.voices().publish(1071);
System.out.println("Is public: " + voice.isPublic());
```

***

Next: [Dictionaries](/sdks/java/dictionaries) — per-project pronunciation and replacement lists.

Use the [Voice API reference](/api-reference/endpoints/voices) to generate a
sample with the REST response shape.
