Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ class SileroVadTest {

@Test
fun synthesizedSpeechTriggersSpeechStartedAndEnded() = runBlocking {
// Fixture generation is deliberately outside the event timeouts. On a
// loaded emulator Kokoro can take longer than 30 seconds, but VAD has
// not received any audio yet and therefore has nothing to detect.
val audio = synthesize("The quick brown fox jumps over the lazy dog.")
val pipeline = SpeechPipeline(SpeechConfig(modelDir = modelDir, useNnapi = false))
try {
pipeline.start()
Expand All @@ -69,7 +73,6 @@ class SileroVadTest {
}
}

val audio = synthesize("The quick brown fox jumps over the lazy dog.")
for (offset in audio.indices step 512) {
val end = minOf(offset + 512, audio.size)
val chunk = audio.sliceArray(offset until end)
Expand Down
Loading