summaryrefslogtreecommitdiff
path: root/internal/processor/processor.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-01 13:25:46 +0300
committerPaul Buetow <paul@buetow.org>2026-04-01 13:25:46 +0300
commit327817bae6a386f37d31d50a962c559d747a5383 (patch)
tree23de5d328176e665fb34c8ed9a7e3721738f2c14 /internal/processor/processor.go
parentd3fe3586f50545575978f8d73a649afabc915008 (diff)
zs: add Gemini-backed phonetic fetching
Diffstat (limited to 'internal/processor/processor.go')
-rw-r--r--internal/processor/processor.go6
1 files changed, 4 insertions, 2 deletions
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}),
}
}