princeton-ddss/AudioAndTextBasedSpeakerChangeDetection

Re-organize file structure

Opened this issue · 0 comments

We should try to follow the PEP style guide: https://peps.python.org/pep-0008/#package-and-module-names.

Here's a possible package structure:

src
|- ensemble.py 
|- models
    |- llama2
        |- templates.py
        |- inference.py
        |- __init__.py
    |- nlp.py
    |- pyannote.py
    |- clustering.py
    |- __init__.py
|- run_speaker_detection.py
|- __init__.py

This should allow you to write imports like:

from models.nlp import run_nlp
from models.llama2 import run_llama2

In my opinion, putting a __main__.py files in src suggests that we should be able to run the package's main function from the command line, e.g.,

python -m main.py

It almost suggests that the package installs an executable that can be run without calling python. I suggest changing main.py to run_speaker_detection.py and modifying so that it can be run like

python -m run_speaker_detection.py