Skip to content

Commit 128068d

Browse files
committed
increase duration to make sure we have a segment
1 parent c8615bb commit 128068d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

inst/tinytest/test-multiple-offsets.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ if(Sys.getenv("TINYTEST_CI", unset = "yes") == "yes"){
1313
download.file("https://github.com/jwijffels/example/raw/main/example.wav", "example.wav")
1414
model <- whisper("tiny")
1515
trans <- predict(model, newdata = "example.wav", language = "en",
16-
offset = c(7*1000, 60*1000), duration = c(4*1500, 2*1000))
16+
offset = c(7*1000, 60*1000), duration = c(6*1000, 5*1000))
1717
expect_equal(trans$n_segments, 2)
1818
expect_equal(nrow(trans$data), 2)
1919

2020
## Multiple sections
2121
if(require(data.table) && require(audio)){
22-
sections <- data.frame(start = c(7*1000, 60*1000), duration = c(6*1000, 2*1000))
22+
sections <- data.frame(start = c(7*1000, 60*1000), duration = c(6*1000, 5*1000))
2323
trans <- predict(model, newdata = "example.wav", language = "en", sections = sections)
2424
expect_equal(trans$n_segments, 2)
2525
expect_equal(nrow(trans$data), 2)

0 commit comments

Comments
 (0)