Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Delete voice

VoiceDeleted audio().voices().delete(params = VoiceDeleteParams.none(), requestOptions = RequestOptions.none())
DELETE
/audio/voices/{voice_id}

Deletes a voice created from a text prompt or an audio sample.

Requires voice write permission and access to the voice’s project. Access to voices created from recordings is limited to eligible customers. See the custom voices guide.

Deleting a voice does not delete its consent recording. Deleting an already deleted voice returns a 404 error.

Parameters
VoiceDeleteParams params
Optional<String> voiceId
Returns
class VoiceDeleted:
String id

The voice identifier.

boolean deleted

Whether the voice was deleted.

JsonValue; object_
constant
constant

The object type, which is always audio.voice.deleted.

Delete voice

package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.audio.voices.VoiceDeleteParams;
import com.openai.models.audio.voices.VoiceDeleted;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        VoiceDeleted voiceDeleted = client.audio().voices().delete("voice_id");
    }
}
{
  "id": "voice_1234",
  "object": "audio.voice.deleted",
  "deleted": true
}
Returns Examples
{
  "id": "voice_1234",
  "object": "audio.voice.deleted",
  "deleted": true
}