-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow audio file/folder names with whitespaces (#32)
Fix OOD error with files/folder with spaces #31. This is done by adding a dynamic form for OOD, and better argument parser for the python script. Other modifications: Replace tmp folder from $WRKDIR/.speech2text to OOD session ID #30. This is mainly for OOD users to have all the log in the OOD app. Add logging information to first slurm submission #29. If the file is not supported, the name of the file will be logged for better debugging. Add OOD dev build #26. Now deploying script supports ood-dev to easily install the ood sandbox for testing. Add specific versions for faster-whisper, ctranslate, whisperX, cuda, and pytorch to env.yml for easier environment building. Add a prefix to slurm job_name for easier statistics analysis using slurm database.
- Loading branch information
Showing
6 changed files
with
43 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import yaml | ||
import sys | ||
import os | ||
|
||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))) | ||
from src.settings import (supported_languages, | ||
available_whisper_models, | ||
default_whisper_model) | ||
|
||
# Path to the form.yml file | ||
form_yml_path = 'bin/deploy-data/ood/form.yml' | ||
|
||
# Load the existing form.yml | ||
with open(form_yml_path, 'r') as file: | ||
form_data = yaml.safe_load(file) | ||
|
||
# Update the language_field options with supported languages | ||
form_data['attributes']['language_field']['options'] = list(supported_languages.keys()) | ||
|
||
# Update the model_selector options with available whisper models | ||
form_data['attributes']['model_selector']['options'] = [ | ||
["default", default_whisper_model] | ||
] + [[model, model] for model in available_whisper_models] | ||
|
||
# Write the updated data back to form.yml | ||
with open(form_yml_path, 'w') as file: | ||
yaml.dump(form_data, file, default_flow_style=False, sort_keys=False) | ||
|
||
print(".. form.yml has been updated with supported languages and Whisper models from settings.py.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters