rename TranscriptionAdapter to BatchAdapter, add StreamingAdapter interface

This commit is contained in:
leonardotrapani
2026-02-01 00:35:38 +01:00
parent c23ac60b8f
commit db7e3951a5
12 changed files with 57 additions and 22 deletions
+3 -3
View File
@@ -14,8 +14,8 @@ type Transcriber interface {
GetFinalTranscription() (string, error)
}
// Adapter interface for different transcription backends
type TranscriptionAdapter interface {
// BatchAdapter interface for batch transcription backends (collect all audio, transcribe at end)
type BatchAdapter interface {
Transcribe(ctx context.Context, audioData []byte) (string, error)
}
@@ -31,7 +31,7 @@ type Config struct {
// NewTranscriber creates a new simple transcriber
func NewTranscriber(config Config) (Transcriber, error) {
// Create the appropriate adapter
var adapter TranscriptionAdapter
var adapter BatchAdapter
switch config.Provider {
case "openai":