A more neutral and elegant voice.Transcriber interface

This commit is contained in:
Dimitrij Denissenko
2026-03-01 21:02:16 +00:00
parent b1386ad71f
commit b74f92ed28
4 changed files with 99 additions and 31 deletions
+1 -1
View File
@@ -276,7 +276,7 @@ var audioAnnotationRe = regexp.MustCompile(`\[(voice|audio)(?::[^\]]*)?\]`)
// transcribeAudioInMessage resolves audio media refs, transcribes them, and
// replaces audio annotations in msg.Content with the transcribed text.
func (al *AgentLoop) transcribeAudioInMessage(ctx context.Context, msg bus.InboundMessage) bus.InboundMessage {
if al.transcriber == nil || !al.transcriber.IsAvailable() || al.mediaStore == nil || len(msg.Media) == 0 {
if al.transcriber == nil || al.mediaStore == nil || len(msg.Media) == 0 {
return msg
}