mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-07-11 16:25: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
21 lines
451 B
Ruby
21 lines
451 B
Ruby
require_relative "helper"
|
|
|
|
class TestError < TestBase
|
|
def test_error
|
|
error = Whisper::Error.new(-2)
|
|
assert_equal "failed to compute log mel spectrogram", error.message
|
|
assert_equal(-2, error.code)
|
|
end
|
|
|
|
def test_unknown_error
|
|
error = Whisper::Error.new(-20)
|
|
assert_equal "unknown error", error.message
|
|
end
|
|
|
|
def test_non_int_code
|
|
assert_raise TypeError do
|
|
_error = Whisper::Error.new("non int")
|
|
end
|
|
end
|
|
end
|