mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-04-26 22:09:44 +00:00
* Fix signature of URI.new7s return value * Use path instead of string | _ToPath * Add document comment to RBS * Remove unnecessary build flags * Remove unnecessary line * Remove files have become unnecessary * Make gem install accept build options for whisper.cpp * Add instraction for build options in README * Add methods for check to Options * Test build options * Rename: configs -> options * Add assert_installed assertion * Use assert_installed * Remove unused attribute * Extract dependency check logic as Dependencies class * Update README * Add WHISPER_FFMPEG option * Test extra build options only on local test * Bump version to 1.3.2 [skip ci]
36 lines
649 B
Ruby
36 lines
649 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
|
|
attr_reader :whisper
|
|
|
|
def startup
|
|
@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
|
|
|
|
module BuildOptions
|
|
load "ext/options.rb", self
|
|
Options.include self
|
|
|
|
def enable_config(name)
|
|
end
|
|
|
|
def arg_config(name)
|
|
end
|
|
end
|
|
end
|