v2VoicesGet method
Get Voices V2 @param next_page_token The next page token to use for pagination. Returned from the previous request. @param page_size How many voices to return at maximum. Can not exceed 100, defaults to 10. Page 0 may include more voices due to default voices being included. @param search Search term to filter voices by. Searches in name, description, labels, category. @param sort Which field to sort by, one of 'created_at_unix' or 'name'. 'created_at_unix' may not be available for older voices. @param sort_direction Which direction to sort the voices in. 'asc' or 'desc'. @param voice_type Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to 'personal' plus 'community'. @param category Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional' @param fine_tuning_state State of the voice's fine tuning to filter by. Applicable only to professional voices clones. One of 'draft', 'not_verified', 'not_started', 'queued', 'fine_tuning', 'fine_tuned', 'failed', 'delayed' @param collection_id Collection ID to filter voices by. @param include_total_count Whether to include the total count of voices found in the response. Incurs a performance cost. @param xi-api-key Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.
Implementation
Future<chopper.Response<GetVoicesV2ResponseModel>> v2VoicesGet({
String? nextPageToken,
int? pageSize,
String? search,
String? sort,
String? sortDirection,
String? voiceType,
String? category,
String? fineTuningState,
String? collectionId,
bool? includeTotalCount,
String? xiApiKey,
}) {
generatedMapping.putIfAbsent(
GetVoicesV2ResponseModel,
() => GetVoicesV2ResponseModel.fromJsonFactory,
);
return _v2VoicesGet(
nextPageToken: nextPageToken,
pageSize: pageSize,
search: search,
sort: sort,
sortDirection: sortDirection,
voiceType: voiceType,
category: category,
fineTuningState: fineTuningState,
collectionId: collectionId,
includeTotalCount: includeTotalCount,
xiApiKey: xiApiKey?.toString(),
);
}