/** * @example * { * nextPageToken: "next_page_token", * pageSize: 1, * search: "search", * sort: "sort", * sortDirection: "sort_direction", * voiceType: "voice_type", * category: "category", * fineTuningState: "fine_tuning_state", * collectionId: "collection_id", * gender: "gender", * age: "age", * language: ["language"], * accent: "accent", * useCases: ["use_cases"], * minNoticePeriodDays: 1, * includeCustomRates: true, * includeLiveModerated: true, * highQuality: true, * includeTotalCount: true, * voiceIds: ["voice_ids"] * } */ export interface VoicesSearchRequest { /** The next page token to use for pagination. Returned from the previous request. Use this in combination with the has_more flag for reliable pagination. */ nextPageToken?: string; /** 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. */ pageSize?: number; /** Search term to filter voices by. Searches in name, description, labels, category. */ search?: string; /** Which field to sort by, one of 'created_at_unix' or 'name'. 'created_at_unix' may not be available for older voices. */ sort?: string; /** Which direction to sort the voices in. 'asc' or 'desc'. */ sortDirection?: string; /** Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default', 'non-community', 'saved'. 'non-default' is equal to all but 'default'. 'non-community' is equal to 'personal' and 'workspace' combined (excludes library copies). 'saved' is equal to non-default, but includes default voices if they have been added to a collection. */ voiceType?: string; /** Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional' */ category?: string; /** 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' */ fineTuningState?: string; /** Collection ID to filter voices by. */ collectionId?: string; /** Gender used for filtering, based on the voice's 'gender' label. */ gender?: string; /** Age used for filtering, based on the voice's 'age' label. */ age?: string; /** Languages used for filtering, based on the voice's 'language' label. Voices matching any of the given languages are returned. */ language?: string | string[]; /** Accent used for filtering, based on the voice's 'accent' label. */ accent?: string; /** Use cases used for filtering, based on the voice's 'use_case' label. Voices matching any of the given use cases are returned. */ useCases?: string | string[]; /** Filter to voices whose sharing notice period is at least the given number of days. */ minNoticePeriodDays?: number; /** Whether to include voices that have a custom sharing rate. Defaults to including them. */ includeCustomRates?: boolean; /** Whether to include voices that have live moderation enabled. Defaults to including them. */ includeLiveModerated?: boolean; /** When true, only return studio-quality voices (those whose category is 'high_quality'). */ highQuality?: boolean; /** Whether to include the total count of voices found in the response. NOTE: The total_count value is a live snapshot and may change between requests as users create, modify, or delete voices. For pagination, rely on the has_more flag instead. Only enable this when you actually need the total count (e.g., for display purposes), as it incurs a performance cost. */ includeTotalCount?: boolean; /** Voice IDs to lookup by. Maximum 100 voice IDs. */ voiceIds?: string | string[]; }