sync: migrate ai-operator to Gitea (2026-08-10)
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user