feat: upload audio, get a private Swedish transcript, discuss it (#33, ADR-033) #39
@@ -74,6 +74,11 @@ func TestE2E_UploadTranscribeAndChat(t *testing.T) {
|
||||
cfg.GatewayKey = key
|
||||
cfg.UploadsEnabled = true
|
||||
cfg.UploadTmpDir = filepath.Join(t.TempDir(), "spool")
|
||||
if os.Getenv("TAPIR_E2E_RECONCILE") == "1" {
|
||||
// Two engines and a local model, as ADR-034 describes.
|
||||
cfg.ReconcileBaseModel = envOrDefault("TAPIR_E2E_BASE_MODEL", "iguana/pianissimo")
|
||||
cfg.ReconcileModel = envOrDefault("TAPIR_E2E_RECONCILE_MODEL", "iguana/gemma4-26b")
|
||||
}
|
||||
cfg.FFmpegBin = envOrDefault("TAPIR_E2E_FFMPEG", "ffmpeg")
|
||||
cfg.FFprobeBin = envOrDefault("TAPIR_E2E_FFPROBE", "ffprobe")
|
||||
|
||||
@@ -134,6 +139,15 @@ func TestE2E_UploadTranscribeAndChat(t *testing.T) {
|
||||
`SELECT status, endpoint, content, audio_seconds, had_video FROM uploaded_transcripts WHERE user_id = $1`, uid).
|
||||
Scan(&status, &endpoint, &content, &secs, &hadVideo))
|
||||
t.Logf("done: endpoint=%s audio_s=%.1f transcript_chars=%d had_video=%v", endpoint, secs, len(content), hadVideo)
|
||||
if os.Getenv("TAPIR_E2E_RECONCILE") == "1" {
|
||||
var recJSON string
|
||||
require.NoError(t, raw.QueryRow(ctx,
|
||||
`SELECT COALESCE(reconciliation::text, 'NULL') FROM uploaded_transcripts WHERE user_id = $1`, uid).Scan(&recJSON))
|
||||
require.NotEqual(t, "NULL", recJSON, "a two-engine run must record its reconciliation")
|
||||
t.Logf("reconciliation: %.600s", recJSON)
|
||||
assert.Contains(t, endpoint, "reconciled by", "every contributor is named in the endpoint")
|
||||
assert.Contains(t, page, "Reconciled from two transcripts")
|
||||
}
|
||||
if os.Getenv("TAPIR_E2E_HAD_VIDEO") == "1" {
|
||||
// A Teams meeting with the camera off: a video file whose audio is what matters.
|
||||
assert.True(t, hadVideo, "the file had a video track and the row must say so")
|
||||
|
||||
Reference in New Issue
Block a user