Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
laves committed Nov 20, 2023
1 parent 6589436 commit da31ee8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions binding/python/test_leopard.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def _validate_metadata(
words: Sequence[Leopard.Word],
expected_words: Sequence[Leopard.Word],
enable_diarization: bool = False):
self.assertEqual(len(words), len(expected_words))
for i in range(len(words)):
self.assertEqual(words[i].word, expected_words[i].word)
self.assertAlmostEqual(words[i].start_sec, expected_words[i].start_sec, delta=0.01)
Expand Down Expand Up @@ -208,6 +209,7 @@ def test_diarization_multiple_speakers(
enable_diarization=True)

_, words = o.process_file(os.path.join(self._audio_directory, audio_file))
self.assertEqual(len(words), len(expected_words))
for i in range(len(words)):
self.assertEqual(words[i].word, expected_words[i].word)
self.assertEqual(words[i].speaker_tag, expected_words[i].speaker_tag)
Expand Down

0 comments on commit da31ee8

Please sign in to comment.