Class AsyncVoices

java.lang.Object
com.google.genai.gaos.AsyncVoices

public class AsyncVoices extends Object
  • Method Details

    • sync

      public Voices sync()
      Switches to the sync SDK.
      Returns:
      The sync SDK
    • list

      public ListVoicesRequestBuilder list()
      Lists custom stored voices owned by the caller (ordered newest first) followed by prebuilt system voices from Google's voice catalog.
      Returns:
      The async call builder
    • list

      public CompletableFuture<ListVoicesResponse> list(@Nonnull ListVoicesRequest request)
      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:
      CompletableFuture<ListVoicesResponse> - The async response
    • list

      public CompletableFuture<ListVoicesResponse> list(@Nonnull ListVoicesRequest request, @Nullable Options options)
      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:
      CompletableFuture<ListVoicesResponse> - The async response
    • create

      public CreateVoiceRequestBuilder 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 async 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:
      CompletableFuture<CreateVoiceResponse> - The async response
    • create

      public CompletableFuture<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:
      CompletableFuture<CreateVoiceResponse> - The async response
    • delete

      public DeleteVoiceRequestBuilder delete()
      Deletes a custom stored voice (`store = true`) by resource name. Prebuilt catalog voices (`VOICE_TYPE_PREBUILT`) cannot be deleted.
      Returns:
      The async call builder
    • delete

      public CompletableFuture<DeleteVoiceResponse> delete(@Nonnull String id)
      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:
      CompletableFuture<DeleteVoiceResponse> - The async response
    • delete

      public CompletableFuture<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:
      CompletableFuture<DeleteVoiceResponse> - The async response
    • get

      public GetVoiceRequestBuilder 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 async call builder
    • get

      public CompletableFuture<GetVoiceResponse> get(@Nonnull String id)
      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:
      CompletableFuture<GetVoiceResponse> - The async response
    • get

      public CompletableFuture<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:
      CompletableFuture<GetVoiceResponse> - The async response