feat: add Groq Whisper API support for transcription and translation
Add support for Groq Whisper API as an alternative to OpenAI: - groq-transcription: Fast transcription using whisper-large-v3 or whisper-large-v3-turbo - groq-translation: Translation to English (whisper-large-v3 only) Features: - New transcription adapters for both Groq services - Config validation with provider-specific model restrictions - API key support via config file or GROQ_API_KEY environment variable - Updated interactive configuration wizard with provider selection - Comprehensive test coverage for all providers - Shared WAV conversion utility for audio preprocessing Breaking changes: None Backward compatibility: Existing OpenAI configurations continue to work unchanged
This commit is contained in:
@@ -39,6 +39,18 @@ func NewTranscriber(config Config) (Transcriber, error) {
|
||||
}
|
||||
adapter = NewOpenAIAdapter(config)
|
||||
|
||||
case "groq-transcription":
|
||||
if config.APIKey == "" {
|
||||
return nil, fmt.Errorf("Groq API key required")
|
||||
}
|
||||
adapter = NewGroqTranscriptionAdapter(config)
|
||||
|
||||
case "groq-translation":
|
||||
if config.APIKey == "" {
|
||||
return nil, fmt.Errorf("Groq API key required")
|
||||
}
|
||||
adapter = NewGroqTranslationAdapter(config)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported provider: %s", config.Provider)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user