From f3d057fec20aeef584cb6340c6a002280a019f15 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 2 Apr 2026 17:46:07 +0300 Subject: task 002: restore Gemini warning output --- internal/gui/generator.go | 8 ++++---- internal/gui/generator_test.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/gui') diff --git a/internal/gui/generator.go b/internal/gui/generator.go index f3fe9b5..72c7c51 100644 --- a/internal/gui/generator.go +++ b/internal/gui/generator.go @@ -187,7 +187,7 @@ func (a *Application) generateAudio(ctx context.Context, word string, cardDir st fmt.Printf("Retrying Gemini audio with voice: %s\n", candidate) } return a.generateAudioFile(ctx, word, outputFile, candidate, speed) - }) + }, nil) } else { err = a.generateAudioFile(ctx, word, outputFile, voice, speed) } @@ -229,7 +229,7 @@ func (a *Application) generateAudioFront(ctx context.Context, word string, cardD fmt.Printf("Retrying Gemini audio with voice: %s\n", candidate) } return a.generateAudioFile(ctx, word, frontFile, candidate, speed) - }) + }, nil) } else { err = a.generateAudioFile(ctx, word, frontFile, voice, speed) } @@ -269,7 +269,7 @@ func (a *Application) generateAudioBack(ctx context.Context, text string, cardDi fmt.Printf("Retrying Gemini audio with voice: %s\n", candidate) } return a.generateAudioFile(ctx, text, backFile, candidate, speed) - }) + }, nil) } else { err = a.generateAudioFile(ctx, text, backFile, voice, speed) } @@ -325,7 +325,7 @@ func (a *Application) generateAudioBgBg(ctx context.Context, front, back, cardDi fmt.Printf("Retrying Gemini audio with voice: %s\n", candidate) } return runPair(candidate) - }) + }, nil) } else { err = runPair(voice) } diff --git a/internal/gui/generator_test.go b/internal/gui/generator_test.go index fcb8f51..6892fb1 100644 --- a/internal/gui/generator_test.go +++ b/internal/gui/generator_test.go @@ -400,7 +400,7 @@ func TestGenerateGeminiAudioWithFallbacksRetriesAlternateVoice(t *testing.T) { voice, err := audio.RunWithVoiceFallbacks("Charon", func(candidate string) error { return app.generateAudioFile(context.Background(), "ябълка", outputPath, candidate, 1.0) - }) + }, nil) if err != nil { t.Fatalf("RunWithVoiceFallbacks() unexpected error: %v", err) } -- cgit v1.2.3