Ajuste de tamanho e posicao dos FABS e sotaque brasileiro na musica

This commit is contained in:
2026-06-05 12:59:41 +00:00
parent 4f888a487f
commit 0d240ce805
2 changed files with 28 additions and 13 deletions
+18 -9
View File
@@ -2622,8 +2622,8 @@ code {
position: fixed; position: fixed;
bottom: 24px; bottom: 24px;
right: 24px; right: 24px;
width: 60px; width: 48px;
height: 60px; height: 48px;
border-radius: 50%; border-radius: 50%;
background: var(--brand-green, #10a37f); background: var(--brand-green, #10a37f);
border: none; border: none;
@@ -2638,8 +2638,8 @@ code {
} }
.fab-record svg { .fab-record svg {
width: 28px; width: 22px;
height: 28px; height: 22px;
} }
.fab-record:hover { .fab-record:hover {
@@ -3402,8 +3402,8 @@ code {
position: fixed; position: fixed;
bottom: 24px; bottom: 24px;
left: 24px; left: 24px;
width: 60px; width: 48px;
height: 60px; height: 48px;
border-radius: 50%; border-radius: 50%;
background: var(--brand-green, #10a37f); background: var(--brand-green, #10a37f);
border: none; border: none;
@@ -3418,8 +3418,8 @@ code {
} }
.fab-tools svg { .fab-tools svg {
width: 28px; width: 22px;
height: 28px; height: 22px;
} }
.fab-tools:hover { .fab-tools:hover {
@@ -3443,8 +3443,17 @@ code {
} }
} }
/* Ocultar barra de ferramentas no mobile por padrão */
@media (max-width: 768px) { @media (max-width: 768px) {
.fab-record {
bottom: 104px !important;
right: 16px !important;
}
.fab-tools {
bottom: 104px !important;
left: 16px !important;
}
.prompt-modes-bar { .prompt-modes-bar {
display: none !important; display: none !important;
width: 100%; width: 100%;
+10 -4
View File
@@ -238,7 +238,7 @@ app.post('/api/music/generate', requireAuth, async (req, res) => {
rhythmDesc = 'marching children rhythm, playful snare drums, acoustic guitar, brass accent'; rhythmDesc = 'marching children rhythm, playful snare drums, acoustic guitar, brass accent';
} }
const stylePrompt = `${rhythmDesc}, ${voiceDesc}, educational children song style, clear pronunciation, 100 BPM`; const stylePrompt = `${rhythmDesc}, ${voiceDesc}, educational children song style, singing in Brazilian Portuguese, Brazilian Portuguese vocals, clear Brazilian pronunciation, 100 BPM`;
// 2. Determinar o tamanho das letras baseado na duração (duracao) // 2. Determinar o tamanho das letras baseado na duração (duracao)
let lengthInstructions = 'curta, de apenas 6 a 8 versos'; let lengthInstructions = 'curta, de apenas 6 a 8 versos';
@@ -3206,7 +3206,7 @@ app.post('/api/chat', requireAuth, async (req, res) => {
}, },
body: JSON.stringify({ body: JSON.stringify({
model: 'music-2.0', model: 'music-2.0',
prompt: stylePrompt, prompt: `${stylePrompt}, singing in Brazilian Portuguese, Brazilian Portuguese vocals, clear Brazilian pronunciation`,
lyrics: lyrics, lyrics: lyrics,
audio_setting: { sample_rate: 32000, bitrate: 128000, format: 'mp3' } audio_setting: { sample_rate: 32000, bitrate: 128000, format: 'mp3' }
}) })
@@ -3432,11 +3432,17 @@ app.post('/api/chat', requireAuth, async (req, res) => {
console.error('Erro ao integrar observações no prompt da IA:', obsErr); console.error('Erro ao integrar observações no prompt da IA:', obsErr);
} }
const languageDirective = `\n\n⚠️ DIRETRIZ CRÍTICA DE IDIOMA E SAÍDA:
- Você deve responder EXCLUSIVAMENTE em português do Brasil (Brazilian Portuguese).
- Nunca inclua justificativas, introduções, pensamentos, comentários ou notas em inglês.
- Toda a resposta (incluindo qualquer texto lúdico, histórias, explicações ou poemas) deve ser apresentada 100% em português brasileiro, sem misturar outros idiomas.
- Retorne apenas o resultado final que o usuário solicitou.\n\n`;
const dynamicSystemPrompt = { const dynamicSystemPrompt = {
role: "system", role: "system",
content: KEMILY_SYSTEM_PROMPT.content content: languageDirective + KEMILY_SYSTEM_PROMPT.content
.replace(/Você é a Kemily/g, `Você é a ${agentName}`) .replace(/Você é a Kemily/g, `Você é a ${agentName}`)
.replace('INFORMAÇÕES PESSOAIS:', `${knowledgeText}${observationsContext}INFORMAÇÕES PESSOAIS:`) .replace('INFORMAÇÕES PESSOAIS:', `${knowledgeText}${observationsContext}INFORMAÇÕES PESSOAIS:`) + languageDirective
}; };
const enrichedMessages = [dynamicSystemPrompt, ...messages]; const enrichedMessages = [dynamicSystemPrompt, ...messages];