Project leverages ’Liepa’ engine to synthesize text to speech (in lithuanian).
Running project starts a ’Spring’ service that listens to API calls to schedule translation mechanism through ’Docker’. It creates endpoints for other mechanisms to hook into.
It uses ’Docker’ to launch linux environment to lauch the actual conversion mechanism.
To use the service you’ll need multiple dependencies.
- Clone project
- Download / install Java11 (Great open java builds)
- Download / install Docker (Docker on desktop)
- Download / ’Liepa’ synthesizer (Download link to Liepa)
- You’ll need to extract it yourself, as we need only executables
- Extract ’Liepa’ to
{rootProject}/robo-docker-build/formatter
- The
formatter
directory contains ’Liepa’ service. In other words files like{rootProject}/robo-docker-build/formatter/Liepa.exe
;{rootProject}/.../formatter/LithUSStest.exe
and so on
- The
- Build docker image
-
To build docker image go to
{rootProject}/robo-docker-build
and runbuild.sh
-
This will create and store an image
-
If you’ll run
docker images
you should see something similar❯ docker images REPOSITORY TAG IMAGE ID CREATED SIZE markmerkk/wine1 latest 0fcfa2f211a3 5 weeks ago 1.02GB
-
- Run service
-
Build the service with
{rootProject}./gradlew build
-
Easiest way to run it, execute
{rootProject}/robo-run.sh
-
Open IDE, import the project, run with additional properties
-Dspring.profiles.active=dev -Dserver.port=8082 -DLOG_PATH=./logs -DtoolPath=./robo-docker-run -DoutPath=./tts_output -DdockerHost=localhost -DdockerPort=8082
-
- Use API to run translation
-
When using CLI
curl
you could usecurl -X POST http://localhost:8082/api/process-run --data '{"inputText": "Super", "extraEntityId": "id1", "extraTextId": "id2"}' -H "Content-Type: application/json"
-
Or import postman collection from the project (“{{HOST}}” variable is most likely ’http://localhost:8082’)
-
- Translation results can be found in
{rootProject}/tts_output/{random-uuid}/record.wav
- Launched service ’listens’ for direct API endpoint or messaging service (RabbitMQ built in) message to handle TTS process
- When message comes
- It prepares files for translation (copies files to their right locations)
- It launches ’Docker’ image to begin processing
- If the text is long enough, it breaks down and joins all audio files together for longer record
- Cleans-up
- Copies results to provided location