all of the above are available as docker images, either publicly (zookeeper, kafka, minio) or from Atlas Labs.
models are also needed. they should be provided from Atlas Labs and extracted to host machine.
the following assumes a working setup of master, minio, postgresql and kafka + zookeeper (already in GitBook Manual), and shows how to add the tts-specific components. the services will be launched by docker-compose.
Encoder Compose Sample
this docker-compose snippet will launch one encoder instance on GPU:0 . please check the latest image version.
version is set to 2.3 for compatibility with nvidia-docker2
runtime is specified as nvidia to allow for GPU inference
NVIDIA_VISIBLE_DEVICES specifies which GPU to use on the local machine.
ENCODER_NUM_WORKERS must match or exceed the worker's NUMWORKERS
ENCODER_SOCKET_PORT must match the worker's WORKER_SOCKET_PORT
ENCODER_USE_MODEL refers to the model set to use. this is a subdirectory within the mounted model directory
ENCODER_RESAMPLER determines which resampling to do in the encoder. with a gstreamer-enabled worker, set to none.
volumes: mount the model base directory to the container's /workspace/server/model directory. this directory should contain a subdirectory corresponding to the ENCODER_USE_MODEL parameter.
volumes: mount a local directory to the container's /workspace/server/logs/encoder directory to access logs locally.
see the "Container Configuration" section below for a full list of configuration environment variables.
Worker Compose Sample
take note of the following settings:
WORKER_MASTER_ENDPOINT should contain a comma-separated list of master endpoints
WORKER_SOCKET_ADDR should be service name of corresponding encoder (for use with docker networking).
WORKER_SOCKET_PORT should be port of corresponding encoder. (see encoder ENCODER_SOCKET_PORT)
NUMWORKERS must be less than or equal to the encoder's ENCODER_NUM_WORKERS
volumes: mount container's /home/root/zeroth-tts-worker/log/tts to local to access worker log files.
see the "Container Configuration" section below for a full list of configuration environment variables.
Mult-GPU setups
for multi-GPU machines, it is recommended to initiate an encoder and worker container for each GPU.
for each encoder container:
set container name to unique name, (e.g. encoder0, encoder1, encoder2, ...)
set NVIDIA_VISIBLE_DEVICES to a unique GPU index (e.g. 0, 1, 2, ...)
set ENCODER_SOCKET_PORT to a unique port (e.g. 7878, 7879, 7880, ...)
for each worker container:
set container name to unique name, (e.g. worker0, worker1, worker2, ...)
set WORKER_SOCKET_PORT to port of corresponding encoder (e.g. 7878, 7879, 7880, ...)
set depends_on to corresponding encoder name (e.g. encoder0, encoder1, encoder2, ...)
TTS API Compose Sample
the output format is specified by:
AUDIO_ENCODING : the sox command used to process the PCM stream; notice default sample rate is 16000 and encoding is mp3
AUDIO_EXTENSION : determines the file extension of the saved file