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:
/healthcheck: to check if the service is running; no request data is required.
/synthesis: to synthesis a text; for now, it returns a wav file (out.wav); requires data as a json with 3 mandatory values: language, text and speaker.
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.'})
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:
Example of usage with requests library on the same machine: