{ saveSettings({ audio: { stt: { engine: STTEngine !== '' ? STTEngine : undefined }, tts: { engine: TTSEngine !== '' ? TTSEngine : undefined, engineConfig: TTSEngineConfig, playbackRate: playbackRate, voice: voice !== '' ? voice : undefined, defaultVoice: $config?.audio?.tts?.voice ?? '', nonLocalVoices: $config.audio.tts.engine === '' ? nonLocalVoices : undefined } } }); dispatch('save'); }} >
{$i18n.t('STT Settings')}
{#if $config.audio.stt.engine !== 'web'}
{$i18n.t('Speech-to-Text Engine')}
{/if}
{$i18n.t('Instant Auto-Send After Voice Transcription')}
{$i18n.t('TTS Settings')}
{$i18n.t('Text-to-Speech Engine')}
{#if TTSEngine === 'browser-kokoro'}
{$i18n.t('Kokoro.js Dtype')}
{/if}
{$i18n.t('Auto-playback response')}
{$i18n.t('Speech Playback Speed')}

{#if TTSEngine === 'browser-kokoro'} {#if TTSModel}
{$i18n.t('Set Voice')}
{#each voices as voice} {/each}
{:else}
{$i18n.t('Loading Kokoro.js...')} {TTSModelProgress && TTSModelProgress.status === 'progress' ? `(${Math.round(TTSModelProgress.progress * 10) / 10}%)` : ''}
{$i18n.t('Please do not close the settings page while loading the model.')}
{/if} {:else if $config.audio.tts.engine === ''}
{$i18n.t('Set Voice')}
{$i18n.t('Allow non-local voices')}
{:else if $config.audio.tts.engine !== ''}
{$i18n.t('Set Voice')}
{#each voices as voice} {/each}
{/if}