mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-08-09 12:25:46 +02:00
ruby : add Whisper::VERSION (#3292)
* Add a test for segment * Check option existence * Use more proper variable to define build option * Assert Core ML enabled * Define Whisper::VERSION * Add test for Whisper::VERSION * Add signature of Whisper::VERSION
This commit is contained in:
@ -72,6 +72,16 @@ class TestSegment < TestBase
|
||||
whisper.transcribe(AUDIO, params)
|
||||
end
|
||||
|
||||
def test_transcription_after_segment_retrieved
|
||||
params = Whisper::Params.new
|
||||
segment = whisper.each_segment.first
|
||||
assert_match(/ask not what your country can do for you, ask what you can do for your country/, segment.text)
|
||||
|
||||
whisper.transcribe(AUDIO, Whisper::Params.new(offset: 5000))
|
||||
assert_not_match(/ask not what your country can do for you, ask what you can do for your country/, segment.text)
|
||||
assert_match(/what you can do for your country/i, segment.text)
|
||||
end
|
||||
|
||||
def test_pattern_matching
|
||||
segment = whisper.each_segment.first
|
||||
segment => {start_time:, end_time:, text:, no_speech_prob:, speaker_turn_next:}
|
||||
|
Reference in New Issue
Block a user