Skip to content

Commit

Permalink
Merge pull request #3237 from lissyx/rename-training-package
Browse files Browse the repository at this point in the history
Rename deepspeech_training package
  • Loading branch information
lissyx authored Aug 10, 2020
2 parents 457198c + 6f84bd1 commit 3dcb374
Show file tree
Hide file tree
Showing 67 changed files with 75 additions and 75 deletions.
2 changes: 1 addition & 1 deletion DeepSpeech.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

if __name__ == '__main__':
try:
from deepspeech_training import train as ds_train
from mozilla_voice_stt_training import train as ds_train
except ImportError:
print('Training package is not installed. See training documentation.')
raise
Expand Down
2 changes: 1 addition & 1 deletion GRAPH_VERSION
2 changes: 1 addition & 1 deletion VERSION
4 changes: 2 additions & 2 deletions bin/compare_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import sys
import argparse

from deepspeech_training.util.audio import AUDIO_TYPE_NP, mean_dbfs
from deepspeech_training.util.sample_collections import load_sample
from mozilla_voice_stt_training.util.audio import AUDIO_TYPE_NP, mean_dbfs
from mozilla_voice_stt_training.util.sample_collections import load_sample


def fail(message):
Expand Down
8 changes: 4 additions & 4 deletions bin/data_set_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
import progressbar
from pathlib import Path

