feat: models test and fixes

This commit is contained in:
leonardotrapani
2026-02-02 01:13:33 +01:00
parent 2729882b9d
commit 195f9f5115
34 changed files with 507 additions and 154 deletions
+7 -5
View File
@@ -83,14 +83,16 @@ func NewTranscriber(config Config) (Transcriber, error) {
config.Language = ""
}
// determine if we should use streaming mode
useStreaming := config.Streaming && model.SupportsStreaming
// fail if streaming-only model is used without streaming enabled
if !useStreaming && !model.SupportsBatch {
// validate streaming/batch mode compatibility
if config.Streaming && !model.SupportsStreaming {
return nil, fmt.Errorf("model %s does not support streaming mode", model.ID)
}
if !config.Streaming && !model.SupportsBatch {
return nil, fmt.Errorf("model %s requires streaming mode (set streaming = true in config)", model.ID)
}
useStreaming := config.Streaming
// streaming mode: use StreamingTranscriber
if useStreaming {
// pick the right adapter type for streaming