Skip to content

Commit

Permalink
fix(tts): settings dialog waits for voices to load
Browse files Browse the repository at this point in the history
  • Loading branch information
marisademeglio committed Nov 8, 2024
1 parent 2e98dd5 commit 98198e4
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions src/renderer/components/SettingsView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -379,21 +379,26 @@ export function SettingsView() {
</div>
) : selectedSection == SelectedMenuItem.TTSVoices ? (
<div className="tts-voices-config">
<TtsVoicesConfigPane
availableVoices={pipeline.ttsVoices}
userPreferredVoices={
newSettings.ttsConfig.preferredVoices
}
userDefaultVoices={
newSettings.ttsConfig.defaultVoices
}
onChangePreferredVoices={
onTtsVoicesPreferenceChange
}
onChangeDefaultVoices={
onTtsVoicesDefaultsChange
}
/>
{pipeline.ttsVoices ? (
<TtsVoicesConfigPane
availableVoices={pipeline.ttsVoices}
userPreferredVoices={
newSettings.ttsConfig.preferredVoices
}
ttsEnginesStates={pipeline.ttsEnginesStates}
userDefaultVoices={
newSettings.ttsConfig.defaultVoices
}
onChangePreferredVoices={
onTtsVoicesPreferenceChange
}
onChangeDefaultVoices={
onTtsVoicesDefaultsChange
}
/>
) : (
<p>Loading voices...</p>
)}
</div>
) : selectedSection == SelectedMenuItem.TTSEngines ? (
<div className="tts-engines-config">
Expand Down

0 comments on commit 98198e4

Please sign in to comment.