import { Mic01Icon } from '@hugeicons/core-free-icons'; import { HugeiconsIcon } from '@hugeicons/react'; import { Icon } from '@iconify/react'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '@/components/ui/select'; import { Textarea } from '@/components/ui/textarea'; import { LANGUAGE_OPTIONS } from '@/lib/constants/languages'; import { useGenerationForm } from '@/lib/hooks/useGenerationForm'; import { useProfile } from '@/lib/hooks/useProfiles'; import { useUIStore } from '@/stores/uiStore'; export function GenerationForm() { const selectedProfileId = useUIStore((state) => state.selectedProfileId); const { data: selectedProfile } = useProfile(selectedProfileId || ''); const { form, handleSubmit, isPending } = useGenerationForm(); async function onSubmit(data: Parameters[0]) { await handleSubmit(data, selectedProfileId); } return ( Generate Speech
Voice Profile {selectedProfile ? (
{selectedProfile.name} {selectedProfile.language}
) : (
Click on a profile card above to select a voice profile
)}
( Text to Speak