Skip to content

Commit

Permalink
Dataset Tool to add Timestamps (#121)
Browse files Browse the repository at this point in the history
* add timestamp forced aligner

* download conda commands

* faster TimestampGenerationTask
  • Loading branch information
farzadab authored Oct 1, 2024
1 parent 964e3f9 commit d717b6e
Show file tree
Hide file tree
Showing 4 changed files with 269 additions and 33 deletions.
31 changes: 31 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export WANDB_LOG_MODEL:="checkpoint"
export PROJECT_DIR:="ultravox"
export MCLOUD_CLUSTER:="r7z22p1"
export MCLOUD_INSTANCE:="oci.bm.gpu.b4.8"
export MFA_ENV_NAME:="aligner"

default: format check test

Expand Down Expand Up @@ -62,3 +63,33 @@ run *FLAGS:

mcloud *FLAGS:
poetry run mcli interactive {{FLAGS}} --cluster ${MCLOUD_CLUSTER} --instance ${MCLOUD_INSTANCE} --name `whoami` --command "bash -c \"$(cat setup.sh)\""

@check_conda:
if ! command -v conda &> /dev/null; then \
echo "Conda is not installed."; \
mkdir -p ~/miniconda3; \
if [ "$(uname)" = "Darwin" ]; then \
echo "Downloading MacOS Miniconda."; \
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh; \
elif [ "$(uname)" = "Linux" ]; then \
echo "Downloading Linux Miniconda."; \
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh \
else \
echo "Unknown operating system."; \
fi; \
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3; \
rm ~/miniconda3/miniconda.sh; \
else \
echo "Conda is installed."; \
fi

@install_mfa: check_conda
if conda env list | grep -q "$MFA_ENV_NAME"; then \
echo "Environment '$MFA_ENV_NAME' already exists."; \
else \
echo "Creating environment '$MFA_ENV_NAME'."; \
conda create --name "$MFA_ENV_NAME" python=3.8 -y; \
conda create -n "$MFA_ENV_NAME" -c conda-forge montreal-forced-aligner; \
conda run -n "$MFA_ENV_NAME" mfa model download acoustic english_mfa; \
conda run -n "$MFA_ENV_NAME" mfa model download dictionary english_mfa; \
fi
16 changes: 15 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ wandb = "~0.17.1"
sacrebleu = "^2.4.2"
tenacity = "^9.0.0"
evals = {git = "https://github.com/fixie-ai/evals", rev = "0c66bf85df7a4b903ecb202b23c2a826b749fd71"}
praatio = "^6.2.0"

[tool.poetry.group.dev.dependencies]
black = "~24.4.2"
Expand Down
Loading

0 comments on commit d717b6e

Please sign in to comment.