Skip to content

Commit 42e0f4c

Browse files
committed
Updated some tests
1 parent 5657c5a commit 42e0f4c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

pkg/whisper/whisper_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
const MODEL_TINY = "ggml-tiny.en-q5_1.bin"
2020
const SAMPLE_EN = "../../samples/jfk.wav"
2121
const SAMPLE_FR = "../../samples/OlivierL.wav"
22-
const SAMPLE_DE = "../../samples/ge-podcast.wav"
22+
const SAMPLE_DE = "../../samples/de-podcast.wav"
2323

2424
func Test_whisper_001(t *testing.T) {
2525
assert := assert.New(t)
@@ -225,7 +225,7 @@ func Test_whisper_005(t *testing.T) {
225225

226226
assert.NoError(service.WithModel(model, func(task *task.Context) error {
227227
t.Log("Transcribing", len(samples), "samples")
228-
return task.Transcribe(context.Background(), 0, samples, false, nil)
228+
return task.Transcribe(context.Background(), 0, samples, nil)
229229
}))
230230
})
231231

@@ -241,7 +241,7 @@ func Test_whisper_005(t *testing.T) {
241241

242242
assert.NoError(service.WithModel(model, func(task *task.Context) error {
243243
t.Log("Transcribing", len(samples), "samples")
244-
return task.Transcribe(context.Background(), 0, samples, false, nil)
244+
return task.Transcribe(context.Background(), 0, samples, nil)
245245
}))
246246
})
247247

@@ -257,7 +257,7 @@ func Test_whisper_005(t *testing.T) {
257257

258258
assert.NoError(service.WithModel(model, func(task *task.Context) error {
259259
t.Log("Transcribing", len(samples), "samples")
260-
return task.Transcribe(context.Background(), 0, samples, false, nil)
260+
return task.Transcribe(context.Background(), 0, samples, nil)
261261
}))
262262
})
263263
}
@@ -294,7 +294,7 @@ func Test_whisper_006(t *testing.T) {
294294

295295
assert.NoError(service.WithModel(model, func(task *task.Context) error {
296296
t.Log("Transcribing", len(samples), "samples")
297-
return task.Transcribe(context.Background(), 0, samples, false, nil)
297+
return task.Transcribe(context.Background(), 0, samples, nil)
298298
}))
299299
})
300300

@@ -312,7 +312,7 @@ func Test_whisper_006(t *testing.T) {
312312

313313
assert.NoError(service.WithModel(model, func(task *task.Context) error {
314314
t.Log("Transcribing", len(samples), "samples")
315-
return task.Transcribe(context.Background(), 0, samples, false, nil)
315+
return task.Transcribe(context.Background(), 0, samples, nil)
316316
}))
317317
})
318318

@@ -330,7 +330,7 @@ func Test_whisper_006(t *testing.T) {
330330

331331
assert.NoError(service.WithModel(model, func(task *task.Context) error {
332332
t.Log("Transcribing", len(samples), "samples")
333-
return task.Transcribe(context.Background(), 0, samples, false, nil)
333+
return task.Transcribe(context.Background(), 0, samples, nil)
334334
}))
335335
})
336336
})

sys/whisper/whisper_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
const SAMPLE_EN = "../../samples/jfk.wav"
1717
const SAMPLE_FR = "../../samples/OlivierL.wav"
18-
const SAMPLE_DE = "../../samples/ge-podcast.wav"
18+
const SAMPLE_DE = "../../samples/de-podcast.wav"
1919

2020
func Test_whisper_00(t *testing.T) {
2121
assert := assert.New(t)
@@ -482,7 +482,7 @@ func Test_whisper_05(t *testing.T) {
482482
params.SetLanguage("auto")
483483
params.SetTranslate(false)
484484
params.SetTokenTimestamps(true)
485-
params.SetDiarizeEnable(true)
485+
params.SetDiarize(true)
486486
params.SetSegmentCallback(ctx, func(new_segments int) {
487487
num_segments := ctx.NumSegments()
488488
for i := num_segments - new_segments; i < num_segments; i++ {
@@ -518,7 +518,7 @@ func Test_whisper_05(t *testing.T) {
518518
params.SetLanguage("auto")
519519
params.SetTranslate(false)
520520
params.SetTokenTimestamps(true)
521-
params.SetDiarizeEnable(true)
521+
params.SetDiarize(true)
522522
params.SetSegmentCallback(ctx, func(new_segments int) {
523523
num_segments := ctx.NumSegments()
524524
for i := num_segments - new_segments; i < num_segments; i++ {

0 commit comments

Comments
 (0)