tiberiu44 / TTS-Cube

End-2-end speech synthesis with recurrent neural networks
https://tiberiu44.github.io/TTS-Cube/
Apache License 2.0
225 stars 45 forks source link

Added WebService functionality #24

Closed GCioroiu closed 5 years ago

GCioroiu commented 5 years ago

Added Flask on requirements.txt

Divided synthesize function from cube/synthesis.py into more functions to avoid duplicate code. Added _get_fileinput function in cube/synthesis.py to read multi-lines files.

Created cube/WebService.py file.

The WebService have 2 endpoints:

For now, the WebService use the models in data/models/lang in order to allow multi-language development.

In order to run the service, the following command must be called from project root directory:

python3 cube/WebService.py

Example of usage with requests library on the same machine:

requests.get('http://127.0.0.1:8080/synthesis', json={'language': 'ro', 'speaker': 'anca', 'text': 'Salutări la toată lumea.'})
tiberiu44 commented 5 years ago

Looks good to me. Thank you for this update.