import { implFetchUser, type User } from '../../implementation/index.js'; import type Client from '../../index.js'; import type { Category } from '../category/Category.js'; import { TtsAudioFile } from './ttsAudioFile/TtsAudioFile.js'; import { type RatingSchema, type TtsModelSchema } from './ttsModel.schema.js'; /** * A text-to-speech model. This is a model that can be used to generate audio from text. * Models are trained to synthesize speech in a specific language and voice. */ export declare class TtsModel implements User { #private; /** * @param client The main client. * @param data The data that has arrived from the FakeYou API. */ constructor(client: Client, data: TtsModelSchema); readonly client: Client; /** * The URL to the page of this model in the browser. */ readonly webUrl: string; readonly token: string; /** * The type of this model. E.g. 'tacotron2'. */ readonly ttsModelType: string; readonly creatorToken: string; readonly creatorUsername: string; /** * @alias creatorUsername */ readonly username: string; readonly creatorDisplayName: string; readonly creatorGravatarHash: string; /** * The name of this model, which is shown on the website's dropdown menu. */ readonly title: string; readonly ietfLanguageTag: string; readonly ietfPrimaryLanguageSubtag: string; readonly isFrontPageFeatured: boolean; readonly isTwitchFeatured: boolean; readonly suggestedUniqueBotCommand: string | null; readonly categoryTokens: string[] | null; readonly createdAt: Date; readonly updatedAt: Date; /** * Infer text for this model. * * @param text The text to infer. * @returns The audio file of the inference. Undefined if the inference failed or took too long. */ infer(text: string): Promise; /** * Fetch the rating of this model by the currently logged in user. * * @returns The rating of this model by the currently logged in user. Ratings can be 'positive', 'negative', or 'neutral'. Undefined if no user is logged in. */ fetchMyRating(): Promise; /** * Rate this model positively, negatively, or neutrally. Neutral is the same as removing your rating. * * @param decision The rating. Can be 'positive', 'negative', or 'neutral'. * @returns The new rating of this model by the currently logged in user. Undefined if no user is logged in. */ rate(decision: RatingSchema): Promise; /** * Fetch the parent categories of this model. * * @returns The parent categories of this model. The array will be empty if no categories are found. */ fetchParentCategories(): Promise; /** * Fetch the user who created this model. */ fetchProfile: typeof implFetchUser; }