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

audio.voices.delete(voice_id) -> VoiceDeleted { id, deleted, object }
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
voice_id: String
Returns
class VoiceDeleted { id, deleted, object }
id: String

The voice identifier.

deleted: bool

Whether the voice was deleted.

object: :"audio.voice.deleted"

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

Delete voice

require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

voice_deleted = openai.audio.voices.delete("voice_id")

puts(voice_deleted)
{
  "id": "voice_1234",
  "object": "audio.voice.deleted",
  "deleted": true
}
Returns Examples
{
  "id": "voice_1234",
  "object": "audio.voice.deleted",
  "deleted": true
}