Home / Market / audiogram-creator

audiogram-creator

You are an AI-powered Audiogram Creator specializing in transforming audio content (podcasts, interviews, voice notes) into engaging visual. Use when: audiog...

skill★ 00 dlclawhubMIT-0Install in CosmosUpstream Source

Documentation & Preview

Audiogram Creator — Code Examples

Example 1

// Audiogram generation pipeline
interface AudiogramPipeline {
  audio: AudioSource;
  visualization: VisualizationStyle;
  branding: BrandElements;
  captions: CaptionConfig;
  output: OutputConfig;
}

interface AudioSource {
  file: string | File;
  startTime?: number;
  endTime?: number;
  duration: number; // max 60 seconds for most platforms
  transcript?: string;
}

interface VisualizationStyle {
  type: WaveformType;
  colors: ColorScheme;
  animation: AnimationStyle;
  background: BackgroundConfig;
}

type WaveformType =
  | 'bars' | 'circular' | 'line'
  | 'blob' | 'spectrum' | 'particles'
  | 'minimal' | 'custom';

// Visual styles by platform/mood
const VISUALIZATION_PRESETS = {
  professional: {
    waveform: 'bars',
    animation: 'subtle',
    colors: ['#2C3E50', '#3498DB'],
    background: 'solid-dark'
  },
  energetic: {
    waveform: 'spectrum',
    animation: 'dynamic',
    colors: ['#E74C3C', '#F39C12', '#9B59B6'],
    background: 'gradient-animated'
  },
  minimal: {
    waveform: 'line',
    animation: 'subtle',
    colors: ['#FFFFFF'],
    background: 'solid-branded'
  },
  creative: {
    waveform: 'circular',
    animation: 'reactive',
    colors: ['gradient-rainbow'],
    background: 'image-blurred'
  },
  podcast: {
    waveform: 'bars',
    animation: 'moderate',
    colors: ['brand-primary', 'brand-secondary'],
    background: 'album-art-blur'
  }
};

Example 2

// Animated caption system
interface CaptionConfig {
  source: 'auto-transcribe' | 'manual' | 'srt-file';
  style: CaptionStyle;
  animation: CaptionAnimation;
  timing: CaptionTiming;
}

interface CaptionStyle {
  font: string;
  size: 'small' | 'medium' | 'large';
  color: string;
  backgroundColor?: string;
  position: 'bottom' | 'center' | 'top';
  maxLines: 1 | 2 | 3;
  maxCharsPerLine: number;
}

type CaptionAnimation =
  | 'word-by-word' | 'karaoke' | 'typewriter'
  | 'fade' | 'pop' | 'highlight' | 'none';

// Caption style presets
const CAPTION_PRESETS = {
  tiktok: {
    font: 'Montserrat Bold',
    size: 'large',
    animation: 'word-by-word',
    colors: {
      text: '#FFFFFF',
      highlight: '#FFD700',
      background: 'none'
    },
    position: 'center',
    maxWords: 3
  },
  podcast: {
    font: 'Inter',
    size: 'medium',
    animation: 'fade',
    colors: {
      text: '#FFFFFF',
      background: 'rgba(0,0,0,0.6)'
    },
    position: 'bottom',
    maxLines: 2
  },
  interview: {
    font: 'Roboto',
    size: 'medium',
    animation: 'typewriter',
    speakerLabels: true,
    colors: {
      speaker1: '#3498DB',
      speaker2: '#E74C3C'
    }
  }
};

Example 3

// Audio optimization for audiograms
interface AudioProcessing {
  normalization: boolean;
  loudnessTarget: number; // LUFS
  silenceRemoval: boolean;
  noiseReduction: boolean;
  fadeIn: number;
  fadeOut: number;
}

// Optimal audio settings
const AUDIO_SETTINGS = {
  social: {
    loudness: -14, // LUFS
    sampleRate: 44100,
    bitrate: 128,
    format: 'aac'
  },
  quality: {
    loudness: -16,
    sampleRate: 48000,
    bitrate: 256,
    format: 'aac'
  }
};

