Class TtsResult

The complete data for a TTS result. This contains extras like the spectrogram and other metadata like what worker generated the file, is a debug request, etc.

Implements

Constructors

  • Parameters

    • client: Client

      The main client.

    • data: {
          created_at: Date;
          creator_set_visibility: "public" | "hidden";
          duration_millis: number;
          file_size_bytes: number;
          generated_by_worker: string;
          is_debug_request: boolean;
          maybe_creator_display_name: null | string;
          maybe_creator_gravatar_hash: null | string;
          maybe_creator_user_token: null | string;
          maybe_creator_username: null | string;
          maybe_model_creator_display_name: null | string;
          maybe_model_creator_gravatar_hash: null | string;
          maybe_model_creator_user_token: null | string;
          maybe_model_creator_username: null | string;
          maybe_pretrained_vocoder_used: null | string;
          public_bucket_spectrogram_path: string;
          public_bucket_wav_audio_path: string;
          raw_inference_text: string;
          tts_model_title: string;
          tts_model_token: string;
          tts_result_token: string;
          updated_at: Date;
      }

      The raw TTS result data from the FakeYou API.

      • created_at: Date
      • creator_set_visibility: "public" | "hidden"
      • duration_millis: number
      • file_size_bytes: number
      • generated_by_worker: string
      • is_debug_request: boolean
      • maybe_creator_display_name: null | string
      • maybe_creator_gravatar_hash: null | string
      • maybe_creator_user_token: null | string
      • maybe_creator_username: null | string
      • maybe_model_creator_display_name: null | string
      • maybe_model_creator_gravatar_hash: null | string
      • maybe_model_creator_user_token: null | string
      • maybe_model_creator_username: null | string
      • maybe_pretrained_vocoder_used: null | string
      • public_bucket_spectrogram_path: string
      • public_bucket_wav_audio_path: string
      • raw_inference_text: string
      • tts_model_title: string
      • tts_model_token: string
      • tts_result_token: string
      • updated_at: Date

    Returns TtsResult

Properties

client: Client
createdAt: Date
creatorSetVisibility: string
durationMillis: number
fileSizeBytes: number
generatedByWorker: string
isDebugRequest: boolean
maybeCreatorDisplayName: null | string
maybeCreatorGravatarHash: null | string
maybeCreatorUserToken: null | string
maybeCreatorUsername: null | string
maybeModelCreatorDisplayName: null | string
maybeModelCreatorGravatarHash: null | string
maybeModelCreatorUserToken: null | string
maybeModelCreatorUsername: null | string
maybePretrainedVocoderUsed: null | string
publicBucketSpectrogramPath: string
publicBucketWavAudioPath: string
rawInferenceText: string
resourceUrl: string

The external URL to the audio file. Expects a WAV file.

spectrogramUrl: string

Raw spectrogram data, it is not an image.

toBase64: ((this) => Promise<string | undefined>) = implToBase64

Convert the audio file to a base64 string.

Type declaration

    • (this): Promise<string | undefined>
    • Convert the audio file to a base64 string.

      Parameters

      Returns Promise<string | undefined>

toBuffer: ((this) => Promise<Buffer | undefined>) = implToBuffer

Fetch the audio file as a buffer.

Type declaration

    • (this): Promise<Buffer | undefined>
    • Fetch the audio file as a buffer.

      Parameters

      Returns Promise<Buffer | undefined>

toDisk: ((this, location) => Promise<void>) = implToDisk

Write the audio file to disk.

Type declaration

    • (this, location): Promise<void>
    • Write the audio file to disk.

      Parameters

      • this: Audio
      • location: `${string}.wav`

      Returns Promise<void>

ttsModelTitle: string
ttsModelToken: string
ttsResultToken: string
updatedAt: Date
webUrl: string

The URL to the page of this result in the browser.

Methods

Generated using TypeDoc