Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.
/ festival-api Public archive

A simple REST api for creating .wav files utilising festival.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE_MIT
Notifications You must be signed in to change notification settings

JosiahBull/festival-api

Repository files navigation

codecov Build Docs OAS Docs

Festival to WAV API

A simple REST api which takes a request body of the form:

{
    "word": "university",
    "lang": "en",
    "speed": 0.7,
    "fmt": "wav"
}

and returns a file which may be streamed or played for a user.

Detailed documentation on how to use the API can be found in openapi.oas.yml.

Deployment

Docker

git clone https://github.com/Collabs-uni/festival-web-api

nano ./config/general.toml #Update any general configuration options you wish to include.
nano ./config/langs.toml #Update any special languages you wish to include (ensure to modify backend.Dockerfile to install them).

docker-compose up #This takes a long time

Development

Fedora

To develop this api, you must have Rust installed.

This api also depends on Ffmpeg, and Flite.

Dependencies

    # Install Rust
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
    # Install Build Tools
    sudo dnf groupinstall @development-tools @development-libraries

    # Install Docker
    # Follow here: https://docs.docker.com/engine/install/fedora/

    # Install Dependencies
    sudo dnf install festival flite ffmpeg libpq libpq-devel
    cargo install rustfmt #for automatic code formatting
    cargo install clippy #collection of useful lints
    cargo install cargo-tarpaulin #test coverage

Development

# Start the api, initial compilation may take some time so get a cup of tea
cargo test -- --test-threads 1
cargo run

License

Licensed under either of

at your option.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Code Guidelines

Please write tests if we have good test coverage we can avoid any bugs down the line.

Outside of this we use standard Rust formatting for code. This will be enforced through use of clippy and rustfmt.

Commit Guidelines

In all commits, please try to follow the convention for commits.

Ideally aim to push every commit you make, rather than accumulating a large number of commits before pushing, this helps to keep everyone on the same codebase when collaborating.

The exception for this is that you should not commit non-compiling code to the main branch. Open a new branch and commit to that instead.

Use of Pull Requests

Outside of exceptional cases, please always push commits to a new branch and then generate a pull request with your new feature. Automated actions will attempt to validate that your code does not break anything existing, but this doesn't guarantee your code works. Please write tests!

About

A simple REST api for creating .wav files utilising festival.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE_MIT

Stars

Watchers

Forks

Packages

No packages published