Merge pull request #1856 from coqui-ai/decoder-rename
Rename decoder package to coqui_stt_ctcdecoder
This commit is contained in:
commit
f147c78a97
|
@ -145,7 +145,7 @@ jobs:
|
||||||
bindings
|
bindings
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: "ds_ctcdecoder-Linux-test.whl"
|
name: "coqui_stt_ctcdecoder-Linux-test.whl"
|
||||||
path: ${{ github.workspace }}/native_client/ctcdecode/dist/*.whl
|
path: ${{ github.workspace }}/native_client/ctcdecode/dist/*.whl
|
||||||
- run: |
|
- run: |
|
||||||
make -C native_client/ctcdecode clean-keep-third-party
|
make -C native_client/ctcdecode clean-keep-third-party
|
||||||
|
@ -166,14 +166,14 @@ jobs:
|
||||||
python-version: 3.6
|
python-version: 3.6
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: "ds_ctcdecoder-Linux-test.whl"
|
name: "coqui_stt_ctcdecoder-Linux-test.whl"
|
||||||
- run: |
|
- run: |
|
||||||
python --version
|
python --version
|
||||||
pip --version
|
pip --version
|
||||||
- run: |
|
- run: |
|
||||||
pip install --upgrade pip==19.3.1 setuptools==45.0.0 wheel==0.33.6
|
pip install --upgrade pip==19.3.1 setuptools==45.0.0 wheel==0.33.6
|
||||||
- run: |
|
- run: |
|
||||||
pip install ds_ctcdecoder-*-cp36-cp36m-*_x86_64.whl
|
pip install coqui_stt_ctcdecoder-*-cp36-cp36m-*_x86_64.whl
|
||||||
DS_NODECODER=y pip install --upgrade .
|
DS_NODECODER=y pip install --upgrade .
|
||||||
- run: |
|
- run: |
|
||||||
bits=""
|
bits=""
|
||||||
|
@ -685,7 +685,7 @@ jobs:
|
||||||
bindings
|
bindings
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: "ds_ctcdecoder-macOS-test.whl"
|
name: "coqui_stt_ctcdecoder-macOS-test.whl"
|
||||||
path: ${{ github.workspace }}/native_client/ctcdecode/dist/*.whl
|
path: ${{ github.workspace }}/native_client/ctcdecode/dist/*.whl
|
||||||
- run: |
|
- run: |
|
||||||
make -C native_client/ctcdecode clean-keep-third-party
|
make -C native_client/ctcdecode clean-keep-third-party
|
||||||
|
@ -706,14 +706,14 @@ jobs:
|
||||||
python-version: 3.6
|
python-version: 3.6
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: "ds_ctcdecoder-macOS-test.whl"
|
name: "coqui_stt_ctcdecoder-macOS-test.whl"
|
||||||
- run: |
|
- run: |
|
||||||
python --version
|
python --version
|
||||||
pip --version
|
pip --version
|
||||||
- run: |
|
- run: |
|
||||||
pip install --upgrade pip==19.3.1 setuptools==45.0.0 wheel==0.33.6
|
pip install --upgrade pip==19.3.1 setuptools==45.0.0 wheel==0.33.6
|
||||||
- run: |
|
- run: |
|
||||||
pip install ds_ctcdecoder-*-cp36-cp36m-*_x86_64.whl
|
pip install coqui_stt_ctcdecoder-*-cp36-cp36m-*_x86_64.whl
|
||||||
DS_NODECODER=y pip install --upgrade .
|
DS_NODECODER=y pip install --upgrade .
|
||||||
- run: |
|
- run: |
|
||||||
bits=""
|
bits=""
|
||||||
|
@ -1190,7 +1190,7 @@ jobs:
|
||||||
bindings
|
bindings
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: "ds_ctcdecoder-windows-test.whl"
|
name: "coqui_stt_ctcdecoder-windows-test.whl"
|
||||||
path: ${{ github.workspace }}/native_client/ctcdecode/dist/*.whl
|
path: ${{ github.workspace }}/native_client/ctcdecode/dist/*.whl
|
||||||
- run: |
|
- run: |
|
||||||
make -C native_client/ctcdecode clean-keep-third-party
|
make -C native_client/ctcdecode clean-keep-third-party
|
||||||
|
|
|
@ -39,7 +39,7 @@ from coqui_stt_training.util.importers import (
|
||||||
get_validate_label,
|
get_validate_label,
|
||||||
print_import_report,
|
print_import_report,
|
||||||
)
|
)
|
||||||
from ds_ctcdecoder import Alphabet
|
from coqui_stt_ctcdecoder import Alphabet
|
||||||
|
|
||||||
FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"]
|
FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"]
|
||||||
SAMPLE_RATE = 16000
|
SAMPLE_RATE = 16000
|
||||||
|
|
|
@ -23,7 +23,7 @@ from coqui_stt_training.util.importers import (
|
||||||
get_validate_label,
|
get_validate_label,
|
||||||
print_import_report,
|
print_import_report,
|
||||||
)
|
)
|
||||||
from ds_ctcdecoder import Alphabet
|
from coqui_stt_ctcdecoder import Alphabet
|
||||||
|
|
||||||
FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"]
|
FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"]
|
||||||
SAMPLE_RATE = 16000
|
SAMPLE_RATE = 16000
|
||||||
|
|
|
@ -20,7 +20,7 @@ from coqui_stt_training.util.importers import (
|
||||||
get_validate_label,
|
get_validate_label,
|
||||||
print_import_report,
|
print_import_report,
|
||||||
)
|
)
|
||||||
from ds_ctcdecoder import Alphabet
|
from coqui_stt_ctcdecoder import Alphabet
|
||||||
|
|
||||||
FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"]
|
FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"]
|
||||||
SAMPLE_RATE = 16000
|
SAMPLE_RATE = 16000
|
||||||
|
|
|
@ -18,7 +18,7 @@ from coqui_stt_training.util.importers import (
|
||||||
get_validate_label,
|
get_validate_label,
|
||||||
print_import_report,
|
print_import_report,
|
||||||
)
|
)
|
||||||
from ds_ctcdecoder import Alphabet
|
from coqui_stt_ctcdecoder import Alphabet
|
||||||
|
|
||||||
FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"]
|
FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"]
|
||||||
SAMPLE_RATE = 16000
|
SAMPLE_RATE = 16000
|
||||||
|
|
|
@ -17,7 +17,7 @@ from coqui_stt_training.util.importers import (
|
||||||
get_validate_label,
|
get_validate_label,
|
||||||
print_import_report,
|
print_import_report,
|
||||||
)
|
)
|
||||||
from ds_ctcdecoder import Alphabet
|
from coqui_stt_ctcdecoder import Alphabet
|
||||||
|
|
||||||
FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"]
|
FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"]
|
||||||
SAMPLE_RATE = 16000
|
SAMPLE_RATE = 16000
|
||||||
|
|
|
@ -24,7 +24,7 @@ import sox
|
||||||
|
|
||||||
from coqui_stt_training.util.downloader import SIMPLE_BAR, maybe_download
|
from coqui_stt_training.util.downloader import SIMPLE_BAR, maybe_download
|
||||||
from coqui_stt_training.util.importers import validate_label_eng as validate_label
|
from coqui_stt_training.util.importers import validate_label_eng as validate_label
|
||||||
from ds_ctcdecoder import Alphabet
|
from coqui_stt_ctcdecoder import Alphabet
|
||||||
|
|
||||||
SWC_URL = "https://www2.informatik.uni-hamburg.de/nats/pub/SWC/SWC_{language}.tar"
|
SWC_URL = "https://www2.informatik.uni-hamburg.de/nats/pub/SWC/SWC_{language}.tar"
|
||||||
SWC_ARCHIVE = "SWC_{language}.tar"
|
SWC_ARCHIVE = "SWC_{language}.tar"
|
||||||
|
|
|
@ -16,7 +16,7 @@ import progressbar
|
||||||
|
|
||||||
from coqui_stt_training.util.downloader import SIMPLE_BAR, maybe_download
|
from coqui_stt_training.util.downloader import SIMPLE_BAR, maybe_download
|
||||||
from coqui_stt_training.util.importers import validate_label_eng as validate_label
|
from coqui_stt_training.util.importers import validate_label_eng as validate_label
|
||||||
from ds_ctcdecoder import Alphabet
|
from coqui_stt_ctcdecoder import Alphabet
|
||||||
|
|
||||||
TUDA_VERSION = "v2"
|
TUDA_VERSION = "v2"
|
||||||
TUDA_PACKAGE = "german-speechdata-package-{}".format(TUDA_VERSION)
|
TUDA_PACKAGE = "german-speechdata-package-{}".format(TUDA_VERSION)
|
||||||
|
|
|
@ -146,7 +146,7 @@ This will create the package ``stt-VERSION.tgz`` in ``native_client/javascript``
|
||||||
Install the CTC decoder package
|
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 ``coqui_stt_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::
|
.. code-block::
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ from coqui_stt_training.util.config import Config, initialize_globals
|
||||||
from coqui_stt_training.util.flags import create_flags, FLAGS
|
from coqui_stt_training.util.flags import create_flags, FLAGS
|
||||||
from coqui_stt_training.util.logging import log_error
|
from coqui_stt_training.util.logging import log_error
|
||||||
from coqui_stt_training.util.evaluate_tools import wer_cer_batch
|
from coqui_stt_training.util.evaluate_tools import wer_cer_batch
|
||||||
from ds_ctcdecoder import Scorer
|
from coqui_stt_ctcdecoder import Scorer
|
||||||
|
|
||||||
|
|
||||||
def character_based():
|
def character_based():
|
||||||
|
|
|
@ -11,7 +11,7 @@ LDFLAGS_NEEDED += $(RASPBIAN)/lib/aarch64-linux-gnu/libm.so.6
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS),Darwin)
|
ifeq ($(OS),Darwin)
|
||||||
GENERATE_DEBUG_SYMS := dsymutil temp_build/temp_build/ds_ctcdecoder/_swigwrapper.*.so
|
GENERATE_DEBUG_SYMS := dsymutil temp_build/temp_build/coqui_stt_ctcdecoder/_swigwrapper.*.so
|
||||||
else
|
else
|
||||||
GENERATE_DEBUG_SYMS :=
|
GENERATE_DEBUG_SYMS :=
|
||||||
endif
|
endif
|
||||||
|
@ -29,7 +29,7 @@ THIRD_PARTY := third_party.$(ARCHIVE_EXT)
|
||||||
all: bindings
|
all: bindings
|
||||||
|
|
||||||
clean-keep-third-party:
|
clean-keep-third-party:
|
||||||
rm -rf dist temp_build ds_ctcdecoder.egg-info
|
rm -rf dist temp_build coqui_stt_ctcdecoder.egg-info
|
||||||
rm -f swigwrapper_wrap.cpp swigwrapper.py $(FIRST_PARTY)
|
rm -f swigwrapper_wrap.cpp swigwrapper.py $(FIRST_PARTY)
|
||||||
|
|
||||||
clean: clean-keep-third-party
|
clean: clean-keep-third-party
|
||||||
|
|
|
@ -68,7 +68,7 @@ maybe_rebuild(KENLM_FILES, third_party_build, build_dir)
|
||||||
maybe_rebuild(CTC_DECODER_FILES, ctc_decoder_build, build_dir)
|
maybe_rebuild(CTC_DECODER_FILES, ctc_decoder_build, build_dir)
|
||||||
|
|
||||||
decoder_module = Extension(
|
decoder_module = Extension(
|
||||||
name='ds_ctcdecoder._swigwrapper',
|
name='coqui_stt_ctcdecoder._swigwrapper',
|
||||||
sources=['swigwrapper.i'],
|
sources=['swigwrapper.i'],
|
||||||
swig_opts=['-c++', '-extranative'],
|
swig_opts=['-c++', '-extranative'],
|
||||||
language='c++',
|
language='c++',
|
||||||
|
@ -84,12 +84,12 @@ class BuildExtFirst(build):
|
||||||
('build_scripts', build.has_scripts)]
|
('build_scripts', build.has_scripts)]
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='ds_ctcdecoder',
|
name='coqui_stt_ctcdecoder',
|
||||||
version=project_version,
|
version=project_version,
|
||||||
description="""DS CTC decoder""",
|
description="""DS CTC decoder""",
|
||||||
cmdclass = {'build': BuildExtFirst},
|
cmdclass = {'build': BuildExtFirst},
|
||||||
ext_modules=[decoder_module],
|
ext_modules=[decoder_module],
|
||||||
package_dir = {'ds_ctcdecoder': '.'},
|
package_dir = {'coqui_stt_ctcdecoder': '.'},
|
||||||
py_modules=['ds_ctcdecoder', 'ds_ctcdecoder.swigwrapper'],
|
py_modules=['coqui_stt_ctcdecoder', 'coqui_stt_ctcdecoder.swigwrapper'],
|
||||||
install_requires = ['numpy%s' % numpy_min_ver],
|
install_requires = ['numpy%s' % numpy_min_ver],
|
||||||
)
|
)
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -32,7 +32,7 @@ def main():
|
||||||
]
|
]
|
||||||
|
|
||||||
decoder_pypi_dep = [
|
decoder_pypi_dep = [
|
||||||
'ds_ctcdecoder == {}'.format(version)
|
'coqui_stt_ctcdecoder == {}'.format(version)
|
||||||
]
|
]
|
||||||
|
|
||||||
tensorflow_pypi_dep = [
|
tensorflow_pypi_dep = [
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import unittest
|
import unittest
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from ds_ctcdecoder import Alphabet
|
from coqui_stt_ctcdecoder import Alphabet
|
||||||
|
|
||||||
class TestAlphabetParsing(unittest.TestCase):
|
class TestAlphabetParsing(unittest.TestCase):
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.10.0-alpha.4
|
0.10.0-alpha.5
|
||||||
|
|
|
@ -12,7 +12,7 @@ import progressbar
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
import tensorflow.compat.v1 as tfv1
|
import tensorflow.compat.v1 as tfv1
|
||||||
|
|
||||||
from ds_ctcdecoder import ctc_beam_search_decoder_batch, Scorer
|
from coqui_stt_ctcdecoder import ctc_beam_search_decoder_batch, Scorer
|
||||||
from six.moves import zip
|
from six.moves import zip
|
||||||
from .util.augmentations import NormalizeSampleRate
|
from .util.augmentations import NormalizeSampleRate
|
||||||
from .util.config import Config, initialize_globals
|
from .util.config import Config, initialize_globals
|
||||||
|
|
|
@ -25,7 +25,7 @@ tfv1.logging.set_verbosity({
|
||||||
}.get(DESIRED_LOG_LEVEL))
|
}.get(DESIRED_LOG_LEVEL))
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from ds_ctcdecoder import ctc_beam_search_decoder, Scorer
|
from coqui_stt_ctcdecoder import ctc_beam_search_decoder, Scorer
|
||||||
from .evaluate import evaluate
|
from .evaluate import evaluate
|
||||||
from six.moves import zip, range
|
from six.moves import zip, range
|
||||||
from .util.augmentations import NormalizeSampleRate
|
from .util.augmentations import NormalizeSampleRate
|
||||||
|
|
|
@ -6,7 +6,7 @@ import tensorflow.compat.v1 as tfv1
|
||||||
|
|
||||||
from attrdict import AttrDict
|
from attrdict import AttrDict
|
||||||
from xdg import BaseDirectory as xdg
|
from xdg import BaseDirectory as xdg
|
||||||
from ds_ctcdecoder import Alphabet, UTF8Alphabet
|
from coqui_stt_ctcdecoder import Alphabet, UTF8Alphabet
|
||||||
|
|
||||||
from .flags import FLAGS
|
from .flags import FLAGS
|
||||||
from .gpu import get_available_gpus
|
from .gpu import get_available_gpus
|
||||||
|
|
|
@ -44,11 +44,11 @@ def check_ctcdecoder_version():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# pylint: disable=import-outside-toplevel
|
# pylint: disable=import-outside-toplevel
|
||||||
from ds_ctcdecoder import __version__ as decoder_version
|
from coqui_stt_ctcdecoder import __version__ as decoder_version
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
if e.msg.find('__version__') > 0:
|
if e.msg.find('__version__') > 0:
|
||||||
print("Coqui STT version ({ds_version}) requires CTC decoder to expose __version__. "
|
print("Coqui 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 coqui_stt_ctcdecoder package to version {ds_version}".format(ds_version=ds_version_s))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ from coqui_stt_training.util.config import Config, initialize_globals
|
||||||
from coqui_stt_training.util.feeding import split_audio_file
|
from coqui_stt_training.util.feeding import split_audio_file
|
||||||
from coqui_stt_training.util.flags import create_flags, FLAGS
|
from coqui_stt_training.util.flags import create_flags, FLAGS
|
||||||
from coqui_stt_training.util.logging import log_error, log_info, log_progress, create_progressbar
|
from coqui_stt_training.util.logging import log_error, log_info, log_progress, create_progressbar
|
||||||
from ds_ctcdecoder import ctc_beam_search_decoder_batch, Scorer
|
from coqui_stt_ctcdecoder import ctc_beam_search_decoder_batch, Scorer
|
||||||
from multiprocessing import Process, cpu_count
|
from multiprocessing import Process, cpu_count
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue