Class V2vAudioFile

An implementation to fetch audio related data.

Implements

Constructors

  • Parameters

    • client: Client
    • data: {
          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;
      }
      • 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;
        }
        • 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;
        }
        • 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";
        }
        • 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

    Returns V2vAudioFile

Properties

client: Client
createdAt: Date
entityToken: string
entityType: string
jobToken: string
maybeSuccessfullyCompletedAt: null | Date
publicBucketMediaPath: string
requestInferenceCategory: string
requestMaybeModelTitle: null | string
requestMaybeModelToken: null | string
requestMaybeModelType: null | string
requestMaybeRawInferenceText: null | string
resourceUrl: string

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

statusAttemptCount: number
statusMaybeAssignedCluster: null | string
statusMaybeAssignedWorker: null | string
statusMaybeExtraStatusDescription: null | string
statusMaybeFirstStartedAt: null | Date
statusRequiresKeepalive: boolean
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>

      Function

Function

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>

updatedAt: Date

Methods

Generated using TypeDoc