docstring added and variable type
This commit is contained in:
@@ -10,7 +10,7 @@ def diariser_instance():
|
||||
"""Creates a instance of the Diariser Object for further testing
|
||||
|
||||
Returns:
|
||||
_type_: _description_
|
||||
Object: Diariser Object for handling the diarization process of an audio file using a pretrained model from pyannote.audio. Diarization is the task of determining "who spoke when."
|
||||
"""
|
||||
with mock.patch.object(Diariser, '_get_token', return_value = 'personal Hugging-Face token')
|
||||
return Diariser('pyannote')
|
||||
@@ -21,17 +21,17 @@ def test_Diariser_init(diariser_instance):
|
||||
"""Tests if the Diariser gets initiated correctly
|
||||
|
||||
Args:
|
||||
diariser_instance
|
||||
diariser_instance (obj): instance of the Diariser object
|
||||
"""
|
||||
assert diariser_instance.model == 'pyannote'
|
||||
|
||||
|
||||
|
||||
def test_diarisation_function(diariser_instance):
|
||||
"""tests if the Diariser object with an example audio File
|
||||
"""tests if the Diariser works object with an example audio File
|
||||
|
||||
Args:
|
||||
diariser_instance
|
||||
diariser_instance (obj): instance of the Diariser object
|
||||
"""
|
||||
with mock.patch.object(diariser_instance.model, 'apply', return_value='diarization_result'):
|
||||
diarization_output = diariser_instance.diarization('example_audio_file.wav')
|
||||
|
||||
Reference in New Issue
Block a user