### Get Live Aeneas Examples
Source: https://github.com/readbeyond/aeneas/blob/master/README.rst
Retrieves and displays live examples that can be immediately run on the machine, demonstrating aeneas functionality.
```bash
python -m aeneas.tools.execute_task --examples
python -m aeneas.tools.execute_task --examples-all
```
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Build and install aeneas from source (Linux)
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
This snippet outlines the process of installing aeneas from its source code on Linux. It involves cloning the repository, navigating into the directory, installing requirements, building C extensions, and finally checking the setup.
```bash
$ git clone https://github.com/ReadBeyond/aeneas.git
$ cd aeneas
$ sudo pip install -r requirements.txt
$ python setup.py build_ext --inplace
$ python aeneas_check_setup.py
```
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### XML Configuration File Example 1 (XML)
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/clitutorial.rst
Presents an example of an `config.xml` file that is equivalent to the `config.txt` example. This format is more verbose but allows for more flexibility in task configuration.
```xml
```
--------------------------------
### Untitled
No description
--------------------------------
### Execute Job Example (Text)
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/clitutorial.rst
Provides an example of how to run a built-in example job using the aeneas.tools.execute_job command. This demonstrates a practical use case for processing a sample job.
```text
aeneas_execute_job --example-job=job.zip --output-dir=./output
```
--------------------------------
### Untitled
No description
--------------------------------
### Install Aeneas from Source
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
Clones the Aeneas repository, installs Python dependencies, and compiles C extensions. Requires git, pip, and build tools.
```bash
git clone https://github.com/ReadBeyond/aeneas.git
cd aeneas
sudo pip install -r requirements.txt
python setup.py build_ext --inplace
python aeneas_check_setup.py
```
--------------------------------
### XML Configuration File Example 2 (XML)
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/clitutorial.rst
An example of an `config.xml` file demonstrating how to bundle tasks with different execution parameters, such as language and output format, within the same job.
```xml
```
--------------------------------
### aeneas Common Live Examples List
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/index.rst
Lists common built-in live examples that can be run with the aeneas.tools.execute_task command. These examples demonstrate various use cases for forced alignment.
```text
Use --examples=all to list all examples.
Common examples:
- smil-html: produces SMIL files from HTML/XML files
- smil-text: produces SMIL files from plain text files
- srt-html: produces SRT files from HTML/XML files
- srt-text: produces SRT files from plain text files
- sub-html: produces SUB files from HTML/XML files
- sub-text: produces SUB files from plain text files
- ttml-html: produces TTML files from HTML/XML files
- ttml-text: produces TTML files from plain text files
- vtt-html: produces VTT files from HTML/XML files
- vtt-text: produces VTT files from plain text files
- eaf-html: produces EAF files from HTML/XML files
- eaf-text: produces EAF files from plain text files
- json-html: produces JSON files from HTML/XML files
- json-text: produces JSON files from plain text files
- csv-html: produces CSV files from HTML/XML files
- csv-text: produces CSV files from plain text files
- ssv-html: produces SSV files from HTML/XML files
- ssv-text: produces SSV files from plain text files
- tsv-html: produces TSV files from HTML/XML files
- tsv-text: produces TSV files from plain text files
- txt-html: produces TXT files from HTML/XML files
- txt-text: produces TXT files from plain text files
- xml-html: produces XML files from HTML/XML files
- xml-text: produces XML files from plain text files
- aud-html: produces AUD files from HTML/XML files
- aud-text: produces AUD files from plain text files
Use --examples= to run a specific example.
```
--------------------------------
### Verify eSpeak Installation (Windows Command Prompt)
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
This command verifies if the eSpeak text-to-speech synthesizer is installed correctly and accessible via the system's PATH variable. It's a simple test to confirm successful installation before proceeding with other Aeneas setup steps.
```shell
espeak hello
```
--------------------------------
### aeneas execute_task List All Built-in Examples
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/clitutorial.rst
Lists all available built-in examples for the aeneas execute_task command, including more specific input/output/parameter combinations. This provides a comprehensive overview of the tool's example scenarios.
```text
This command does not produce any output, but it lists the available examples
if you pass the --examples-all switch.
Example:
$ aeneas.tools.execute_task --examples-all
For more details on the available examples, please consult the API documentation
of the `aeneas.tools.execute_task` command.
```
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Aeneas Configuration Examples
Source: https://context7.com/readbeyond/aeneas/llms.txt
Examples of setting runtime configuration parameters for Aeneas. These parameters control aspects of the alignment process and output format.
```python
rconf[RuntimeConfiguration.SMIL_AUDIO_REF] = "audio.mp3"
rconf[RuntimeConfiguration.SMIL_PAGE_REF] = "page.xhtml"
```
--------------------------------
### Untitled
No description
--------------------------------
### Install Aeneas using pip
Source: https://github.com/readbeyond/aeneas/blob/master/README.rst
Installs the numpy library followed by the aeneas package using pip. This order is important for correct installation.
```bash
pip install numpy
pip install aeneas
```
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### List All Aeneas Parameters
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/clitutorial.rst
This command-line example illustrates how to use the --list-parameters switch in Aeneas to retrieve a comprehensive list of all available configuration parameter names.
```text
.. literalinclude:: _static/execute_task_list_parameters.txt
:language: text
```
--------------------------------
### Install espeak and ffmpeg via Homebrew
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
Installs the espeak speech synthesizer and ffmpeg multimedia framework, which includes ffprobe, using Homebrew.
```bash
brew install espeak
brew install ffmpeg
```
--------------------------------
### aeneas execute_task List Built-in Examples
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/clitutorial.rst
Lists the available built-in examples for the aeneas execute_task command. This helps users discover and run predefined scenarios to learn the tool's capabilities.
```text
This command does not produce any output, but it lists the available examples
if you pass the --examples switch.
Example:
$ aeneas.tools.execute_task --examples
For more details on the available examples, please consult the API documentation
of the `aeneas.tools.execute_task` command.
```
--------------------------------
### Check Aeneas Installation
Source: https://github.com/readbeyond/aeneas/blob/master/README.rst
Runs the diagnostics tool to verify a correct aeneas installation.
```bash
python -m aeneas.diagnostics
```
--------------------------------
### Aeneas Command Line Usage - Help and Examples
Source: https://github.com/readbeyond/aeneas/blob/master/README.md
Displays the usage message for Aeneas command-line tools and lists available live examples. These commands help users understand the available functionalities and how to use them.
```bash
python -m aeneas.tools.execute_task
python -m aeneas.tools.execute_job
python -m aeneas.tools.execute_task --examples
python -m aeneas.tools.execute_task --examples-all
```
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Execute Aeneas SRT Example
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/index.rst
Demonstrates the execution of a predefined example task for generating SRT subtitles using the Aeneas command-line tool. It shows the command and the resulting output, including file paths and processing steps.
```text
$ python -m aeneas.tools.execute_task --example-srt
[INFO] Running example task with arguments:
Audio file: aeneas/tools/res/audio.mp3
Text file: aeneas/tools/res/subtitles.txt
Config string: task_language=eng|is_text_type=subtitles|os_task_file_format=srt
Sync map file: output/sonnet.srt
[INFO] Creating task...
[INFO] Creating task... done
[INFO] Executing task...
[INFO] Executing task... done
[INFO] Creating output sync map file...
[INFO] Creating output sync map file... done
[INFO] Created file 'output/sonnet.srt'
```
--------------------------------
### aeneas execute_task Run JSON Example
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/clitutorial.rst
Executes a built-in example of the aeneas execute_task command that produces output in JSON format. This demonstrates how to generate sync maps in JSON.
```text
$ aeneas.tools.execute_task --example-json
WARNING: the above command generates an error, be sure to have
a directory named `output` in your current working directory.
If one does not exist, create it.
As you can see in the example above, built-in examples
```
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Example Input Text Fragments for Synthesis
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/HOWITWORKS.md
This snippet shows an example of the input text fragments (F) that are synthesized into audio. The fragments are typically short pieces of text, like lines from a poem.
```plaintext
F = [
f_1 = "Sonnet I"
f_2 = "From fairest creatures we desire increase,"
f_3 = "That thereby beauty's rose might never die,"
f_4 = "But as the riper should by time decease,"
f_5 = "His tender heir might bear his memory:"
...
f_15 = "To eat the world's due, by the grave and thee."
]
```
--------------------------------
### Check Aeneas Installation
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
Runs a script to verify the successful installation of Aeneas and its dependencies, including external tools like ffprobe, ffmpeg, and espeak. It also checks for compiled C extensions.
```bash
cd c:\sync\aeneas-1.5.0.3
python aeneas_check_setup.py
```
--------------------------------
### Verify FFmpeg Installation (Windows Command Prompt)
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
This command verifies if the FFmpeg multimedia framework is installed correctly and its binaries are accessible through the system's PATH. A successful execution will display FFmpeg's version information and usage details, confirming it's ready for use with Aeneas.
```shell
ffmpeg
```
--------------------------------
### Untitled
No description
--------------------------------
### aeneas SMIL Execution Example (text)
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/clitutorial.rst
This snippet shows an example of command-line execution for processing an UNPARSED XML file to generate SMIL output with aeneas. It highlights the necessary parameters for text extraction and sorting.
```text
.. literalinclude:: _static/execute_task_example_smil.txt
:language: text
```
--------------------------------
### Untitled
No description
--------------------------------
### aeneas Task Input File Example (text)
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/clitutorial.rst
This snippet shows the content of an input file used for the aeneas task example that generates JSON output. It represents the text segments to be synchronized.
```text
.. literalinclude:: _static/execute_task_example_json_input.txt
:language: text
```
--------------------------------
### Untitled
No description
--------------------------------
### Install PyInstaller for aeneas Compilation
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/PYINSTALLER.md
Installs a specific version of PyInstaller, recommended for compiling aeneas. This is a prerequisite for creating the executable.
```bash
pip install pyinstaller==3.1.1
```
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Untitled
No description
--------------------------------
### Python C/C++ Extension Example
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/libtutorial.rst
Illustrates how C/C++ code is integrated with Python for performance-critical computations in the Aeneas project. C/C++ handles low-level computations, while Python manages high-level operations.
```text
Critical sections of the alignment code are written as Python C/C++ extensions, that is, C/C++ code that receives input from Python code, performs the heavy computation, and returns results to the Python code.
```
--------------------------------
### Disable `cew` C Extension Compilation on Windows
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
This command demonstrates how to disable the compilation of the `cew` C extension by setting the `AENEAS_WITH_CEW` environment variable to `False`. This is useful when encountering compilation errors or if the extension is not required. It then proceeds to build the Aeneas setup.
```bash
set AENEAS_WITH_CEW=False
python setup.py build_ext --inplace
```
```bash
set AENEAS_WITH_CEW=False
pip install aeneas
```
--------------------------------
### Untitled
No description
--------------------------------
### Install Aeneas via Pip
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
Installs Aeneas and its dependency numpy directly using the pip package installer.
```bash
sudo pip install numpy
sudo pip install aeneas
```
--------------------------------
### Install Homebrew Package Manager
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
Installs the Homebrew package manager for macOS, which simplifies the installation of software and dependencies.
```bash
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
--------------------------------
### Untitled
No description
--------------------------------
### Install Xcode Command Line Tools
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
Installs the necessary command line tools for macOS development, often a prerequisite for other installations.
```bash
xcode-select --install
```
--------------------------------
### Install Python via Homebrew
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
Installs Python using the Homebrew package manager.
```bash
brew install python
```
--------------------------------
### Install aeneas and numpy using pip (OS Independent)
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
This snippet shows how to install the aeneas library and its dependency numpy using pip. It assumes that ffmpeg, ffprobe, espeak, and Python development headers are already installed and available in the command line. It's recommended to install numpy before aeneas.
```bash
$ sudo pip install numpy
$ sudo pip install aeneas
```
--------------------------------
### TXT Configuration File Example (Text)
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/clitutorial.rst
Demonstrates the content of a `config.txt` file used in an Aeneas job. This file specifies the parameters for processing tasks, including audio and text file paths.
```text
[DEFAULT]
# Language of the texts
LANGUAGE = en
# Output format (SMIL)
OUTPUT_FORMAT = smil
[sonnet001]
audio_files = OEBPS/Resources/sonnet001.mp3
text_files = OEBPS/Resources/sonnet001.txt
[sonnet002]
audio_files = OEBPS/Resources/sonnet002.mp3
text_files = OEBPS/Resources/sonnet002.txt
[sonnet003]
audio_files = OEBPS/Resources/sonnet003.mp3
text_files = OEBPS/Resources/sonnet003.txt
```
--------------------------------
### Verify Homebrew Python Installation
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
Checks which Python executable is being used and displays the installed Python version to confirm the PATH configuration.
```bash
which python
python --version
```
--------------------------------
### Install Aeneas via Homebrew
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
Installs the Aeneas package using a specific Homebrew tap. Note: This method may be outdated.
```bash
brew install danielbair/tap/aeneas
```
--------------------------------
### Install Python Packages for Aeneas
Source: https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md
Installs the required Python packages (BeautifulSoup4, lxml, NumPy) using conda. It specifies version 1.10.0 for NumPy to ensure compatibility.
```bash
conda install setuptools -y --no-deps
conda install beautifulsoup4 -y --no-deps
conda install lxml -y --no-deps
conda install numpy=1.10.0 -y --no-deps
```
--------------------------------
### Execute Aeneas with Explicit Parameters
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/index.rst
Shows the explicit command-line arguments for the Aeneas tool to achieve the same result as the --example-srt shortcut. This includes specifying audio file, text file, configuration string, and output file path.
```text
$ python -m aeneas.tools.execute_task aeneas/tools/res/audio.mp3 aeneas/tools/res/subtitles.txt "task_language=eng|is_text_type=subtitles|os_task_file_format=srt" output/sonnet.srt
[INFO] Validating config string (specify --skip-validator to bypass)...
[INFO] Validating config string... done
[INFO] Creating task...
[INFO] Creating task... done
[INFO] Executing task...
[INFO] Executing task... done
[INFO] Creating output sync map file...
[INFO] Creating output sync map file... done
[INFO] Created file 'output/sonnet.srt'
```
--------------------------------
### Untitled
No description
--------------------------------
### Manage Python Virtual Environments with Bash
Source: https://github.com/readbeyond/aeneas/blob/master/venvs/README.md
These Bash commands automate the creation, installation, and management of Python virtual environments for the Aeneas project. They require specific Python interpreters and the 'virtualenv' tool to be installed. The scripts handle dependency installation, Aeneas package installation from source, and execution of diagnostic tests.
```bash
bash manage_venvs.sh python3.5 uninstall
bash manage_venvs.sh python3.5 install
bash manage_venvs.sh python3.5 deps
bash manage_venvs.sh python3.5 sdist
bash manage_venvs.sh python3.5 sdist /tmp/foo.tar.gz
bash manage_venvs.sh python3.5 sdist --remove
AENEAS_FORCE_CFW=True bash manage_venvs.sh python3.5 sdist
bash manage_venvs.sh python3.5 full
```
--------------------------------
### Untitled
No description
--------------------------------
### Create and Process Task, Output Sync Map to File (Python)
Source: https://github.com/readbeyond/aeneas/blob/master/docs/source/libtutorial.rst
This Python code demonstrates how to create a `Task` object with a specific configuration, set input and output file paths, execute the task using `ExecuteTask`, and then save the resulting sync map to a JSON file. It requires the `aeneas` library.
```python
#!/usr/bin/env python
# coding=utf-8
from aeneas.executetask import ExecuteTask
from aeneas.task import Task
# create Task object
config_string = u"task_language=eng|is_text_type=plain|os_task_file_format=json"
task = Task(config_string=config_string)
task.audio_file_path_absolute = u"/path/to/input/audio.mp3"
task.text_file_path_absolute = u"/path/to/input/plain.txt"
task.sync_map_file_path_absolute = u"/path/to/output/syncmap.json"
# process Task
ExecuteTask(task).execute()
# output sync map to file
task.output_sync_map_file()
```
--------------------------------
### Untitled
No description