Tenant 1001 - Otomatik Kapak Görseli Üretimi
26 Aralık 2025
Ne Yapılıyor? Muzibu'da şarkı, albüm, playlist gibi içerikler eklendiğinde otomatik olarak kapak görseli üretiliyor. Bu iş için Leonardo AI kullanılıyor.
Sorun: Leonardo AI şu anda her görselde insan figürü koymaya çalışıyor. "Müzisyen", "el", "parmak", "performans" gibi ifadeler prompt'larda bol miktarda var.
İstenen: İnsan olmadan, soyut, artistik, atmosferik görseller üretilmesi. Şarkı adına göre hayal gücü kullanılması.
Modules/Muzibu/app/Jobs/GenerateSongCover.phpModules/Muzibu/app/Jobs/GenerateGenericMuzibyCover.phpapp/Services/Media/LeonardoAIService.phpModules/AI/app/Services/AIPromptEnhancer.phpŞarkı eklendiğinde otomatik kapak görseli üretilir.
GenerateSongCover.php
Albüm oluşturulduğunda otomatik kapak üretilir.
GenerateGenericMuzibyCover.php
Rock, Pop, Jazz gibi türler için görsel.
GenerateGenericMuzibyCover.php
Kurumsal müzik sektörleri için görsel.
GenerateGenericMuzibyCover.php
Radyo kanalları için kapak görseli.
GenerateGenericMuzibyCover.php
Kullanıcı playlistleri için otomatik görsel.
GenerateGenericMuzibyCover.php
"a musician deeply focused playing..."
"weathered hands positioned on..."
"musician's fingers dancing across..."
"sweat drops on musician playing..."
"musician lost in the moment..."
"senior operator demonstrating..."
"workers inspecting..."
"technician repairing..."
"new employee nervously training..."
"subtle wear on guitar frets, fingerprints..."
"breath condensation..."
"showing gentle wear patterns..."
"warm skin tones..."
"artist performance..."
Sonuç: 20 subject tanımının TAMAMINDA insan referansı var!
En hızlı çözüm. Leonardo API'nin negative_prompt parametresine ekle.
// LeonardoAIService.php - createGenerationDirect()
$negativePrompt = "... human, person, people, hands, fingers, face, musician, performer, artist, worker, operator, body parts, silhouette of person ...";
buildMusicDynamicPrompt() içindeki $subjects array'i tamamen değiştir.
// Yeni İnsansız Subject Havuzu:
"a vintage guitar resting against amplifier in empty studio"
"piano keys catching golden hour light through dusty window"
"vinyl records scattered on wooden floor"
"neon-lit synthesizer in dark room"
"acoustic guitar silhouette against sunset"
"microphone stand alone on empty stage"
"drum kit in spotlight, smoke wisps"
"tangled cables and pedals on stage floor"
Şarkı adına göre yaratıcı, soyut görseller.
// Soyut/Artistik Prompt Örnekleri:
"abstract sound waves visualized as colorful ribbons"
"cosmic nebula with musical note formations"
"geometric patterns pulsating with rhythm"
"underwater soundscape with bubble formations"
"aurora borealis dancing to invisible melody"
"fractal patterns in musical frequencies"
"cinematic landscape reflecting song mood"
GPT-4'e "insan üretme" talimatı ekle.
// System Prompt'a Ekle:
## İNSAN YASAĞI (KRİTİK!):
- ASLA insan figürü, el, parmak, yüz, siluet EKLEME
- ASLA "musician", "performer", "artist", "player" kullanma
- Sadece enstrüman, ekipman, mekan, atmosfer
- Soyut, artistik, atmosferik görseller tercih et
Negative Prompt Güncelle (Acil)
LeonardoAIService.php → createGenerationDirect() ve createGeneration()
Subject Havuzunu Değiştir
LeonardoAIService.php → buildMusicDynamicPrompt() $subjects array
AIPromptEnhancer Güncelle
System prompt ve music_platform config'i düzenle
Test Et
Birkaç test şarkı/albüm ekleyerek sonuçları kontrol et
| Dosya | Fonksiyon/Bölüm | Değişiklik |
|---|---|---|
| app/Services/Media/LeonardoAIService.php | createGeneration() | negative_prompt'a insan kelimeleri ekle |
| app/Services/Media/LeonardoAIService.php | createGenerationDirect() | negative_prompt'a insan kelimeleri ekle |
| app/Services/Media/LeonardoAIService.php | buildMusicDynamicPrompt() $subjects | Tüm array yeniden yazılacak (20 item) |
| Modules/AI/app/Services/AIPromptEnhancer.php | buildSevenRuleSystemPrompt() | İnsan yasağı kuralı ekle |
| Modules/AI/app/Services/AIPromptEnhancer.php | getSectorConfig('music_platform') | İnsan referansları temizle |