This project provides a FastAPI-based web service that uses the Aeneas library to align text with audio files. The service accepts a text input and an audio file, and returns the alignment information in JSON format. The service is built on the Modal.com platform.
To install the project, clone the repository and install the dependencies using pip:
git clone git@github.com:FelippeChemello/modal_aeneas.git
cd modal_aeneas
pip install -r requirements.txt- Python 3.10
- A modal.com account
- An
API_KEYfor the service, stored as a secret in Modal.com under the nameaeneas-secret
to run the service you need to setup modal.com CLI
modal setupand then deploy the service
modal deploy app.py --name aeneasTo run the service locally, use the following command:
modal serve app.py To use the service, send a POST request to the root URL, provided by modal, with the following parameters as form data:
text: The text to align with the audio fileaudio_file: The audio file to align with the text
along with the API_KEY in the headers as x-api-key
The service will return a JSON response with the alignment information.