File size: 2,519 Bytes
055b693
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
"""
Configuration settings for SoundScape Studio
"""

import os

# Model Configuration
MODEL_NAME = "cvssp/audioldm-s-full-v2"
SAMPLE_RATE = 16000
DEFAULT_DURATION = 5.0
DEFAULT_INFERENCE_STEPS = 10

# Generation Limits
MAX_SOUNDS_PER_REQUEST = 5
MIN_DURATION = 3
MAX_DURATION = 10
MIN_QUALITY_STEPS = 5
MAX_QUALITY_STEPS = 50

# Server Configuration
SERVER_NAME = os.getenv("GRADIO_SERVER_NAME", "0.0.0.0")
SERVER_PORT = int(os.getenv("GRADIO_SERVER_PORT", "7860"))
QUEUE_MAX_SIZE = 10

# UI Configuration
THEME = "base"
TITLE = "SoundScape Studio"
DESCRIPTION = "Cinematic AI Sound Design β€’ Powered by AudioLDM"

# Cinematic Preset Scenes
PRESET_SCENES = {
    "🌧️ Epic Storm": "thunderstorm with heavy rain, lightning strikes, powerful wind gusts",
    "🌊 Ocean Epic": "massive ocean waves crashing, seagulls, deep underwater rumbles",
    "πŸ”₯ Dramatic Fire": "intense crackling fire, ember pops, roaring flames, burning wood",
    "🌲 Mystical Forest": "mysterious forest ambience, owl hoots, rustling leaves, distant wolf howl",
    "πŸŒƒ Urban Thriller": "city at night, distant sirens, footsteps on wet pavement, car engines",
    "πŸ‘» Horror Scene": "creaking old house, heavy footsteps, chains rattling, wind through broken windows"
}

# Audio Enhancement Keywords
AUDIO_ENHANCERS = {
    "rain": "heavy rain with droplets falling, storm water sounds",
    "thunder": "deep thunder rumbling sound effect, lightning crack",
    "wind": "powerful wind blowing and whistling sound, air movement",
    "fire": "intense fire crackling and burning sound, roaring flames",
    "water": "water flowing and splashing sound, liquid movement",
    "footsteps": "heavy footsteps walking sound effect, steps on ground",
    "door": "old wooden door creaking and opening sound",
    "bird": "birds calling and singing sound, nature ambience",
    "ocean": "powerful ocean waves crashing sound, sea storm",
    "forest": "deep forest ambience nature sounds, trees swaying",
    "car": "car engine sound, vehicle noise, traffic",
    "clock": "clock ticking sound, time keeping mechanism",
    "cat": "cat purring sound, feline",
    "dog": "dog barking sound, canine",
    "explosion": "massive explosion sound effect, blast",
    "battle": "intense battle scene, warfare sounds",
    "machinery": "industrial machinery sounds, mechanical noise",
    "chains": "heavy metal chains rattling, clanking",
    "storm": "epic storm with thunder and lightning",
    "waves": "powerful ocean waves, tsunami sounds"
}