Skip to content

Commit

Permalink
Update Whisper.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chidiwilliams committed Apr 24, 2023
1 parent fba8817 commit 5f7c325
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/transcriber_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class TestWhisperCppFileTranscriber:
'word_level_timings,expected_segments',
[
(False, [Segment(0, 6560,
'Bienvenue dans Passe-Relle. Un podcast pensé pour évêiller la curiosité des apprenances')]),
'Bienvenue dans Passe-Relle. Un podcast pensé pour')]),
(True, [Segment(0, 30, ''), Segment(30, 330, 'Bien'), Segment(330, 740, 'venue')])
])
def test_transcribe(self, qtbot: QtBot, word_level_timings: bool, expected_segments: List[Segment]):
Expand All @@ -90,8 +90,10 @@ def test_transcribe(self, qtbot: QtBot, word_level_timings: bool, expected_segme

mock_progress.assert_called()
segments = mock_completed.call_args[0][0]
for expected_segment in expected_segments:
assert expected_segment in segments
for i, expected_segment in enumerate(expected_segments):
assert expected_segment.start == segments[i].start
assert expected_segment.end == segments[i].end
assert expected_segment.text in segments[i].text


class TestWhisperFileTranscriber:
Expand Down

0 comments on commit 5f7c325

Please sign in to comment.