ReadAlongs/Studio

Refactoring idea: change web_api so it does not import soundswallower

Opened this issue · 0 comments

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.