sync: migrate ai-operator to Gitea (2026-08-10)

This commit is contained in:
konturai-ops
2026-08-10 15:26:52 +00:00
commit 53652b95ad
173 changed files with 16676 additions and 0 deletions
@@ -0,0 +1,15 @@
package tts
import "testing"
func TestParseAudioIgnoresControlJSON(t *testing.T) {
if got := parseAudio([]byte(`{"isFinal":true}`)); len(got) != 0 {
t.Fatalf("control json parsed as audio: %d bytes", len(got))
}
if got := parseAudio([]byte(`{"audio":"AQI="}`)); len(got) != 2 {
t.Fatalf("audio json not decoded: %d bytes", len(got))
}
if got := parseAudio([]byte{0, 1, 0, 1}); len(got) != 4 {
t.Fatalf("binary audio not passed through: %d bytes", len(got))
}
}