-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import pytest | ||
from .audio import AudioProcessor | ||
from ..scraibe.audio import AudioProcessor | ||
import torch | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import pytest | ||
import os | ||
from unittest import mock | ||
from scraibe import Diariser | ||
from ..scraibe import Diariser | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
import pytest | ||
from unittest.mock import patch | ||
from scraibe import Transcriber | ||
|
||
from ..scraibe import Transcriber | ||
|
||
|
||
|
||
""" | ||
@pytest.mark.parametrize("audio_file, expected_transcription",[("path_to_test_audiofile", "test_transcription")] ) | ||
@patch("scraibe.Transcriber.load_model") | ||
def test_transcriber(mock_load_model, audio_file, expected_transcription): | ||
"""_summary_ | ||
Args: | ||
mock_load_model (_type_): _description_ | ||
audio_file (_type_): _description_ | ||
expected_transcription (_type_): _description_ | ||
""" | ||
mock_model = mock_load_model.return_value | ||
mock_model.transcribe.return_value ={"text": expected_transcription} | ||
transcriber = Transcriber.load_model(model="medium") | ||
transcription_result = transcriber.transcribe(audio=audio_file) | ||
assert transcription_result == expected_transcription | ||
assert transcription_result == expected_transcription """ | ||
|
||
|
||
|