{ saveSettings({ audio: { stt: { engine: STTEngine !== '' ? STTEngine : undefined }, tts: { voice: $config.audio.tts.engine === 'openai' ? voice : voice !== '' ? voice : undefined, 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')}
{$i18n.t('Default')}
{$i18n.t('Web API')}
{/if}
{$i18n.t('Instant Auto-Send After Voice Transcription')}
{ toggleSpeechAutoSend(); }} type="button" > {#if speechAutoSend === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{$i18n.t('TTS Settings')}
{$i18n.t('Auto-playback response')}
{ toggleResponseAutoPlayback(); }} type="button" > {#if responseAutoPlayback === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{#if $config.audio.tts.engine === ''}
{$i18n.t('Set Voice')}
{$i18n.t('Default')}
{#each voices.filter((v) => nonLocalVoices || v.localService === true) as _voice}
{_voice.name}
{/each}
{$i18n.t('Allow non-local voices')}
{:else if $config.audio.tts.engine === 'openai'}
{$i18n.t('Set Voice')}
{#each voices as voice}
{/each}
{/if}
{$i18n.t('Save')}