From 4e1d5a1937f2dc23df58e4d21a8e0ae77ec5e4df Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 20 Jul 2025 00:01:05 +0300 Subject: feat: make GUI default mode and always use random voice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GUI mode now launches by default when no arguments provided - Updated .desktop file to remove unnecessary --gui flag - Updated README to reflect GUI as default mode - Audio generation always uses random voice and speed (0.90-1.00) - No more defaulting to "alloy" voice for first generation - Bump version to 0.6.1 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- internal/gui/generator.go | 28 ++++++++++------------------ internal/version.go | 2 +- 2 files changed, 11 insertions(+), 19 deletions(-) (limited to 'internal') diff --git a/internal/gui/generator.go b/internal/gui/generator.go index 6cd0fca..a26aaa4 100644 --- a/internal/gui/generator.go +++ b/internal/gui/generator.go @@ -95,25 +95,15 @@ func (a *Application) generateAudio(ctx context.Context, word string) (string, e } } - // For regeneration, use random voice and speed; otherwise use defaults - var voice string - var speed float64 + // Always use random voice and speed + allVoices := []string{"alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"} - if isRegeneration { - // Get available voices - allVoices := []string{"alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"} + // Select a random voice + rand.Seed(time.Now().UnixNano()) + voice := allVoices[rand.Intn(len(allVoices))] - // Select a random voice - rand.Seed(time.Now().UnixNano()) - voice = allVoices[rand.Intn(len(allVoices))] - - // Generate random speed between 0.90 and 1.00 - speed = 0.90 + rand.Float64()*0.10 - } else { - // Use defaults for first generation - voice = "alloy" - speed = 1.0 - } + // Generate random speed between 0.90 and 1.00 + speed := 0.90 + rand.Float64()*0.10 // Create a copy of audio config with selected voice and speed audioConfig := *a.audioConfig @@ -121,9 +111,11 @@ func (a *Application) generateAudio(ctx context.Context, word string) (string, e audioConfig.OpenAISpeed = speed audioConfig.OutputDir = a.config.OutputDir // Ensure correct output directory - // Log the regeneration details + // Log the audio generation details if isRegeneration { fmt.Printf("Regenerating audio for '%s' with voice: %s, speed: %.2f\n", word, voice, speed) + } else { + fmt.Printf("Generating audio for '%s' with voice: %s, speed: %.2f\n", word, voice, speed) } // Create audio provider diff --git a/internal/version.go b/internal/version.go index 0a144ef..d9cf36a 100644 --- a/internal/version.go +++ b/internal/version.go @@ -1,3 +1,3 @@ package internal -const Version = "0.6.0" +const Version = "0.6.1" -- cgit v1.2.3