From 25fed85de5688c07b1935cd0f3135241d45fada9 Mon Sep 17 00:00:00 2001 From: Maria Date: Wed, 4 Jan 2023 21:13:34 +0300 Subject: [PATCH 1/6] docker --- docker/Dockerfile | 11 +++++++++++ docker/README.md | 37 +++++++++++++++++++++++++++++++++++++ wiki/INSTALL.md | 3 +++ 3 files changed, 51 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/README.md diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 00000000..9b975642 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.5 + +RUN apt update && \ + apt install -y ffmpeg espeak && \ + apt install -y libespeak-dev && \ + pip install numpy && \ + pip install aeneas && \ + + wget https://espeak.sourceforge.net/data/ru_dict-48.zip && \ + unzip ru_dict-48.zip && \ + cp ru_dict-48 /usr/lib/x86_64-linux-gnu/espeak-data/ru_dict \ No newline at end of file diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 00000000..9c3649d5 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,37 @@ +# Building aeneas in docker + +[aeneas](https://github.com/readbeyond/aeneas) is a Python/C library and a set of tools to automagically synchronize audio and text (aka forced alignment). + +Additionally, russian [espeak libraries](https://espeak.sourceforge.net/data/) add into container. + +### Build + +You need to install [Docker](https://docs.docker.com/engine/install/) and, optionally, [Docker Compose](https://docs.docker.com/compose/install/). + +Clone this project, cd to its folder and run: +``` +$ docker build -t aenaes:latest . +``` + +### Usage + +To check (get the usage message): + +``` +$ docker run --name aenaes --rm aenaes python -m aeneas.tools.execute_task +``` + +To compute a synchronization map `map.json` for a pair (`audio.mp3`, `text.txt` in [plain](http://www.readbeyond.it/aeneas/docs/textfile.html#aeneas.textfile.TextFileFormat.PLAIN) text format): + +``` +$ docker run --name aenaes --rm aenaes python -m aeneas.tools.execute_task \ + audio.mp3 \ + text.txt \ + "task_language=eng|os_task_file_format=json|is_text_type=plain" \ + --presets-word + map.json +``` + +P.S. I recommend to use `--presets-word` option to get better rusults. + +For more information, see official repo: https://github.com/readbeyond/aeneas#usage diff --git a/wiki/INSTALL.md b/wiki/INSTALL.md index 84454985..61df6e79 100644 --- a/wiki/INSTALL.md +++ b/wiki/INSTALL.md @@ -54,6 +54,9 @@ Below you can find detailed procedures for each operating system. **Note**: you must install `numpy` before `aeneas`, otherwise the setup process will fail. +## OS Independent Via `Docker` + +See [docker](https://github.com/readbeyond/aeneas/blob/master/docker/) directory. ## Linux From 3401b12e943f195fe3faf964ef62974b9d86aa39 Mon Sep 17 00:00:00 2001 From: Maria Date: Wed, 4 Jan 2023 21:28:43 +0300 Subject: [PATCH 2/6] fix docker description --- docker/Dockerfile | 5 +++-- docker/README.md | 8 +------- wiki/INSTALL.md | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 9b975642..2638a5a8 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,11 +1,12 @@ FROM python:3.5 RUN apt update && \ - apt install -y ffmpeg espeak && \ + apt install -y ffmpeg espeak=1.48.04+dfsg-7+deb10u1 && \ apt install -y libespeak-dev && \ pip install numpy && \ pip install aeneas && \ - wget https://espeak.sourceforge.net/data/ru_dict-48.zip && \ +# Adding russian libraries +RUN wget https://espeak.sourceforge.net/data/ru_dict-48.zip && \ unzip ru_dict-48.zip && \ cp ru_dict-48 /usr/lib/x86_64-linux-gnu/espeak-data/ru_dict \ No newline at end of file diff --git a/docker/README.md b/docker/README.md index 9c3649d5..990a9a23 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,12 +1,10 @@ # Building aeneas in docker -[aeneas](https://github.com/readbeyond/aeneas) is a Python/C library and a set of tools to automagically synchronize audio and text (aka forced alignment). - Additionally, russian [espeak libraries](https://espeak.sourceforge.net/data/) add into container. ### Build -You need to install [Docker](https://docs.docker.com/engine/install/) and, optionally, [Docker Compose](https://docs.docker.com/compose/install/). +You need to have [Docker](https://docs.docker.com/engine/install/). Clone this project, cd to its folder and run: ``` @@ -31,7 +29,3 @@ $ docker run --name aenaes --rm aenaes python -m aeneas.tools.execute_task \ --presets-word map.json ``` - -P.S. I recommend to use `--presets-word` option to get better rusults. - -For more information, see official repo: https://github.com/readbeyond/aeneas#usage diff --git a/wiki/INSTALL.md b/wiki/INSTALL.md index 61df6e79..aca82af0 100644 --- a/wiki/INSTALL.md +++ b/wiki/INSTALL.md @@ -56,7 +56,7 @@ Below you can find detailed procedures for each operating system. ## OS Independent Via `Docker` -See [docker](https://github.com/readbeyond/aeneas/blob/master/docker/) directory. +See [docker](aeneas/blob/master/docker/) directory. ## Linux From ae3818948deb0a838c47aeb03a9ba776611c5dba Mon Sep 17 00:00:00 2001 From: Maria Date: Wed, 4 Jan 2023 21:30:22 +0300 Subject: [PATCH 3/6] fix docker description --- wiki/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/INSTALL.md b/wiki/INSTALL.md index aca82af0..2c1943cd 100644 --- a/wiki/INSTALL.md +++ b/wiki/INSTALL.md @@ -56,7 +56,7 @@ Below you can find detailed procedures for each operating system. ## OS Independent Via `Docker` -See [docker](aeneas/blob/master/docker/) directory. +See [docker](../docker/) directory. ## Linux From 63e8bf6a885a4e9b0c074cf0b7347ebed3d10329 Mon Sep 17 00:00:00 2001 From: Maria Date: Wed, 4 Jan 2023 21:31:38 +0300 Subject: [PATCH 4/6] fix docker description --- docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/README.md b/docker/README.md index 990a9a23..11dbe511 100644 --- a/docker/README.md +++ b/docker/README.md @@ -6,7 +6,7 @@ Additionally, russian [espeak libraries](https://espeak.sourceforge.net/data/) a You need to have [Docker](https://docs.docker.com/engine/install/). -Clone this project, cd to its folder and run: +Clone this project, cd to this folder and run: ``` $ docker build -t aenaes:latest . ``` From ccd9df074571d77f39440ee819b7a6ebfedd0871 Mon Sep 17 00:00:00 2001 From: Maria Date: Wed, 4 Jan 2023 22:11:33 +0300 Subject: [PATCH 5/6] fix docker --- docker/Dockerfile | 4 ++-- docker/README.md | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 2638a5a8..44f534fc 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,9 +4,9 @@ RUN apt update && \ apt install -y ffmpeg espeak=1.48.04+dfsg-7+deb10u1 && \ apt install -y libespeak-dev && \ pip install numpy && \ - pip install aeneas && \ + pip install aeneas -# Adding russian libraries +# Adding russian libraries (optional) RUN wget https://espeak.sourceforge.net/data/ru_dict-48.zip && \ unzip ru_dict-48.zip && \ cp ru_dict-48 /usr/lib/x86_64-linux-gnu/espeak-data/ru_dict \ No newline at end of file diff --git a/docker/README.md b/docker/README.md index 11dbe511..8b0d0921 100644 --- a/docker/README.md +++ b/docker/README.md @@ -19,13 +19,16 @@ To check (get the usage message): $ docker run --name aenaes --rm aenaes python -m aeneas.tools.execute_task ``` -To compute a synchronization map `map.json` for a pair (`audio.mp3`, `text.txt` in [plain](http://www.readbeyond.it/aeneas/docs/textfile.html#aeneas.textfile.TextFileFormat.PLAIN) text format): +To compute a synchronization map `map.json` for a pair (`/path/to/your/files/audio.mp3`, `/path/to/your/files/text.txt` in [plain](http://www.readbeyond.it/aeneas/docs/textfile.html#aeneas.textfile.TextFileFormat.PLAIN) text format): ``` -$ docker run --name aenaes --rm aenaes python -m aeneas.tools.execute_task \ - audio.mp3 \ - text.txt \ +$ docker run --name aenaes --rm --volume /path/to/your/files:/data aenaes \ + python -m aeneas.tools.execute_task \ + /data/audio.mp3 \ + /data/text.txt \ "task_language=eng|os_task_file_format=json|is_text_type=plain" \ - --presets-word - map.json + map.json \ + --rate --presets-word ``` + +You will get a file `/path/to/your/files/map.json` as a result. \ No newline at end of file From 91072c601ca18b6f456d57d04b69dc0e78d6e620 Mon Sep 17 00:00:00 2001 From: Maria Date: Wed, 4 Jan 2023 22:12:55 +0300 Subject: [PATCH 6/6] fix docker description --- docker/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/README.md b/docker/README.md index 8b0d0921..dcceaa31 100644 --- a/docker/README.md +++ b/docker/README.md @@ -2,7 +2,7 @@ Additionally, russian [espeak libraries](https://espeak.sourceforge.net/data/) add into container. -### Build +## Build You need to have [Docker](https://docs.docker.com/engine/install/). @@ -11,7 +11,7 @@ Clone this project, cd to this folder and run: $ docker build -t aenaes:latest . ``` -### Usage +## Usage To check (get the usage message):