diff --git a/packages/tasks/src/tasks/audio-classification/inference.ts b/packages/tasks/src/tasks/audio-classification/inference.ts index ee61c7052..b8ed3f50f 100644 --- a/packages/tasks/src/tasks/audio-classification/inference.ts +++ b/packages/tasks/src/tasks/audio-classification/inference.ts @@ -8,9 +8,10 @@ */ export interface AudioClassificationInput { /** - * The input audio data + * The input audio data as a base64-encoded string. If no `parameters` are provided, you can + * also provide the audio data as a raw bytes payload. */ - inputs: unknown; + inputs: string; /** * Additional inference parameters */ diff --git a/packages/tasks/src/tasks/audio-classification/spec/input.json b/packages/tasks/src/tasks/audio-classification/spec/input.json index d0372bb68..0bfeb69cd 100644 --- a/packages/tasks/src/tasks/audio-classification/spec/input.json +++ b/packages/tasks/src/tasks/audio-classification/spec/input.json @@ -6,7 +6,8 @@ "type": "object", "properties": { "inputs": { - "description": "The input audio data" + "description": "The input audio data as a base64-encoded string. If no `parameters` are provided, you can also provide the audio data as a raw bytes payload.", + "type": "string" }, "parameters": { "description": "Additional inference parameters", diff --git a/packages/tasks/src/tasks/audio-classification/spec/output.json b/packages/tasks/src/tasks/audio-classification/spec/output.json index dac7a9225..f1f2dfe8e 100644 --- a/packages/tasks/src/tasks/audio-classification/spec/output.json +++ b/packages/tasks/src/tasks/audio-classification/spec/output.json @@ -5,6 +5,7 @@ "description": "Outputs for Audio Classification inference", "type": "array", "items": { + "type": "object", "$ref": "/inference/schemas/common-definitions.json#/definitions/ClassificationOutput" } } diff --git a/packages/tasks/src/tasks/image-classification/spec/output.json b/packages/tasks/src/tasks/image-classification/spec/output.json index 2a3264bce..3ababaf63 100644 --- a/packages/tasks/src/tasks/image-classification/spec/output.json +++ b/packages/tasks/src/tasks/image-classification/spec/output.json @@ -5,6 +5,7 @@ "title": "ImageClassificationOutput", "type": "array", "items": { + "type": "object", "$ref": "/inference/schemas/common-definitions.json#/definitions/ClassificationOutput" } } diff --git a/packages/tasks/src/tasks/text-classification/spec/output.json b/packages/tasks/src/tasks/text-classification/spec/output.json index 704b82225..2bf3def35 100644 --- a/packages/tasks/src/tasks/text-classification/spec/output.json +++ b/packages/tasks/src/tasks/text-classification/spec/output.json @@ -5,6 +5,7 @@ "title": "TextClassificationOutput", "type": "array", "items": { + "type": "object", "$ref": "/inference/schemas/common-definitions.json#/definitions/ClassificationOutput" } }