Skip to content

Commit

Permalink
update notebook example
Browse files Browse the repository at this point in the history
  • Loading branch information
abdeladim-s committed Jun 3, 2023
1 parent 6be89b2 commit 545789f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
24 changes: 0 additions & 24 deletions easymms/models/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,30 +76,6 @@ def __init__(self,

self.wer = None



def _setup(self):
"""
Helper function to setup different required packages
:return: None
"""
# clone Fairseq
easymms_utils.clone(constants.FAIRSEQ_URL, constants.FAIRSEQ_DIR)
fairseq_dir = str(constants.FAIRSEQ_DIR.resolve())
sys.path.append(fairseq_dir)
try:
from fairseq.data.data_utils_fast import (
batch_by_size_fn,
batch_by_size_vec,
batch_fixed_shapes_fast,
)
except ImportError:
# we need to build the extension
from distutils.core import run_setup
run_setup(str((constants.FAIRSEQ_DIR / 'setup.py').resolve()), script_args=['build_ext', '--inplace'],
stop_after='run')


def _cleanup(self) -> None:
"""
cleans up the temp_dir
Expand Down
2 changes: 2 additions & 0 deletions examples/EasyMMS.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
"\n",
"!apt install ffmpeg\n",
"!apt install sox\n",
"!pip install librosa==0.8.0\n",
"!pip install phonemizer==2.2.1\n",
"!pip install -U --pre torchaudio --index-url https://download.pytorch.org/whl/nightly/cu118\n",
"!pip install git+https://github.com/abdeladim-s/easymms\n",
"import locale\n",
Expand Down

0 comments on commit 545789f

Please sign in to comment.