Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Video): Video Component split audio from video #1155

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 156 additions & 0 deletions schema/ai-tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
}
}
}
Loading