From 30a90d81f3b2dfe3c01e3a0d5a0926c893ac8678 Mon Sep 17 00:00:00 2001 From: ARYPROGRAMMER Date: Fri, 15 Nov 2024 04:16:41 +0530 Subject: [PATCH] feat(Video Video Component split audio from video --- schema/ai-tasks.json | 156 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) diff --git a/schema/ai-tasks.json b/schema/ai-tasks.json index 41710763..e1587a98 100644 --- a/schema/ai-tasks.json +++ b/schema/ai-tasks.json @@ -1406,5 +1406,161 @@ "data" ] } + }, + "TASK_EXTRACT_AUDIO": { + "title": "Audio Extraction", + "instillShortDescription": "Extract audio from video files", + "input": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Audio extraction input", + "description": "Input schema of the audio extraction task", + "instillShortDescription": "Input schema of the audio extraction task", + "type": "object", + "properties": { + "data": { + "description": "Input data", + "instillShortDescription": "Input data", + "type": "object", + "properties": { + "video": { + "title": "Video Input", + "description": "The input video file to extract audio from", + "instillShortDescription": "Input video file", + "instillAcceptFormats": [ + "video/*", + "application/octet-stream" + ], + "type": "binary" + }, + "time_windows": { + "title": "Time Windows", + "description": "Optional time windows for extracting audio segments", + "instillShortDescription": "Time windows for extraction", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "pattern": "^([0-9]{2}):([0-5][0-9]):([0-5][0-9])$", + "description": "Time in HH:MM:SS format" + }, + "minItems": 2, + "maxItems": 2 + } + } + }, + "required": [ + "video" + ] + }, + "parameter": { + "description": "Input parameters", + "instillShortDescription": "Input parameters", + "type": "object", + "properties": { + "format": { + "title": "Audio Format", + "type": "string", + "description": "The output audio format", + "instillShortDescription": "Output audio format", + "enum": [ + "wav", + "mp3", + "aac" + ], + "default": "wav" + }, + "sample_rate": { + "title": "Sample Rate", + "type": "integer", + "description": "Audio sample rate in Hz", + "instillShortDescription": "Audio sample rate", + "minimum": 8000, + "maximum": 192000, + "default": 44100 + }, + "channels": { + "title": "Channels", + "type": "integer", + "description": "Number of audio channels (1 for mono, 2 for stereo)", + "instillShortDescription": "Number of audio channels", + "enum": [1, 2], + "default": 2 + } + } + } + }, + "required": [ + "data" + ] + }, + "output": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Audio extraction output", + "description": "Output schema of the audio extraction task", + "instillShortDescription": "Output schema of the audio extraction task", + "type": "object", + "properties": { + "data": { + "description": "Output data", + "instillShortDescription": "Output data", + "type": "object", + "properties": { + "audios": { + "title": "Extracted Audio", + "type": "array", + "description": "List of extracted audio segments", + "instillShortDescription": "List of audio segments", + "instillFormat": "array", + "items": { + "type": "object", + "properties": { + "index": { + "title": "Index", + "type": "integer", + "description": "The index of the audio segment in the array", + "instillShortDescription": "Segment index", + "instillFormat": "integer" + }, + "audio": { + "title": "Audio Data", + "type": "binary", + "description": "The extracted audio data", + "instillShortDescription": "Audio data", + "instillFormat": "audio/*" + }, + "start_time": { + "title": "Start Time", + "type": "string", + "description": "Start time of the audio segment (HH:MM:SS)", + "instillShortDescription": "Segment start time" + }, + "end_time": { + "title": "End Time", + "type": "string", + "description": "End time of the audio segment (HH:MM:SS)", + "instillShortDescription": "Segment end time" + }, + "duration": { + "title": "Duration", + "type": "number", + "description": "Duration of the audio segment in seconds", + "instillShortDescription": "Segment duration" + } + }, + "required": [ + "index", + "audio", + "duration" + ] + } + } + }, + "required": [ + "audios" + ] + } + } + } } } \ No newline at end of file