Skip to content

Commit

Permalink
update readme and fix rtd doc build
Browse files Browse the repository at this point in the history
  • Loading branch information
baxtree committed Jun 28, 2024
1 parent 28bf5d0 commit 9610c35
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ $ subaligner_train -vd VIDEO_DIRECTORY -sd SUBTITLE_DIRECTORY -tod TRAINING_OUTP
```
Then you can apply it to your subtitle synchronisation with the aforementioned commands. For more details on how to train and tune your own model, please refer to [Subaligner Docs](https://subaligner.readthedocs.io/en/latest/advanced_usage.html).

For larger media files taking longer to process, you can reconfigure various timeouts using the following options:
```
-mpt [Maximum waiting time in seconds when processing media files]
-sat [Maximum waiting time in seconds when aligning each segment]
-fet [Maximum waiting time in seconds when embedding features for training]
```

## Anatomy
Subtitles can be out of sync with their companion audiovisual media files for a variety of causes including latency introduced by Speech-To-Text on live streams or calibration and rectification involving human intervention during post-production.

Expand Down
5 changes: 2 additions & 3 deletions requirements-site.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
sphinx==3.3.1
sphinx-rtd-theme==0.5.0
docutils~=0.17.0
sphinx==6.2.1
sphinx-rtd-theme==2.0.0
jinja2<3.1.0
8 changes: 8 additions & 0 deletions site/source/advanced_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ is present, make sure the folder passed in is empty.
To apply your trained model to subtitle alignment, pass in the training_output_directory containing training results as
shown above with `-tod` or `--training_output_directory`.

You can customise timeouts on media file processing and feature embedding to your needs using the following options:
**Re-configure timeouts**::

-fet FEATURE_EMBEDDING_TIMEOUT, --feature_embedding_timeout FEATURE_EMBEDDING_TIMEOUT
Maximum waiting time in seconds when embedding features of media files
-mpt MEDIA_PROCESS_TIMEOUT, --media_process_timeout MEDIA_PROCESS_TIMEOUT
Maximum waiting time in seconds when processing media files

**Hyperparameters**::

-bs BATCH_SIZE, --batch_size BATCH_SIZE
Expand Down
1 change: 1 addition & 0 deletions site/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"transformers",
"pycountry",
"tqdm",
"whisper"
]

def setup(app):
Expand Down
8 changes: 8 additions & 0 deletions site/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ or `--stretch_on` as shown below.

The aforementioned commands can be run with `Docker Desktop <https://docs.docker.com/docker-for-windows/install/>`_ on Windows. Nonetheless, it is recommended to use Windows Subsystem for Linux (`WSL <https://learn.microsoft.com/en-us/windows/wsl/install>`_) to install Subaligner.

For larger media files taking longer to process, you can reconfigure timeouts using the following options:
**Re-configure timeouts**::

-mpt MEDIA_PROCESS_TIMEOUT, --media_process_timeout MEDIA_PROCESS_TIMEOUT
Maximum waiting time in seconds when processing media files
-sat SEGMENT_ALIGNMENT_TIMEOUT, --segment_alignment_timeout SEGMENT_ALIGNMENT_TIMEOUT
Maximum waiting time in seconds when aligning each segment

**Re-configure FFmpeg/Libav path**::

(.venv) $ export FFMPEG_PATH=/path/to/ffmpeg
Expand Down

0 comments on commit 9610c35

Please sign in to comment.