diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-19 23:35:44 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-19 23:35:44 +0300 |
| commit | 6038d6e29d4878cccb46bf35bb9885ec7d376422 (patch) | |
| tree | f7861a731ba20db54e4ca578d6cd586ad8a87ab0 /internal/gui/generator.go | |
| parent | 3a6c690230f769ad33bc26e2fc5d5662e38fe3d6 (diff) | |
feat: improve flashcard storage and audio regenerationv0.6.0
- Change default card storage from ~/Downloads to ~/.local/state/totalrecall/cards/
- Keep .apkg exports in ~/Downloads for user convenience
- Fix audio regeneration to use random voice and speed (0.9-1.0)
- Fix GNOME dock icon by updating StartupWMClass to "Totalrecall"
- Fix navigation to properly find cards in new XDG state directory
- Ensure config defaults are properly filled when using GUI mode
- Bump version to 0.6.0
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'internal/gui/generator.go')
| -rw-r--r-- | internal/gui/generator.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/internal/gui/generator.go b/internal/gui/generator.go index 316cab8..6cd0fca 100644 --- a/internal/gui/generator.go +++ b/internal/gui/generator.go @@ -115,12 +115,19 @@ func (a *Application) generateAudio(ctx context.Context, word string) (string, e speed = 1.0 } - // Update audio config with selected voice and speed - a.audioConfig.OpenAIVoice = voice - a.audioConfig.OpenAISpeed = speed + // Create a copy of audio config with selected voice and speed + audioConfig := *a.audioConfig + audioConfig.OpenAIVoice = voice + audioConfig.OpenAISpeed = speed + audioConfig.OutputDir = a.config.OutputDir // Ensure correct output directory + + // Log the regeneration details + if isRegeneration { + fmt.Printf("Regenerating audio for '%s' with voice: %s, speed: %.2f\n", word, voice, speed) + } // Create audio provider - provider, err := audio.NewProvider(a.audioConfig) + provider, err := audio.NewProvider(&audioConfig) if err != nil { return "", err } |
