Verify mixed audio retries and transport

This commit is contained in:
2026-12-02 03:19:22 +00:00
parent 3b16bf2790
commit 9e2fc7313e
5 changed files with 96 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ func TestHTTPClientTranscribeSuccess(t *testing.T) {
t.Fatalf("NewHTTPClientFromConfigValues() error = %v", err)
}
audioPath := writeWhisperXTestFile(t, "audio.flac", "audio-data")
audioPath := writeWhisperXTestFile(t, "audio.mp3", "audio-data")
outPath := filepath.Join(t.TempDir(), "raw.json")
res, err := client.Transcribe(context.Background(), TranscribeRequest{
@@ -74,8 +74,8 @@ func TestHTTPClientTranscribeSuccess(t *testing.T) {
if gotLanguage != "en" {
t.Fatalf("language = %q, want en", gotLanguage)
}
if gotFileField != "audio.flac" {
t.Fatalf("file field filename = %q, want audio.flac", gotFileField)
if gotFileField != "audio.mp3" {
t.Fatalf("file field filename = %q, want audio.mp3", gotFileField)
}
if gotFileSize == 0 {
t.Fatal("file size = 0, want >0")