from deepspeech_training.util.audio import (
from mozilla_voice_stt_training.util.audio import (
AUDIO_TYPE_PCM,
AUDIO_TYPE_OPUS,
AUDIO_TYPE_WAV,
change_audio_types,
)
from deepspeech_training.util.downloader import SIMPLE_BAR
from deepspeech_training.util.sample_collections import (
from mozilla_voice_stt_training.util.downloader import SIMPLE_BAR
from mozilla_voice_stt_training.util.sample_collections import (
CSVWriter,
DirectSDBWriter,
samples_from_sources,
)
from deepspeech_training.util.augmentations import (
from mozilla_voice_stt_training.util.augmentations import (
parse_augmentations,
apply_sample_augmentations,
SampleAugmentation
Expand Down
2 changes: 1 addition & 1 deletion bin/import_aidatatang.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import pandas

from deepspeech_training.util.importers import get_importers_parser
from mozilla_voice_stt_training.util.importers import get_importers_parser

COLUMN_NAMES = ["wav_filename", "wav_filesize", "transcript"]

Expand Down
2 changes: 1 addition & 1 deletion bin/import_aishell.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import pandas

from deepspeech_training.util.importers import get_importers_parser
from mozilla_voice_stt_training.util.importers import get_importers_parser

COLUMNNAMES = ["wav_filename", "wav_filesize", "transcript"]

Expand Down
6 changes: 3 additions & 3 deletions bin/import_cv.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
import progressbar
import sox

from deepspeech_training.util.downloader import SIMPLE_BAR, maybe_download
from deepspeech_training.util.importers import (
from mozilla_voice_stt_training.util.downloader import SIMPLE_BAR, maybe_download
from mozilla_voice_stt_training.util.importers import (
get_counter,
get_imported_samples,
print_import_report,
)
from deepspeech_training.util.importers import validate_label_eng as validate_label
from mozilla_voice_stt_training.util.importers import validate_label_eng as validate_label

FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"]
SAMPLE_RATE = 16000
Expand Down
4 changes: 2 additions & 2 deletions bin/import_cv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import progressbar
import sox

from deepspeech_training.util.downloader import SIMPLE_BAR
from deepspeech_training.util.importers import (
from mozilla_voice_stt_training.util.downloader import SIMPLE_BAR
from mozilla_voice_stt_training.util.importers import (
get_counter,
get_imported_samples,
get_importers_parser,
Expand Down
2 changes: 1 addition & 1 deletion bin/import_fisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import pandas
import soundfile # <= Has an external dependency on libsndfile

from deepspeech_training.util.importers import validate_label_eng as validate_label
from mozilla_voice_stt_training.util.importers import validate_label_eng as validate_label

# Prerequisite: Having the sph2pipe tool in your PATH:
# https://www.ldc.upenn.edu/language-resources/tools/sphere-conversion-tools
Expand Down
2 changes: 1 addition & 1 deletion bin/import_freestmandarin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
import pandas

from deepspeech_training.util.importers import get_importers_parser
from mozilla_voice_stt_training.util.importers import get_importers_parser

COLUMN_NAMES = ["wav_filename", "wav_filesize", "transcript"]

Expand Down
2 changes: 1 addition & 1 deletion bin/import_gram_vaani.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from sox import Transformer

import swifter
from deepspeech_training.util.importers import get_importers_parser, get_validate_label
from mozilla_voice_stt_training.util.importers import get_importers_parser, get_validate_label

__version__ = "0.1.0"
_logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion bin/import_ldc93s1.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import pandas

from deepspeech_training.util.downloader import maybe_download
from mozilla_voice_stt_training.util.downloader import maybe_download


def _download_and_preprocess_data(data_dir):
Expand Down
2 changes: 1 addition & 1 deletion bin/import_librivox.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from sox import Transformer
from tensorflow.python.platform import gfile

from deepspeech_training.util.downloader import maybe_download
from mozilla_voice_stt_training.util.downloader import maybe_download

SAMPLE_RATE = 16000

Expand Down
4 changes: 2 additions & 2 deletions bin/import_lingua_libre.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import progressbar
import sox

from deepspeech_training.util.downloader import SIMPLE_BAR, maybe_download
from deepspeech_training.util.importers import (
from mozilla_voice_stt_training.util.downloader import SIMPLE_BAR, maybe_download
from mozilla_voice_stt_training.util.importers import (
get_counter,
get_imported_samples,
get_importers_parser,
Expand Down
4 changes: 2 additions & 2 deletions bin/import_m-ailabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import progressbar

from deepspeech_training.util.downloader import SIMPLE_BAR, maybe_download
from deepspeech_training.util.importers import (
from mozilla_voice_stt_training.util.downloader import SIMPLE_BAR, maybe_download
from mozilla_voice_stt_training.util.importers import (
get_counter,
get_imported_samples,
get_importers_parser,
Expand Down
2 changes: 1 addition & 1 deletion bin/import_magicdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import pandas

from deepspeech_training.util.importers import get_importers_parser
from mozilla_voice_stt_training.util.importers import get_importers_parser

COLUMN_NAMES = ["wav_filename", "wav_filesize", "transcript"]

Expand Down
2 changes: 1 addition & 1 deletion bin/import_primewords.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import numpy as np
import pandas

from deepspeech_training.util.importers import get_importers_parser
from mozilla_voice_stt_training.util.importers import get_importers_parser

COLUMN_NAMES = ["wav_filename", "wav_filesize", "transcript"]

Expand Down
4 changes: 2 additions & 2 deletions bin/import_slr57.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import progressbar

from deepspeech_training.util.downloader import SIMPLE_BAR, maybe_download
from deepspeech_training.util.importers import (
from mozilla_voice_stt_training.util.downloader import SIMPLE_BAR, maybe_download
from mozilla_voice_stt_training.util.importers import (
get_counter,
get_imported_samples,
get_importers_parser,
Expand Down
2 changes: 1 addition & 1 deletion bin/import_swb.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import requests
import soundfile # <= Has an external dependency on libsndfile

from deepspeech_training.util.importers import validate_label_eng as validate_label
from mozilla_voice_stt_training.util.importers import validate_label_eng as validate_label

# ARCHIVE_NAME refers to ISIP alignments from 01/29/03
ARCHIVE_NAME = "switchboard_word_alignments.tar.gz"
Expand Down
4 changes: 2 additions & 2 deletions bin/import_swc.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import progressbar
import sox

from deepspeech_training.util.downloader import SIMPLE_BAR, maybe_download
from deepspeech_training.util.importers import validate_label_eng as validate_label
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

SWC_URL = "https://www2.informatik.uni-hamburg.de/nats/pub/SWC/SWC_{language}.tar"
Expand Down
4 changes: 2 additions & 2 deletions bin/import_ted.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from sox import Transformer
from tensorflow.python.platform import gfile

from deepspeech_training.util.downloader import maybe_download
from deepspeech_training.util.stm import parse_stm_file
from mozilla_voice_stt_training.util.downloader import maybe_download
from mozilla_voice_stt_training.util.stm import parse_stm_file


def _download_and_preprocess_data(data_dir):
Expand Down
4 changes: 2 additions & 2 deletions bin/import_ts.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import sox

import unidecode
from deepspeech_training.util.downloader import SIMPLE_BAR, maybe_download
from deepspeech_training.util.importers import (
from mozilla_voice_stt_training.util.downloader import SIMPLE_BAR, maybe_download
from mozilla_voice_stt_training.util.importers import (
get_counter,
get_imported_samples,
get_importers_parser,
Expand Down
4 changes: 2 additions & 2 deletions bin/import_tuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import progressbar

from deepspeech_training.util.downloader import SIMPLE_BAR, maybe_download
from deepspeech_training.util.importers import validate_label_eng as validate_label
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

TUDA_VERSION = "v2"
Expand Down
4 changes: 2 additions & 2 deletions bin/import_vctk.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import librosa
import progressbar

from deepspeech_training.util.downloader import SIMPLE_BAR, maybe_download
from deepspeech_training.util.importers import (
from mozilla_voice_stt_training.util.downloader import SIMPLE_BAR, maybe_download
from mozilla_voice_stt_training.util.importers import (
get_counter,
get_imported_samples,
print_import_report,
Expand Down
2 changes: 1 addition & 1 deletion bin/import_voxforge.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import pandas
from bs4 import BeautifulSoup
from tensorflow.python.platform import gfile
from deepspeech_training.util.downloader import maybe_download
from mozilla_voice_stt_training.util.downloader import maybe_download

"""The number of jobs to run in parallel"""
NUM_PARALLEL = 8
Expand Down
6 changes: 3 additions & 3 deletions bin/play.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import random
import argparse

from deepspeech_training.util.audio import LOADABLE_AUDIO_EXTENSIONS, AUDIO_TYPE_PCM, AUDIO_TYPE_WAV
from deepspeech_training.util.sample_collections import SampleList, LabeledSample, samples_from_source
from deepspeech_training.util.augmentations import parse_augmentations, apply_sample_augmentations, SampleAugmentation
from mozilla_voice_stt_training.util.audio import LOADABLE_AUDIO_EXTENSIONS, AUDIO_TYPE_PCM, AUDIO_TYPE_WAV
from mozilla_voice_stt_training.util.sample_collections import SampleList, LabeledSample, samples_from_source
from mozilla_voice_stt_training.util.augmentations import parse_augmentations, apply_sample_augmentations, SampleAugmentation


def get_samples_in_play_order():
Expand Down
2 changes: 1 addition & 1 deletion data/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Language-Specific Data

This directory contains language-specific data files. Most importantly, you will find here:

1. A list of unique characters for the target language (e.g. English) in ``data/alphabet.txt``. After installing the training code, you can check ``python -m deepspeech_training.util.check_characters --help`` for a tool that creates an alphabet file from a list of training CSV files.
1. A list of unique characters for the target language (e.g. English) in ``data/alphabet.txt``. After installing the training code, you can check ``python -m mozilla_voice_stt_training.util.check_characters --help`` for a tool that creates an alphabet file from a list of training CSV files.

2. A script used to generate a binary n-gram language model: ``data/lm/generate_lm.py``.

Expand Down
2 changes: 1 addition & 1 deletion doc/Flags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Below you can find the definition of all command-line flags supported by the tra
Flags
-----

.. literalinclude:: ../training/deepspeech_training/util/flags.py
.. literalinclude:: ../training/mozilla_voice_stt_training/util/flags.py
:language: python
:linenos:
:lineno-match:
Expand Down
2 changes: 1 addition & 1 deletion doc/examples
Submodule examples updated 73 files
+1 −0 README.rst
+4 −5 android_mic_streaming/README.md
+1 −1 android_mic_streaming/app/build.gradle
+10 −10 android_mic_streaming/app/src/main/java/org/deepspeechdemo/MainActivity.kt
+157 −0 batch_processing/Readme.md
+83 −0 batch_processing/driver.py
+61 −0 batch_processing/requirements.txt
+5 −0 batch_processing/setup.ps1
+1 −0 batch_processing/test.ps1
+10 −0 batch_processing/test_tf.py
+95 −0 electron/.gitignore
+71 −0 electron/Readme.md
+16,338 −0 electron/package-lock.json
+98 −0 electron/package.json
+86 −0 electron/public/create-window.js
+22 −0 electron/public/download.js
+24 −0 electron/public/electron.js
+44 −0 electron/public/index.html
+25 −0 electron/public/manifest.json
+2 −0 electron/public/preload.js
+64 −0 electron/public/recognize-wav.js
+60 −0 electron/src/App.js
+5 −0 electron/src/index.js
+36 −0 electron/test.sh
+1 −1 ffmpeg_vad_streaming/README.MD
+1 −1 ffmpeg_vad_streaming/package.json
+6 −6 ffmpeg_vad_streaming/test.sh
+12 −10 mic_vad_streaming/README.rst
+4 −4 mic_vad_streaming/mic_vad_streaming.py
+1 −1 mic_vad_streaming/requirements.txt
+2 −2 mic_vad_streaming/test.sh
+1 −1 net_framework/DeepSpeechWPF/App.xaml.cs
+139 −139 net_framework/DeepSpeechWPF/DeepSpeech.WPF.csproj
+36 −0 nim_mic_vad_streaming/README.md
+70 −0 nim_mic_vad_streaming/linux_nim_vad_streaming/README.md
+190 −0 nim_mic_vad_streaming/linux_nim_vad_streaming/vad_stream.nim
+62 −0 nim_mic_vad_streaming/win_nim_vad_streaming/README.md
+160 −0 nim_mic_vad_streaming/win_nim_vad_streaming/vad_stream.nim
+4 −4 nodejs_mic_vad_streaming/Readme.md
+0 −731 nodejs_mic_vad_streaming/package-lock.json
+1 −1 nodejs_mic_vad_streaming/package.json
+9 −18 nodejs_mic_vad_streaming/start.js
+6 −6 nodejs_wav/Readme.md
+2 −2 nodejs_wav/index.js
+1 −1 nodejs_wav/package.json
+2 −2 tests.sh
+330 −0 uwp/.gitignore
+51 −0 uwp/DeepSpeechUWP.sln
+1 −0 uwp/DeepSpeechUWP/.gitignore
+7 −0 uwp/DeepSpeechUWP/App.xaml
+103 −0 uwp/DeepSpeechUWP/App.xaml.cs
+ uwp/DeepSpeechUWP/Assets/LockScreenLogo.scale-200.png
+ uwp/DeepSpeechUWP/Assets/SplashScreen.scale-200.png
+ uwp/DeepSpeechUWP/Assets/Square150x150Logo.scale-200.png
+ uwp/DeepSpeechUWP/Assets/Square44x44Logo.scale-200.png
+ uwp/DeepSpeechUWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
+ uwp/DeepSpeechUWP/Assets/StoreLogo.png
+ uwp/DeepSpeechUWP/Assets/Wide310x150Logo.scale-200.png
+190 −0 uwp/DeepSpeechUWP/DeepSpeechUWP.csproj
+51 −0 uwp/DeepSpeechUWP/MainPage.xaml
+328 −0 uwp/DeepSpeechUWP/MainPage.xaml.cs
+50 −0 uwp/DeepSpeechUWP/Package.appxmanifest
+29 −0 uwp/DeepSpeechUWP/Properties/AssemblyInfo.cs
+31 −0 uwp/DeepSpeechUWP/Properties/Default.rd.xml
+0 −0 uwp/DeepSpeechUWP/models/.gitkeep
+0 −0 vad_transcriber/README.md
+1 −1 vad_transcriber/requirements.txt
+4 −4 vad_transcriber/wavTranscriber.py
+2 −2 web_microphone_websocket/Readme.md
+2 −2 web_microphone_websocket/package.json
+9 −18 web_microphone_websocket/server.js
+1 −1 web_microphone_websocket/test.sh
+0 −11,345 web_microphone_websocket/yarn.lock
2 changes: 1 addition & 1 deletion evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

if __name__ == '__main__':
try:
from deepspeech_training import evaluate as ds_evaluate
from mozilla_voice_stt_training import evaluate as ds_evaluate
except ImportError:
print('Training package is not installed. See training documentation.')
raise
Expand Down
4 changes: 2 additions & 2 deletions evaluate_tflite.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import sys

from mozilla_voice_stt import Model
from deepspeech_training.util.evaluate_tools import calculate_and_print_report
from deepspeech_training.util.flags import create_flags
from mozilla_voice_stt_training.util.evaluate_tools import calculate_and_print_report
from mozilla_voice_stt_training.util.flags import create_flags
from functools import partial
from multiprocessing import JoinableQueue, Process, cpu_count, Manager
from six.moves import zip, range
Expand Down
12 changes: 6 additions & 6 deletions lm_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
import sys
import tensorflow.compat.v1 as tfv1

from deepspeech_training.evaluate import evaluate
from deepspeech_training.train import create_model
from deepspeech_training.util.config import Config, initialize_globals
from deepspeech_training.util.flags import create_flags, FLAGS
from deepspeech_training.util.logging import log_error
from deepspeech_training.util.evaluate_tools import wer_cer_batch
from mozilla_voice_stt_training.evaluate import evaluate
from mozilla_voice_stt_training.train import create_model
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


Expand Down
4 changes: 2 additions & 2 deletions native_client/bazel_workspace_status_cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ echo "STABLE_TF_GIT_VERSION ${tf_git_rev}"
pushd $(dirname "$0")
ds_git_rev=$(git describe --long --tags)
echo "STABLE_DS_GIT_VERSION ${ds_git_rev}"
ds_version=$(cat ../training/deepspeech_training/VERSION)
ds_version=$(cat ../training/mozilla_voice_stt_training/VERSION)
echo "STABLE_DS_VERSION ${ds_version}"
ds_graph_version=$(cat ../training/deepspeech_training/GRAPH_VERSION)
ds_graph_version=$(cat ../training/mozilla_voice_stt_training/GRAPH_VERSION)
echo "STABLE_DS_GRAPH_VERSION ${ds_graph_version}"
popd
2 changes: 1 addition & 1 deletion native_client/ctcdecode/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def maybe_rebuild(srcs, out_name, build_dir):
num_parallel=known_args.num_processes,
debug=debug)

project_version = read('../../training/deepspeech_training/VERSION').strip()
project_version = read('../../training/mozilla_voice_stt_training/VERSION').strip()

build_dir = 'temp_build/temp_build'

Expand Down
2 changes: 1 addition & 1 deletion native_client/javascript/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ NODE_ABI_TARGET ?=
NODE_BUILD_VERBOSE ?= --verbose
NPM_TOOL ?= npm
PROJECT_NAME ?= @mozilla-voice/stt
PROJECT_VERSION ?= $(shell cat ../../training/deepspeech_training/VERSION | tr -d '\n')
PROJECT_VERSION ?= $(shell cat ../../training/mozilla_voice_stt_training/VERSION | tr -d '\n')
NPM_ROOT ?= $(shell npm root)

NODE_MODULES_BIN ?= $(NPM_ROOT)/.bin/
Expand Down
2 changes: 1 addition & 1 deletion native_client/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def read(fname):
sys.argv.remove('--project_name')
sys.argv.pop(project_name_idx)

with open('../../training/deepspeech_training/VERSION', 'r') as ver:
with open('../../training/mozilla_voice_stt_training/VERSION', 'r') as ver:
project_version = ver.read().strip()

class BuildExtFirst(build):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def main():
install_requires = install_requires + tensorflow_pypi_dep

setup(
name='deepspeech_training',
name='mozilla_voice_stt_training',
version=version,
description='Training code for mozilla DeepSpeech',
url='https://github.com/mozilla/DeepSpeech',
Expand All @@ -119,7 +119,7 @@ def main():
# If there are data files included in your packages that need to be
# installed, specify them here.
package_data={
'deepspeech_training': [
'mozilla_voice_stt_training': [
'VERSION',
'GRAPH_VERSION',
],
Expand Down
Loading

0 comments on commit 3dcb374

Please sign in to comment.