adaptive-stem-alignment
यह क्या करती है
यह स्किल एक मास्टर ऑडियो ट्रैक बनाने की प्रक्रिया है, जिसमें अलग-अलग स्टेम अलग से बनते हैं और हर हिस्से की जाँच होती है। यह संगीत प्रोड्यूसर्स और AI टूल्स से ऑडियो बनाने वाले लोगों के लिए है।
कब इस्तेमाल करें
- ✓जब एक पूरा ट्रैक बनाना है, जिसके कई स्टेम्स की लंबाई एक-सी होनी चाहिए।
- ✓जब स्टेम्स की लंबाई अलग-अलग निकले और उन्हें बढ़ाना या मिलाना पड़े।
- ✓जब मैं अंतिम मिक्स एक्सपोर्ट करने से पहले हर ऑडियो फ़ाइल की जाँच करना चाहता हूँ।
Skill का लिंक
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/audio-track-production-enhanced-enhanced-b8f537/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मुझे ड्रम, बेस और वोकल स्टेम्स वाला पूरा गाना बनाना है, जो रेफ़रेंस की लंबाई से मेल खाए। क्या आप मार्गदर्शन दे सकते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI टेम्पो और लंबाई से समय की गणना करता है, रेफ़रेंस फ़ाइल जाँचता है, हर स्टेम एक-एक करके बनाता है, लंबाई के अंतर ठीक करता है, और उसके बाद ही मिक्स करके एक्सपोर्ट करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Adaptive Stem Alignment Workflow
This skill provides a resilient pattern for audio production that emphasizes incremental verification, fail-fast principles, and adaptive duration handling. Each major step produces verified outputs before proceeding, with explicit strategies for handling stems of different durations.
Overview
Follow these steps in strict order. Each step must complete successfully and pass verification before proceeding to the next:
- Early timing calculation - Derive section transitions from BPM and duration first
- Verify reference audio - Validate input file properties and establish target duration
- Generate and verify each stem individually - One stem at a time with immediate verification
- Generate drum stem separately - Dedicated drum extension with rhythm patterns
- Align stem durations - Handle duration mismatches with adaptive extension strategies
- Apply effects with verification - Process each stem and verify output
- Export master track - Mix all verified stems
- Archive and final verification - Package deliverables with comprehensive checks
Key Differences from Standard Workflow
- Incremental verification: Verify each stem immediately after generation, not just at the end
- Fail-fast approach: Stop and report errors at each step rather than accumulating failures
- Early timing: Calculate section transitions before any audio generation
- Separated drums: Drum stem generation is a distinct step with rhythm-specific processing
- Memory-efficient: Process stems individually to avoid large array operations that cause sandbox failures
- Adaptive duration handling: Explicit strategies for mismatched stem durations (zero-padding, looping, crossfade extension)
- Pre-mix alignment: Verify all stems match target duration before mixing
Step 1: Calculate Timing Parameters (Early)
Calculate all timing parameters before generating any audio. This ensures consistent timing across all stems:
def calculate_section_transitions(bpm, total_duration_sec, sections):
"""Calculate beat-aligned transition points for song sections."""
beats_per_second = bpm / 60.0
section_durations = {}
cumulative_time = 0
for section_name, beat_count in sections.items():
duration = beat_count / beats_per_second
section_durations[section_name] = {
'start': cumulative_time,
'end': cumulative_time + duration,
'beats': beat_count,
'start_beat': cumulative_time * beats_per_second
}
cumulative_time += duration
return section_durations
# Configuration
BPM = 120
DURATION = 137
SECTIONS = {'intro': 16, 'verse': 32, 'chorus': 32, 'bridge': 16, 'outro': 16}
timing = calculate_section_transitions(BPM, DURATION, SECTIONS)
print("Timing calculated:")
for section, data in timing.items():
print(f" {section}: {data['start']:.2f}s - {data['end']:.2f}s ({data['beats']} beats)")
Step 2: Verify Reference Audio
Validate the reference file exists and has expected properties:
import soundfile as sf
import os
def verify_reference_file(filepath, expected_sample_rate=None, min_duration=None):
"""Verify reference audio file and return info dict."""
if not os.path.exists(filepath):
raise FileNotFoundError(f"Reference file not found: {filepath}")
info = sf.info(filepath)
errors = []
if expected_sample_rate and info.samplerate != expected_sample_rate:
errors.append(f"Sample rate mismatch: expected {expected_sample_rate}, got {info.samplerate}")
if min_duration and info.duration < min_duration:
errors.append(f"Duration too short: expected >= {min_duration}s, got {info.duration}s")
if errors:
raise ValueError(f"Reference file validation failed: {'; '.join(errors)}")
print(f"Reference verified: {info.duration:.2f}s @ {info.samplerate}Hz, {info.channels}ch, {info.subtype}")
return {
'sample_rate': info.samplerate,
'duration': info.duration,
'channels': info.channels,
'subtype': info.subtype
}
# Verify reference
ref_info = verify_reference_file('reference.wav', expected_sample_rate=48000, min_duration=130)
TARGET_DURATION = ref_info['duration'] # Use reference duration as target
Step 3: Generate and Verify Each Stem Individually
Generate one stem at a time, verify it imm
अक्सर पूछे जाने वाले सवाल
स्टेम क्या है?
स्टेम गाने का अलग ऑडियो हिस्सा होता है, जैसे ड्रम या वोकल।
हर स्टेम अलग से क्यों जाँचें?
शुरू में जाँच करने से गलतियाँ मिक्स में मिलने से पहले पकड़ी जाती हैं, जिससे दोबारा काम कम होता है।
कौन से टूल इस्तेमाल होते हैं?
उदाहरणों में Python ऑडियो लाइब्रेरी इस्तेमाल होती हैं, इसलिए वे आपके कंप्यूटर पर उपलब्ध होनी चाहिए।
जानकारी
लेखक का मूल विवरण
Incremental audio production with duration mismatch handling, adaptive stem extension, and pre-mix alignment verification
repo: HKUDS/AgentPilot
लोकप्रियता
- GitHub स्टार
- 7.8k
- रैंकिंग में स्थान
- #12838
- लाइसेंस
- MIT
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
agentpilot
7.8kआपके एजेंट को AgentPilot से प्रोजेक्ट को चरण-दर-चरण सुधारने में मदद करती है, जिसमें बदलाव सुझाए, परखे और स्कोर किए जाते हैं।
openspace
7.8kआपके एजेंट को OpenSpace सेट करने में मदद करती है, जो एजेंट स्किल्स सहेजता और वापस लाता है, और MCP के ज़रिए आपके AI ऐप से जुड़ता है।
rsi-arena
7.8kआपके एजेंट को AIME और Terminal-Bench जैसे मानक AI बेंचमार्क टेस्ट सेट करने और चलाने में मदद करती है, ताकि सुधार के तरीकों की तुलना हो सके।
experiment-guide
7.8kआपके एजेंट को छोटे प्रयोग बनाने, उनके नतीजे पढ़ने और जाँच के दौरान उपयोगी निष्कर्ष लिखने में मदद करती है।
मिलती-जुलती skills
openai-whisper-api
394kयह आपके एजेंट को OpenAI की transcription सेवा से ऑडियो रिकॉर्डिंग को टेक्स्ट में बदलने देती है, जिसमें स्पीकर लेबल और आउटपुट फ़ाइलों के विकल्प हैं।
openai-whisper
394kयह आपके एजेंट को बिना API key और बिना क्लाउड अपलोड के, आपके अपने कंप्यूटर पर Whisper कमांड से ऑडियो का ट्रांसक्रिप्ट बनाने में मदद करती है।
sag
394kयह आपके एजेंट को ElevenLabs आवाज़ों से टेक्स्ट को ज़ोर से पढ़वाने और नतीजा आपके कंप्यूटर पर चलाने देती है, उच्चारण और भाव के सुझावों के साथ।