refac: speedRate -> playbackRate
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
let voice = '';
|
||||
|
||||
// Audio speed control
|
||||
let speechRate = 1;
|
||||
let playbackRate = 1;
|
||||
const speedOptions = [2, 1.75, 1.5, 1.25, 1, 0.75, 0.5];
|
||||
|
||||
const getVoices = async () => {
|
||||
@@ -60,7 +60,7 @@
|
||||
};
|
||||
|
||||
onMount(async () => {
|
||||
speechRate = $settings.audio?.tts?.speedRate ?? 1;
|
||||
playbackRate = $settings.audio?.tts?.playbackRate ?? 1;
|
||||
conversationMode = $settings.conversationMode ?? false;
|
||||
speechAutoSend = $settings.speechAutoSend ?? false;
|
||||
responseAutoPlayback = $settings.responseAutoPlayback ?? false;
|
||||
@@ -88,7 +88,7 @@
|
||||
engine: STTEngine !== '' ? STTEngine : undefined
|
||||
},
|
||||
tts: {
|
||||
speedRate: speechRate,
|
||||
playbackRate: playbackRate,
|
||||
voice: voice !== '' ? voice : undefined,
|
||||
defaultVoice: $config?.audio?.tts?.voice ?? '',
|
||||
nonLocalVoices: $config.audio.tts.engine === '' ? nonLocalVoices : undefined
|
||||
@@ -161,15 +161,15 @@
|
||||
</div>
|
||||
|
||||
<div class=" py-0.5 flex w-full justify-between">
|
||||
<div class=" self-center text-xs font-medium">{$i18n.t('Speed Rate')}</div>
|
||||
<div class=" self-center text-xs font-medium">{$i18n.t('Speech Playback Speed')}</div>
|
||||
|
||||
<div class="flex items-center relative">
|
||||
<select
|
||||
class="dark:bg-gray-900 w-fit pr-8 rounded px-2 p-1 text-xs bg-transparent outline-none text-right"
|
||||
bind:value={speechRate}
|
||||
bind:value={playbackRate}
|
||||
>
|
||||
{#each speedOptions as option}
|
||||
<option value={option} selected={speechRate === option}>{option}x</option>
|
||||
<option value={option} selected={playbackRate === option}>{option}x</option>
|
||||
{/each}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user