Class V2vModel

A voice conversion model. This is a model that can be used to convert audio from one voice to another.

Implements

Constructors

  • Parameters

    • client: Client

      The main client.

    • data: {
          created_at: Date;
          creator: {
              display_name: string;
              gravatar_hash: string;
              user_token: string;
              username: string;
          };
          creator_set_visibility: "public" | "hidden";
          ietf_language_tag: string;
          ietf_primary_language_subtag: string;
          is_front_page_featured: boolean;
          model_type: string;
          title: string;
          token: string;
          updated_at: Date;
      }

      The raw model data from the FakeYou API.

      • created_at: Date
      • creator: {
            display_name: string;
            gravatar_hash: string;
            user_token: string;
            username: string;
        }
        • display_name: string
        • gravatar_hash: string
        • user_token: string
        • username: string
      • creator_set_visibility: "public" | "hidden"
      • ietf_language_tag: string
      • ietf_primary_language_subtag: string
      • is_front_page_featured: boolean
      • model_type: string
      • title: string
      • token: string
      • updated_at: Date

    Returns V2vModel

Properties

client: Client
createdAt: Date
creatorDisplayName: string
creatorGravatarHash: string
creatorSetVisibility: "public" | "hidden"
creatorUserToken: string
creatorUsername: string
fetchProfile: ((this) => Promise<ProfileUser | undefined>) = implFetchUser

Fetch the profile of the user who created this model.

Type declaration

    • (this): Promise<ProfileUser | undefined>
    • Fetch the profile of the user who created this model.

      Parameters

      Returns Promise<ProfileUser | undefined>

ietfLanguageTag: string
ietfPrimaryLanguageSubtag: string
isFrontPageFeatured: boolean
modelType: string
title: string
token: string
updatedAt: Date
username: string

Alias

creatorUsername

Methods

  • Parameters

    • uploadToken: string

    Returns Promise<undefined | {
        inference_job_token: string;
        success: true;
    }>

  • Parameters

    • inferenceJobToken: string

    Returns Promise<undefined | {
        created_at: Date;
        job_token: string;
        maybe_result: {
            entity_token: string;
            entity_type: string;
            maybe_public_bucket_media_path: string;
            maybe_successfully_completed_at: null | Date;
        };
        request: {
            inference_category: string;
            maybe_model_title: null | string;
            maybe_model_token: null | string;
            maybe_model_type: null | string;
            maybe_raw_inference_text: null | string;
        };
        status: {
            attempt_count: number;
            maybe_assigned_cluster: null | string;
            maybe_assigned_worker: null | string;
            maybe_extra_status_description: null | string;
            maybe_first_started_at: null | Date;
            requires_keepalive: boolean;
            status: "complete_success";
        };
        updated_at: Date;
    }>

  • Parameters

    • file: Buffer

    Returns Promise<undefined | {
        success: boolean;
        upload_token: string;
    }>

  • Infer uploaded audio to a new voice represented by this model.

    NOTE: Voice conversion models are very slow to infer. It may take multiple minutes for the inference to complete.

    Parameters

    • audio: Buffer

      The audio to infer as a wav file.

    Returns Promise<undefined | V2vAudioFile>

    The inferred audio file. Undefined if the audio could not be inferred.

Generated using TypeDoc