From 327817bae6a386f37d31d50a962c559d747a5383 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 1 Apr 2026 13:25:46 +0300 Subject: zs: add Gemini-backed phonetic fetching --- internal/processor/processor.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'internal/processor/processor.go') diff --git a/internal/processor/processor.go b/internal/processor/processor.go index 94b0448..970dafd 100644 --- a/internal/processor/processor.go +++ b/internal/processor/processor.go @@ -33,12 +33,14 @@ type Processor struct { // NewProcessor creates a new word processor func NewProcessor(flags *cli.Flags) *Processor { openAIKey := cli.GetOpenAIKey() + googleAPIKey := cli.GetGoogleAPIKey() translationProvider := translation.Provider(viper.GetString("translation.provider")) + phoneticProvider := phonetic.Provider(viper.GetString("phonetic.provider")) return &Processor{ flags: flags, - translator: translation.NewTranslator(&translation.Config{Provider: translationProvider, OpenAIKey: openAIKey, GoogleAPIKey: cli.GetGoogleAPIKey()}), + translator: translation.NewTranslator(&translation.Config{Provider: translationProvider, OpenAIKey: openAIKey, GoogleAPIKey: googleAPIKey}), translationCache: translation.NewTranslationCache(), - phoneticFetcher: phonetic.NewFetcher(openAIKey), + phoneticFetcher: phonetic.NewFetcher(&phonetic.Config{Provider: phoneticProvider, OpenAIKey: openAIKey, GoogleAPIKey: googleAPIKey}), } } -- cgit v1.2.3