Commit
·
97246dc
1
Parent(s):
5d7177a
improve readme
Browse files
README.md
CHANGED
|
@@ -4,26 +4,31 @@ A multilingual automatic speech recognition and video captioning tool using fast
|
|
| 4 |
|
| 5 |
<video width="400" height="300" src="https://github.com/marquesafonso/multilang-asr-captioner/assets/79766107/fcff8ac1-cdfc-4400-821c-f797d84c2d8a"></video>
|
| 6 |
|
| 7 |
-
##
|
| 8 |
|
| 9 |
-
|
| 10 |
-
```{bash}
|
| 11 |
-
git clone [email protected]:marquesafonso/multilang-asr-captioner.git
|
| 12 |
-
```
|
| 13 |
-
2. Build and run the container using docker-compose
|
| 14 |
|
| 15 |
-
|
| 16 |
-
docker compose up
|
| 17 |
-
```
|
| 18 |
-
Then check the [landing page](http://127.0.0.1:8000).
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
To run this tool locally on your computer you will need the following sofware installed:
|
| 29 |
+ [ImageMagick](https://imagemagick.org/script/download.php)
|
|
@@ -41,32 +46,34 @@ pipenv install
|
|
| 41 |
|
| 42 |
Note that this assumes a proper Git installation and ssh key configuration.
|
| 43 |
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
```
|
| 51 |
-
pipenv run python
|
| 52 |
```
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
|
| 57 |
-
pipenv run python cli.py --invideo_filename '<your_file>' --video_url 'https://www.youtube.com/watch?v=<your_youtube_video>' --max_words_per_line 8 --fontsize 28 --font "Arial-Bold" --bg_color None --text_color 'white'
|
| 58 |
-
```
|
| 59 |
|
| 60 |
-
|
| 61 |
|
| 62 |
-
|
| 63 |
|
| 64 |
-
|
| 65 |
|
| 66 |
```
|
| 67 |
-
pipenv run python
|
| 68 |
```
|
| 69 |
|
| 70 |
-
|
| 71 |
|
| 72 |
-
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
<video width="400" height="300" src="https://github.com/marquesafonso/multilang-asr-captioner/assets/79766107/fcff8ac1-cdfc-4400-821c-f797d84c2d8a"></video>
|
| 6 |
|
| 7 |
+
## Requirements and Instalations
|
| 8 |
|
| 9 |
+
### Docker (preferred)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
You'll need to install [docker](https://www.docker.com/products/docker-desktop/).
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
+
Then, follow the steps below.
|
| 14 |
|
| 15 |
+
1. clone the repo
|
| 16 |
+
```{bash}
|
| 17 |
+
git clone [email protected]:marquesafonso/multilang-asr-captioner.git
|
| 18 |
+
```
|
| 19 |
+
2. Build and run the container using docker-compose
|
| 20 |
|
| 21 |
+
```{bash}
|
| 22 |
+
docker compose up
|
| 23 |
+
```
|
| 24 |
|
| 25 |
+
Check the [landing page](http://127.0.0.1:8000).
|
| 26 |
+
|
| 27 |
+
From there you will see the [submit_video endpoint](http://127.0.0.1:8000/submit_video/) and the [documentation](http://127.0.0.1:8000/docs/)
|
| 28 |
+
|
| 29 |
+
**Tip**: on Linux or Mac localhost will resolve directly to 0.0.0.0 but on windows you will need to change it to 127.0.0.1
|
| 30 |
+
|
| 31 |
+
### Local
|
| 32 |
|
| 33 |
To run this tool locally on your computer you will need the following sofware installed:
|
| 34 |
+ [ImageMagick](https://imagemagick.org/script/download.php)
|
|
|
|
| 46 |
|
| 47 |
Note that this assumes a proper Git installation and ssh key configuration.
|
| 48 |
|
| 49 |
+
## Quick start (local)
|
| 50 |
+
|
| 51 |
+
### API
|
| 52 |
|
| 53 |
+
A FastAPI API is available. This is the easiest way to use the program locally, akin to docker.
|
| 54 |
|
| 55 |
+
To start the API run:
|
| 56 |
|
| 57 |
```
|
| 58 |
+
pipenv run python main.py
|
| 59 |
```
|
| 60 |
|
| 61 |
+
Then check the [landing page](http://127.0.0.1:8000).
|
| 62 |
|
| 63 |
+
From there you will see the [submit_video endpoint](http://127.0.0.1:8000/submit_video/) and the [documentation](http://127.0.0.1:8000/docs/)
|
|
|
|
|
|
|
| 64 |
|
| 65 |
+
**Tip**: on Linux or Mac localhost will resolve directly to 0.0.0.0 but on windows you will need to change it to 127.0.0.1
|
| 66 |
|
| 67 |
+
### Command Line Interface
|
| 68 |
|
| 69 |
+
Run the following code to use the CLI. The input file must be in mp4 format.
|
| 70 |
|
| 71 |
```
|
| 72 |
+
pipenv run python cli.py --invideo_filename '<your_file_name>' --max_words_per_line 8
|
| 73 |
```
|
| 74 |
|
| 75 |
+
Fontsize, Font, Background Color and Text Color arguments are available:
|
| 76 |
|
| 77 |
+
```
|
| 78 |
+
pipenv run python cli.py --invideo_filename '<your_file>' --max_words_per_line 8 --fontsize 28 --font "Arial-Bold" --bg_color None --text_color 'white'
|
| 79 |
+
```
|