Package com.google.genai.gaos
Class Voices
java.lang.Object
com.google.genai.gaos.Voices
-
Method Summary
Modifier and TypeMethodDescriptionasync()Switches to the async SDK.create()Creates a custom voice from a natural-language prompt (`VOICE_TYPE_PROMPTED`) or from reference and consent audio recordings (`VOICE_TYPE_REPLICATED`).create(CreateVoiceRequest body) Creates a custom voice from a natural-language prompt (`VOICE_TYPE_PROMPTED`) or from reference and consent audio recordings (`VOICE_TYPE_REPLICATED`).create(String apiVersion, CreateVoiceRequest body, Options options) Creates a custom voice from a natural-language prompt (`VOICE_TYPE_PROMPTED`) or from reference and consent audio recordings (`VOICE_TYPE_REPLICATED`).delete()Deletes a custom stored voice (`store = true`) by resource name.Deletes a custom stored voice (`store = true`) by resource name.Deletes a custom stored voice (`store = true`) by resource name.get()Gets a custom stored voice (`store = true`) by resource name.Gets a custom stored voice (`store = true`) by resource name.Gets a custom stored voice (`store = true`) by resource name.list()Lists custom stored voices owned by the caller (ordered newest first) followed by prebuilt system voices from Google's voice catalog.list(ListVoicesRequest request) Lists custom stored voices owned by the caller (ordered newest first) followed by prebuilt system voices from Google's voice catalog.list(ListVoicesRequest request, Options options) Lists custom stored voices owned by the caller (ordered newest first) followed by prebuilt system voices from Google's voice catalog.
-
Method Details
-
async
Switches to the async SDK.- Returns:
- The async SDK
-
list
Lists custom stored voices owned by the caller (ordered newest first) followed by prebuilt system voices from Google's voice catalog.- Returns:
- The call builder
-
list
Lists custom stored voices owned by the caller (ordered newest first) followed by prebuilt system voices from Google's voice catalog.- Parameters:
request- The request object containing all the parameters for the API call.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
list
Lists custom stored voices owned by the caller (ordered newest first) followed by prebuilt system voices from Google's voice catalog.- Parameters:
request- The request object containing all the parameters for the API call.options- additional options- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
create
Creates a custom voice from a natural-language prompt (`VOICE_TYPE_PROMPTED`) or from reference and consent audio recordings (`VOICE_TYPE_REPLICATED`).- Returns:
- The call builder
-
create
Creates a custom voice from a natural-language prompt (`VOICE_TYPE_PROMPTED`) or from reference and consent audio recordings (`VOICE_TYPE_REPLICATED`).- Parameters:
body- Request message for `VoicesService.CreateVoice`.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
create
public CreateVoiceResponse create(@Nullable String apiVersion, @Nonnull CreateVoiceRequest body, @Nullable Options options) Creates a custom voice from a natural-language prompt (`VOICE_TYPE_PROMPTED`) or from reference and consent audio recordings (`VOICE_TYPE_REPLICATED`).- Parameters:
apiVersion- API version for request routing.body- Request message for `VoicesService.CreateVoice`.options- additional options- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
delete
Deletes a custom stored voice (`store = true`) by resource name. Prebuilt catalog voices (`VOICE_TYPE_PREBUILT`) cannot be deleted.- Returns:
- The call builder
-
delete
Deletes a custom stored voice (`store = true`) by resource name. Prebuilt catalog voices (`VOICE_TYPE_PREBUILT`) cannot be deleted.- Parameters:
id- Required. The resource name of the custom stored voice to delete (for example, `voices/voice_abc123def456`).- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
delete
public DeleteVoiceResponse delete(@Nullable String apiVersion, @Nonnull String id, @Nullable Options options) Deletes a custom stored voice (`store = true`) by resource name. Prebuilt catalog voices (`VOICE_TYPE_PREBUILT`) cannot be deleted.- Parameters:
apiVersion- API version for request routing.id- Required. The resource name of the custom stored voice to delete (for example, `voices/voice_abc123def456`).options- additional options- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
get
Gets a custom stored voice (`store = true`) by resource name. Prebuilt catalog voices (`VOICE_TYPE_PREBUILT`) cannot be retrieved via `GetVoice`; use `ListVoices` instead.- Returns:
- The call builder
-
get
Gets a custom stored voice (`store = true`) by resource name. Prebuilt catalog voices (`VOICE_TYPE_PREBUILT`) cannot be retrieved via `GetVoice`; use `ListVoices` instead.- Parameters:
id- Required. The resource name of the custom stored voice to retrieve (for example, `voices/voice_abc123def456`).- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
get
public GetVoiceResponse get(@Nullable String apiVersion, @Nonnull String id, @Nullable Options options) Gets a custom stored voice (`store = true`) by resource name. Prebuilt catalog voices (`VOICE_TYPE_PREBUILT`) cannot be retrieved via `GetVoice`; use `ListVoices` instead.- Parameters:
apiVersion- API version for request routing.id- Required. The resource name of the custom stored voice to retrieve (for example, `voices/voice_abc123def456`).options- additional options- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-