NAME

OpenAPI::Client::OpenAI::Path::audio-voices - Documentation for the /audio/voices path.

OPERATIONS

POST /audio/voices

createVoice

$client->create_voice({
    body => { ... },
});

Creates a custom voice.

Create a custom voice you can use for audio output (for example, in Text-to-Speech and the Realtime API). This requires an audio sample and a previously uploaded consent recording.

See the custom voices guide for requirements and best practices. Custom voices are limited to eligible customers.

Responses

200 - OK

Content-Type: application/json

Example:

{
   "created_at" : 1734220800,
   "id" : "voice_123abc",
   "name" : "My new voice",
   "object" : "audio.voice"
}

SCHEMAS

CreateVoiceRequest

Properties:

  • audio_sample (string, required) - The sample audio recording file. Maximum size is 10 MiB.

    Supported MIME types: audio/mpeg , audio/wav , audio/x-wav , audio/ogg , audio/aac , audio/flac , audio/webm , audio/mp4 .

  • consent (string, required) - The consent recording ID (for example, cons_1234 ).

  • name (string, required) - The name of the new voice.

VoiceResource

Properties:

  • created_at (integer, required) - The Unix timestamp (in seconds) for when the voice was created.

  • id (string, required) - The voice identifier, which can be referenced in API endpoints.

  • name (string, required) - The name of the voice.

  • object (string, required) - The object type, which is always audio.voice .

    Allowed values: audio.voice

SEE ALSO

OpenAPI::Client::OpenAI::Path

COPYRIGHT AND LICENSE

Copyright (C) 2023-2026 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.