Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring idea: change web_api so it does not import soundswallower #170

Open
joanise opened this issue Feb 28, 2023 · 0 comments
Open

Comments

@joanise
Copy link
Member

joanise commented Feb 28, 2023

Currently, there are three text-manipulation functions that web_api.py imports from align.py:

from readalongs.align import create_ras_from_text, save_label_files, save_subtitles

and because of that, soundswallower is a dependency even for the web-API, even though it does not use it.

Refactoring proposal:

  • move these three functions to a more appropriate location, maybe under readalongs/text
  • change requirements.txt so it does not install soundswallower by default, making it optional, only required for using the CLI

Benefit: our Heroku image will be smaller, and any Docker image to run the web-api too.
Side node: the Docker image can also skip ffmpeg, only the CLI needs that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant