From 52db6209145e7cb8f67674527c9c6a0713c9fa02 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Thu, 16 Oct 2025 19:46:31 +0000 Subject: [PATCH] Add voice types to generation --- src/components/audio/AudioView.tsx | 71 ++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 8 deletions(-) diff --git a/src/components/audio/AudioView.tsx b/src/components/audio/AudioView.tsx index a4155b1..c74aefb 100644 --- a/src/components/audio/AudioView.tsx +++ b/src/components/audio/AudioView.tsx @@ -24,12 +24,52 @@ interface TranscriptionResult { timestamp: Date; } +const VOICE_OPTIONS = { + alloy: { + label: "Alloy", + gender: "Masculina", + style: "Neutra, equilibrada, tom corporativo", + description: "Boa para tutoriais e comunicações institucionais." + }, + echo: { + label: "Echo", + gender: "Masculina", + style: "Forte e profissional, mais grave", + description: "Ideal para voz de autoridade ou locução firme." + }, + fable: { + label: "Fable", + gender: "Feminina", + style: "Narrativa, calorosa e envolvente", + description: "Ótima para storytelling e áudios empáticos." + }, + onyx: { + label: "Onyx", + gender: "Masculina", + style: "Grave, autoritária, impactante", + description: "Excelente para trailers, mensagens sérias ou institucionais." + }, + nova: { + label: "Nova", + gender: "Feminina", + style: "Brilhante, animada, energética", + description: "Boa para vídeos curtos, marketing ou conteúdos leves." + }, + shimmer: { + label: "Shimmer", + gender: "Feminina", + style: "Suave, otimista, clara", + description: "Boa para mensagens acolhedoras, explicações e IA conversacional." + } +}; + export const AudioView = () => { const [textToSpeech, setTextToSpeech] = useState(""); const [isProcessing, setIsProcessing] = useState(false); const [isTranscribing, setIsTranscribing] = useState(false); const [transcriptionResult, setTranscriptionResult] = useState(null); const [selectedFile, setSelectedFile] = useState(null); + const [selectedVoice, setSelectedVoice] = useState("alloy"); const { toast } = useToast(); const handleGenerateAudio = () => { @@ -260,26 +300,41 @@ export const AudioView = () => { /> -
-
+
+
- setSelectedVoice(value as keyof typeof VOICE_OPTIONS)}> - Neutra - Masculina - Feminina - Infantil + {Object.entries(VOICE_OPTIONS).map(([key, voice]) => ( + + {voice.label} - {voice.gender} + + ))}
+ {/* Voice Details */} +
+
+

{VOICE_OPTIONS[selectedVoice].label}

+ Modelo: OpenAI TTS-1 +
+

+ Estilo: {VOICE_OPTIONS[selectedVoice].style} +

+

+ {VOICE_OPTIONS[selectedVoice].description} +

+
+