diff --git a/bin/import_cv2.py b/bin/import_cv2.py index 5aedfc78..30e02714 100755 --- a/bin/import_cv2.py +++ b/bin/import_cv2.py @@ -23,7 +23,7 @@ from mozilla_voice_stt_training.util.importers import ( get_validate_label, print_import_report, ) -from ds_ctcdecoder import Alphabet +from mvs_ctcdecoder import Alphabet FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"] SAMPLE_RATE = 16000 diff --git a/bin/import_lingua_libre.py b/bin/import_lingua_libre.py index 30a1ea84..8c262f97 100755 --- a/bin/import_lingua_libre.py +++ b/bin/import_lingua_libre.py @@ -20,7 +20,7 @@ from mozilla_voice_stt_training.util.importers import ( get_validate_label, print_import_report, ) -from ds_ctcdecoder import Alphabet +from mvs_ctcdecoder import Alphabet FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"] SAMPLE_RATE = 16000 diff --git a/bin/import_m-ailabs.py b/bin/import_m-ailabs.py index c8ece728..ad637a25 100755 --- a/bin/import_m-ailabs.py +++ b/bin/import_m-ailabs.py @@ -18,7 +18,7 @@ from mozilla_voice_stt_training.util.importers import ( get_validate_label, print_import_report, ) -from ds_ctcdecoder import Alphabet +from mvs_ctcdecoder import Alphabet FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"] SAMPLE_RATE = 16000 diff --git a/bin/import_slr57.py b/bin/import_slr57.py index b6107c71..68e68428 100755 --- a/bin/import_slr57.py +++ b/bin/import_slr57.py @@ -17,7 +17,7 @@ from mozilla_voice_stt_training.util.importers import ( get_validate_label, print_import_report, ) -from ds_ctcdecoder import Alphabet +from mvs_ctcdecoder import Alphabet FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"] SAMPLE_RATE = 16000 diff --git a/bin/import_swc.py b/bin/import_swc.py index c5211dcb..2b2ec3b8 100755 --- a/bin/import_swc.py +++ b/bin/import_swc.py @@ -24,7 +24,7 @@ import sox from mozilla_voice_stt_training.util.downloader import SIMPLE_BAR, maybe_download from mozilla_voice_stt_training.util.importers import validate_label_eng as validate_label -from ds_ctcdecoder import Alphabet +from mvs_ctcdecoder import Alphabet SWC_URL = "https://www2.informatik.uni-hamburg.de/nats/pub/SWC/SWC_{language}.tar" SWC_ARCHIVE = "SWC_{language}.tar" diff --git a/bin/import_tuda.py b/bin/import_tuda.py index 697405b4..32e16963 100755 --- a/bin/import_tuda.py +++ b/bin/import_tuda.py @@ -16,7 +16,7 @@ import progressbar from mozilla_voice_stt_training.util.downloader import SIMPLE_BAR, maybe_download from mozilla_voice_stt_training.util.importers import validate_label_eng as validate_label -from ds_ctcdecoder import Alphabet +from mvs_ctcdecoder import Alphabet TUDA_VERSION = "v2" TUDA_PACKAGE = "german-speechdata-package-{}".format(TUDA_VERSION) diff --git a/doc/BUILDING.rst b/doc/BUILDING.rst index 9b8b6066..479cbe68 100644 --- a/doc/BUILDING.rst +++ b/doc/BUILDING.rst @@ -141,7 +141,7 @@ This will create the package ``mozilla_voice_stt-VERSION.tgz`` in ``native_clien Install the CTC decoder package ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -To build the ``ds_ctcdecoder`` package, you'll need the general requirements listed above (in particular SWIG). The command below builds the bindings using eight (8) processes for compilation. Adjust the parameter accordingly for more or less parallelism. +To build the ``mvs_ctcdecoder`` package, you'll need the general requirements listed above (in particular SWIG). The command below builds the bindings using eight (8) processes for compilation. Adjust the parameter accordingly for more or less parallelism. .. code-block:: diff --git a/lm_optimizer.py b/lm_optimizer.py index d398663d..106a9e58 100644 --- a/lm_optimizer.py +++ b/lm_optimizer.py @@ -13,7 +13,7 @@ from mozilla_voice_stt_training.util.config import Config, initialize_globals from mozilla_voice_stt_training.util.flags import create_flags, FLAGS from mozilla_voice_stt_training.util.logging import log_error from mozilla_voice_stt_training.util.evaluate_tools import wer_cer_batch -from ds_ctcdecoder import Scorer +from mvs_ctcdecoder import Scorer def character_based(): diff --git a/native_client/ctcdecode/Makefile b/native_client/ctcdecode/Makefile index 8bff277b..c50fa49f 100644 --- a/native_client/ctcdecode/Makefile +++ b/native_client/ctcdecode/Makefile @@ -10,7 +10,7 @@ LDFLAGS_NEEDED += $(RASPBIAN)/lib/aarch64-linux-gnu/libm.so.6 endif ifeq ($(OS),Darwin) -GENERATE_DEBUG_SYMS := dsymutil temp_build/temp_build/ds_ctcdecoder/_swigwrapper.*.so +GENERATE_DEBUG_SYMS := dsymutil temp_build/temp_build/mvs_ctcdecoder/_swigwrapper.*.so else GENERATE_DEBUG_SYMS := endif @@ -28,7 +28,7 @@ THIRD_PARTY := third_party.$(ARCHIVE_EXT) all: bindings clean-keep-third-party: - rm -rf dist temp_build ds_ctcdecoder.egg-info + rm -rf dist temp_build mvs_ctcdecoder.egg-info rm -f swigwrapper_wrap.cpp swigwrapper.py $(FIRST_PARTY) clean: clean-keep-third-party diff --git a/native_client/ctcdecode/setup.py b/native_client/ctcdecode/setup.py index 9b26828d..d9c5d707 100644 --- a/native_client/ctcdecode/setup.py +++ b/native_client/ctcdecode/setup.py @@ -68,7 +68,7 @@ maybe_rebuild(KENLM_FILES, third_party_build, build_dir) maybe_rebuild(CTC_DECODER_FILES, ctc_decoder_build, build_dir) decoder_module = Extension( - name='ds_ctcdecoder._swigwrapper', + name='mvs_ctcdecoder._swigwrapper', sources=['swigwrapper.i'], swig_opts=['-c++', '-extranative'], language='c++', @@ -84,12 +84,12 @@ class BuildExtFirst(build): ('build_scripts', build.has_scripts)] setup( - name='ds_ctcdecoder', + name='mvs_ctcdecoder', version=project_version, description="""DS CTC decoder""", cmdclass = {'build': BuildExtFirst}, ext_modules=[decoder_module], - package_dir = {'ds_ctcdecoder': '.'}, - py_modules=['ds_ctcdecoder', 'ds_ctcdecoder.swigwrapper'], + package_dir = {'mvs_ctcdecoder': '.'}, + py_modules=['mvs_ctcdecoder', 'mvs_ctcdecoder.swigwrapper'], install_requires = ['numpy%s' % numpy_min_ver], ) diff --git a/setup.py b/setup.py index 0551c751..22775d38 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ def get_tc_decoder_pkg_url(version, artifacts_root): pyver = ''.join(str(i) for i in sys.version_info[0:2]) - return 'ds_ctcdecoder @ {artifacts_root}/ds_ctcdecoder-{ds_version}-cp{pyver}-cp{pyver}{m_or_mu}-{platform}_{arch}.whl'.format( + return 'mvs_ctcdecoder @ {artifacts_root}/mvs_ctcdecoder-{ds_version}-cp{pyver}-cp{pyver}{m_or_mu}-{platform}_{arch}.whl'.format( artifacts_root=artifacts_root, ds_version=ds_version, pyver=pyver, @@ -70,7 +70,7 @@ def main(): ] decoder_pypi_dep = [ - 'ds_ctcdecoder == {}'.format(version) + 'mvs_ctcdecoder == {}'.format(version) ] tensorflow_pypi_dep = [ diff --git a/tests/test_text.py b/tests/test_text.py index 5bdda19e..00cc2ea4 100644 --- a/tests/test_text.py +++ b/tests/test_text.py @@ -1,7 +1,7 @@ import unittest import os -from ds_ctcdecoder import Alphabet +from mvs_ctcdecoder import Alphabet class TestAlphabetParsing(unittest.TestCase): diff --git a/training/mozilla_voice_stt_training/evaluate.py b/training/mozilla_voice_stt_training/evaluate.py index 965b3370..a66a940b 100755 --- a/training/mozilla_voice_stt_training/evaluate.py +++ b/training/mozilla_voice_stt_training/evaluate.py @@ -12,7 +12,7 @@ import progressbar import tensorflow as tf import tensorflow.compat.v1 as tfv1 -from ds_ctcdecoder import ctc_beam_search_decoder_batch, Scorer +from mvs_ctcdecoder import ctc_beam_search_decoder_batch, Scorer from six.moves import zip from .util.config import Config, initialize_globals diff --git a/training/mozilla_voice_stt_training/train.py b/training/mozilla_voice_stt_training/train.py index d23c88f1..7dbfd682 100644 --- a/training/mozilla_voice_stt_training/train.py +++ b/training/mozilla_voice_stt_training/train.py @@ -25,7 +25,7 @@ tfv1.logging.set_verbosity({ }.get(DESIRED_LOG_LEVEL)) from datetime import datetime -from ds_ctcdecoder import ctc_beam_search_decoder, Scorer +from mvs_ctcdecoder import ctc_beam_search_decoder, Scorer from .evaluate import evaluate from six.moves import zip, range from .util.config import Config, initialize_globals diff --git a/training/mozilla_voice_stt_training/util/config.py b/training/mozilla_voice_stt_training/util/config.py index 2bd580b5..0e9d1d7d 100755 --- a/training/mozilla_voice_stt_training/util/config.py +++ b/training/mozilla_voice_stt_training/util/config.py @@ -6,7 +6,7 @@ import tensorflow.compat.v1 as tfv1 from attrdict import AttrDict from xdg import BaseDirectory as xdg -from ds_ctcdecoder import Alphabet, UTF8Alphabet +from mvs_ctcdecoder import Alphabet, UTF8Alphabet from .flags import FLAGS from .gpu import get_available_gpus diff --git a/training/mozilla_voice_stt_training/util/helpers.py b/training/mozilla_voice_stt_training/util/helpers.py index cccdb666..7f8c8509 100644 --- a/training/mozilla_voice_stt_training/util/helpers.py +++ b/training/mozilla_voice_stt_training/util/helpers.py @@ -44,11 +44,11 @@ def check_ctcdecoder_version(): try: # pylint: disable=import-outside-toplevel - from ds_ctcdecoder import __version__ as decoder_version + from mvs_ctcdecoder import __version__ as decoder_version except ImportError as e: if e.msg.find('__version__') > 0: print("Mozilla Voice STT version ({ds_version}) requires CTC decoder to expose __version__. " - "Please upgrade the ds_ctcdecoder package to version {ds_version}".format(ds_version=ds_version_s)) + "Please upgrade the mvs_ctcdecoder package to version {ds_version}".format(ds_version=ds_version_s)) sys.exit(1) raise e diff --git a/transcribe.py b/transcribe.py index 151a8abd..025592cf 100755 --- a/transcribe.py +++ b/transcribe.py @@ -18,7 +18,7 @@ from mozilla_voice_stt_training.util.config import Config, initialize_globals from mozilla_voice_stt_training.util.feeding import split_audio_file from mozilla_voice_stt_training.util.flags import create_flags, FLAGS from mozilla_voice_stt_training.util.logging import log_error, log_info, log_progress, create_progressbar -from ds_ctcdecoder import ctc_beam_search_decoder_batch, Scorer +from mvs_ctcdecoder import ctc_beam_search_decoder_batch, Scorer from multiprocessing import Process, cpu_count