import type { InputHTMLAttributes } from 'react'; import { useTranslation } from 'react-i18next'; import SettingsSection from '../SettingsSection'; import SettingsToggle from '../SettingsToggle'; import { useUiPreferences } from '../../../../hooks/useUiPreferences'; import { useVoiceConfig } from '../../../../hooks/useVoiceConfig'; const inputClass = 'w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring'; function Field({ label, ...props }: { label: string } & InputHTMLAttributes) { return ( ); } export default function VoiceSettingsTab() { const { t } = useTranslation('settings'); const { preferences, setPreference } = useUiPreferences(); const { config, update } = useVoiceConfig(); const voiceEnabled = preferences.voiceEnabled; return (
{t('voiceSettings.enable')}
{t('voiceSettings.enableDescription')}
setPreference('voiceEnabled', v)} ariaLabel={t('voiceSettings.enable')} />
{voiceEnabled && (
update({ baseUrl: e.target.value })} /> update({ apiKey: e.target.value })} />
update({ sttModel: e.target.value })} /> update({ ttsModel: e.target.value })} /> update({ ttsVoice: e.target.value })} /> update({ ttsFormat: e.target.value })} />

{t('voiceSettings.note')}

)}
); }