// Clip selection for viral potential
interface ClipSelection {
  criteria: SelectionCriteria;
  suggestions: AudioClip[];
}

const CLIP_CRITERIA = {
  engagement: {
    hooks: ["surprising statements", "questions", "bold claims"],
    emotions: ["laughter", "excitement", "insight moments"],
    length: "15-60 seconds optimal"
  },
  technical: {
    audioQuality: "clear speech, minimal background",
    pacing: "natural pauses, good rhythm",
    standalone: "makes sense without context"
  }
};

Example 4

// Platform-specific exports
interface PlatformExport {
  platform: SocialPlatform;
  specs: VideoSpecs;
  optimization: PlatformOptimization;
}

const PLATFORM_SPECS = {
  instagram: {
    feed: { ratio: '1:1', maxDuration: 60, resolution: '1080x1080' },
    stories: { ratio: '9:16', maxDuration: 15, resolution: '1080x1920' },
    reels: { ratio: '9:16', maxDuration: 90, resolution: '1080x1920' }
  },
  tiktok: {
    video: { ratio: '9:16', maxDuration: 180, resolution: '1080x1920' },
    optimal: { duration: '15-60 seconds' }
  },
  twitter: {
    video: { ratio: '16:9', maxDuration: 140, resolution: '1920x1080' },
    square: { ratio: '1:1', resolution: '1080x1080' }
  },
  linkedin: {
    video: { ratio: '16:9', maxDuration: 600, resolution: '1920x1080' },
    optimal: { duration: '30-90 seconds' }
  },
  youtube: {
    shorts: { ratio: '9:16', maxDuration: 60, resolution: '1080x1920' },
    regular: { ratio: '16:9', resolution: '1920x1080' }
  }
};

// Multi-format export
async function exportMultiFormat(
  audiogram: Audiogram,
  platforms: SocialPlatform[]
): Promise<ExportPackage> {
  const exports = new Map();

  for (const platform of platforms) {
    const specs = PLATFORM_SPECS[platform];
    const optimized = await renderForPlatform(audiogram, specs);
    exports.set(platform, optimized);
  }

  return { exports, metadata: generateMetadata(audiogram) };
}

Example 5

// Audiogram templates
interface AudiogramTemplate {
  name: string;
  style: TemplateStyle;
  layout: LayoutConfig;
  customizable: string[];
}

const TEMPLATE_LIBRARY = {
  podcast_promo: {
    layout: {
      artwork: { position: 'left', size: '40%' },
      waveform: { position: 'center', style: 'bars' },
      info: { show: ['title', 'episode', 'host'] }
    },
    style: 'professional',
    aspectRatios: ['1:1', '16:9']
  },

  quote_highlight: {
    layout: {
      quote: { position: 'center', size: 'large' },
      waveform: { position: 'bottom', style: 'minimal' },
      speaker: { position: 'bottom-right' }
    },
    style: 'minimal',
    aspectRatios: ['1:1', '9:16']
  },

  interview_clip: {
    layout: {
      guestPhoto: { position: 'left' },
      waveform: { position: 'center' },
      captions: { position: 'bottom', style: 'speaker-labeled' }
    },
    style: 'conversational',
    aspectRatios: ['16:9', '1:1']
  },

  viral_moment: {
    layout: {
      waveform: { position: 'center', style: 'dynamic' },
      captions: { position: 'center', style: 'karaoke', size: 'large' },
      branding: { position: 'corner', minimal: true }
    },
    style: 'attention-grabbing',
    aspectRatios: ['9:16']
  },

  educational: {
    layout: {
      title: { position: 'top' },
      waveform: { position: 'center', style: 'subtle' },
      captions: { position: 'bottom', style: 'readable' },
      keyPoints: { sidebar: true }
    },
    style: 'clean',
    aspectRatios: ['1:1', '16:9']
  }
};