Handle negated vocal prompts

This commit is contained in:
Mikei386 committed 2026-09-10 19:52:16 +02:00
1 parent 436dee6f1e
commit 7c95dab324
1 file changed
+3 -3
@@ -345,9 +345,9 @@ patch('components/CreatePanel.tsx', (text) => {
text, text,
' // Bulk generation: loop bulkCount times\n for (let i = 0; i < bulkCount; i++) {', ' // Bulk generation: loop bulkCount times\n for (let i = 0; i < bulkCount; i++) {',
` const requestedText = customMode ? styleWithGender : songDescription; ` const requestedText = customMode ? styleWithGender : songDescription;
const asksForVocals = /\\b(vocals?|singer|singing|male voice|female voice|gesang|stimme|sänger(?:in)?|singt)\\b/i.test( const vocalRequestText = \`\${requestedText || ''}\\n\${lyrics}\`;
\`\${requestedText || ''}\\n\${lyrics}\`, const explicitlyNoVocals = /\\b(no vocals?|without vocals?|instrumental only|kein(?:e[rs]?)? gesang|ohne gesang|keine stimme|ohne stimme)\\b/i.test(vocalRequestText);
); const asksForVocals = !explicitlyNoVocals && /\\b(vocals?|singer|singing|male voice|female voice|gesang|stimme|sänger(?:in)?|singt)\\b/i.test(vocalRequestText);
if (!instrumental && asksForVocals && !lyrics.trim()) { if (!instrumental && asksForVocals && !lyrics.trim()) {
window.alert('Widerspruch: Der Auftrag verlangt Gesang, aber das Liedtextfeld ist leer. Bitte Text eintragen oder „Instrumental“ wählen.'); window.alert('Widerspruch: Der Auftrag verlangt Gesang, aber das Liedtextfeld ist leer. Bitte Text eintragen oder „Instrumental“ wählen.');
return; return;