diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-02 17:46:07 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-02 17:46:07 +0300 |
| commit | f3d057fec20aeef584cb6340c6a002280a019f15 (patch) | |
| tree | 018be28f954243414969e8b8970fb3f3be8da112 /internal/gui | |
| parent | 1fc2ade33b72dd299fc987943ddd09dee7c609ad (diff) | |
task 002: restore Gemini warning output
Diffstat (limited to 'internal/gui')
| -rw-r--r-- | internal/gui/generator.go | 8 | ||||
| -rw-r--r-- | internal/gui/generator_test.go | 2 |
2 files changed, 5 insertions, 5 deletions
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) } |
