mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-06-02 16:05:35 +02:00
* Don't pass empty string to cmake command * Refactor Dependencies * Use found cmake path for options * Maintain extsources.rb * List dependent files by directory separator agnostic way * Prepend whitespace before '=' * Handle build options on install * Remove useless test * Retrieve gem file name and version from spec file * Bump version to 1.3.3 * Update date * Add install option examples * [skip ci]Remove unused module
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
|