Class TtsAudioFile

An implementation to fetch audio related data.

Implements

Constructors

  • Parameters

    • client: Client
    • data: {
          attempt_count: number;
          created_at: Date;
          job_token: string;
          maybe_extra_status_description: null | "done";
          maybe_public_bucket_wav_audio_path: string;
          maybe_result_token: string;
          model_token: string;
          raw_inference_text: string;
          status: "complete_success";
          title: string;
          tts_model_type: string;
          updated_at: Date;
      }
      • attempt_count: number
      • created_at: Date
      • job_token: string
      • maybe_extra_status_description: null | "done"
      • maybe_public_bucket_wav_audio_path: string
      • maybe_result_token: string
      • model_token: string
      • raw_inference_text: string
      • status: "complete_success"
      • title: string
      • tts_model_type: string
      • updated_at: Date

    Returns TtsAudioFile

Properties

attemptCount: number
client: Client
createdAt: Date
extraStatusDescription: null | string
modelToken: string
publicBucketWavAudioPath: string
rawInferenceText: string
resourceUrl: string

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

resultToken: string
status: string
title: string
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>

token: string
ttsModelType: string
updatedAt: Date
webUrl: string

The URL to the page of this audio file in the browser.

Methods

Generated using TypeDoc