mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-09-03 18:16:45 +00:00
feat(audio): wire Scribe STT + legacy bridge in gateway setup
Register ElevenLabs Scribe and proxy STT providers in gateway initialization. Auto-wire legacy STT bridge from existing channel STTProxyURL configs. Implement setupAudioExtras() with RegisterSTT and SetSTTChain calls. Maintains backward compat with per-channel configs.
This commit is contained in:
@@ -315,4 +315,16 @@ func setupAudioExtras(cfg *config.Config, mgr *tts.Manager) {
|
||||
slog.Info("audio.music: minimax registered")
|
||||
}
|
||||
}
|
||||
|
||||
// ElevenLabs STT (Scribe v2) — reuse TTS credentials. Registered as tenant-scope
|
||||
// default; per-request tenant override lands via builtin_tools[stt] in Phase 5
|
||||
// channel migration. Legacy per-channel STTProxyURL is bridged separately.
|
||||
if ellKey != "" {
|
||||
mgr.RegisterSTT(elevenlabs.NewSTTProvider(elevenlabs.Config{
|
||||
APIKey: ellKey,
|
||||
BaseURL: ellBase,
|
||||
}))
|
||||
mgr.SetSTTChain([]string{"elevenlabs", "proxy"})
|
||||
slog.Info("audio.stt: elevenlabs registered")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/nextlevelbuilder/goclaw/internal/audio"
|
||||
"github.com/nextlevelbuilder/goclaw/internal/bootstrap"
|
||||
"github.com/nextlevelbuilder/goclaw/internal/bus"
|
||||
"github.com/nextlevelbuilder/goclaw/internal/config"
|
||||
@@ -139,7 +140,8 @@ func setupToolRegistry(
|
||||
if ttsMgr == nil {
|
||||
ttsMgr = tts.NewManager(tts.ManagerConfig{})
|
||||
}
|
||||
setupAudioExtras(cfg, ttsMgr) // Phase 3: registers Music + SFX providers.
|
||||
setupAudioExtras(cfg, ttsMgr) // Phase 3: registers Music + SFX providers.
|
||||
audio.BridgeLegacySTT(ttsMgr, cfg) // Phase 4: bridge per-channel STTProxyURL → channel-scoped providers.
|
||||
|
||||
// Audio generation tool — backed by audio.Manager (Music + SFX).
|
||||
toolsReg.Register(tools.NewCreateAudioTool(ttsMgr))
|
||||
|
||||
Reference in New Issue
Block a user