Anna Sun
updates
967ca9c
|
raw
history blame
2.89 kB

Seamless Streaming Server

Setting up the AWS server

Setting up the dev environment

Clone the repo

cd seamless-experiences/seamless_vc/seamless_server

If running for the first time, create conda environment from the environment.yaml conda env create -f environment.yml (or if you are on Mac OS, replace environment.yml with environment_mac.yml)

In each new terminal you use you will need to activate the conda environment: conda activate smlss_server

Install dependencies with pip: pip install -r requirements.txt

Install Meta-specific dependencies with the dedicated install script: ./scripts/update_meta_dependencies.sh

If needed, download and extract the latest model using the dedicated script: ./scripts/download_latest_models.sh

Setting up the docker environment

Alternatively we can build a docker image (for ease of deployment).

  1. Make sure github keys are loaded into ssh-agent. Copy over the keys into ~/.ssh/ then run eval $(ssh-agent), then ssh-add to load the keys.
  2. Run docker-compose build if you just want to build the image. If you want to also run the server: docker compose up --build.
  3. Optionally to push the built docker image to ECR so it could be pulled into deployments: ./deploy.sh

NOTE: Add your models to the ./models directory.

Running the v2 ("pubsub") server

The pubsub server can be loaded with docker above or run locally with uvicorn below. Run the server in dev mode:

uvicorn app_pubsub:app --reload

Run the server in prod mode:

uvicorn app_pubsub:app --host 0.0.0.0

To enable additional logging from uvicorn pass --log-level debug or --log-level trace.

Running the frontend

  • For the v2 pubsub server, the frontend lives in the streaming-react-app root directory (not seamless_ui).

Updating the conda environment after changes to environment.yml

Run this command to install/remove packages to match the current environment.yml file:

conda env update --prefix ./env --file environment.yml --prune

See: https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html?highlight=sharing#updating-an-environment

Debuging

If you enable "Server Debug Flag" when starting streaming from the client, this enables extensive debug logging and it saves audio files in /debug folder. test_no_silence.wav contains data with silence chunks removed.