mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-07-11 15:35: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
25 lines
501 B
Ruby
25 lines
501 B
Ruby
require "test/unit"
|
|
require "whisper"
|
|
require_relative "jfk_reader/jfk_reader"
|
|
|
|
class TestBase < Test::Unit::TestCase
|
|
AUDIO = File.join(__dir__, "..", "..", "..", "samples", "jfk.wav")
|
|
|
|
class << self
|
|
def whisper
|
|
return @whisper if @whisper
|
|
|
|
@whisper = Whisper::Context.new("base.en")
|
|
params = Whisper::Params.new
|
|
params.print_timestamps = false
|
|
@whisper.transcribe(TestBase::AUDIO, params)
|
|
end
|
|
end
|
|
|
|
private
|
|
|
|
def whisper
|
|
self.class.whisper
|
|
end
|
|
end
|