Closed ianhajra closed 2 months ago
@ianhajra have we decided what libraries to use for stt?
@chungjryan I'll create an issue where we can dump ideas of good stt libraries into the comments. There are significant drawbacks to all of them, so we'll need to evaluate what works best
For now, go ahead and create a def stt(filepath: str) -> str: within speech_to_text.py and add the following line to init.py in nlp: from .speech_to_text.py import stt
That way, you can create the test_stt.py file and call from nlp import stt, then create a set of assertions that call something like the following:
assert stt('audio/path_one.wav') == "Hello world" assert stt('audio/path_two.wav') == "This is a test of a longer sentence" etc.
I know we haven't created the audio files and paths yet, there will be a separate issue that will create audio paths for each of the test cases you write. You can assume the pathing used in the above examples will work.
It is essential that the speech to text functionality of this program is consistent and effective. To ensure this is the case, we will need to have a robust set of tests that validate the consistency of this.
Tests should be placed in a new file that will be created when working on this issue: tests/nlp_tests/test_stt.py
We need these tests to use pytest for a consistent testing experience of the entire software.