mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-07-13 21:06:31 +02:00
* Add Apple frameworks to $LDFLAGS when needed * Add utility method to Options * Remove unnecessary propaty date from gemspec * Add Apple frameworks for CoreML build * Add Accelerate framework only for Apple platform * Fix ZipURI#cache signature * Download test fixtures if needed
25 lines
484 B
Ruby
25 lines
484 B
Ruby
require "test/unit"
|
|
require "whisper"
|
|
require_relative "jfk_reader/jfk_reader"
|
|
|
|
class TestBase < Test::Unit::TestCase
|
|
AUDIO = File.join(__dir__, "fixtures", "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
|