mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-07-11 15:55:03 +02:00
* Fix indentation of code sample in document comment * Make Whisper::Context#transcribe able to run non-parallel * Add test for Whisper::Context#transcribe with parallel option * Follow signature API change of Context#transcribe * Remove useless variable assignment * Move simple usage up in README * Add need help section in README * Add document on Context#transcribe's parallel option in README * Update date * Fix signature of Context.new * Make Context#subscribe accept n_processors option * Make test follow #transcribe's change * Make RBS follow #transcribe's change * Add document for #transcribe's n_processors option * Rename test directory so that Rake tasks' default setting is used
20 lines
486 B
Ruby
20 lines
486 B
Ruby
require_relative "helper"
|
|
|
|
class TestVAD < TestBase
|
|
def setup
|
|
@whisper = Whisper::Context.new("base.en")
|
|
vad_params = Whisper::VAD::Params.new
|
|
@params = Whisper::Params.new(
|
|
vad: true,
|
|
vad_model_path: "silero-v5.1.2",
|
|
vad_params:
|
|
)
|
|
end
|
|
|
|
def test_transcribe
|
|
@whisper.transcribe(TestBase::AUDIO, @params) do |text|
|
|
assert_match(/ask not what your country can do for you[,.] ask what you can do for your country/i, text)
|
|
end
|
|
end
|
|
end
|