├── data ├── ted │ └── .gitkeep ├── smoke_test │ ├── LDC93S1.txt │ ├── LDC93S1.wav │ ├── pruned_lm.scorer │ ├── russian_sample_data │ │ ├── ru.csv │ │ ├── ru.wav │ │ └── alphabet.ru │ ├── pruned_lm.bytes.scorer │ ├── LDC93S1_pcms16le_1_16000.wav │ ├── LDC93S1_pcms16le_1_8000.wav │ ├── LDC93S1_pcms16le_2_44100.wav │ └── new-home-in-the-stars-16k.wav └── alphabet.txt ├── tests ├── __init__.py └── test_data │ ├── alphabet_macos.txt │ ├── alphabet_unix.txt │ ├── alphabet_windows.txt │ └── validate_locale_fra.py ├── tensorflow_tflite_runtime.supp ├── .github ├── workflows │ └── .git-keep-empty-folder └── actions │ ├── package │ └── action.yml │ ├── setup-tensorflow │ └── action.yml │ ├── package-tensorflow │ └── action.yml │ ├── build-tensorflow │ └── action.yml │ ├── select-xcode │ └── action.yml │ ├── check_artifact_exists │ └── package.json │ ├── host-build │ └── action.yml │ └── win-install-sox │ └── action.yml ├── VERSION ├── requirements_transcribe.txt ├── training └── deepspeech_training │ ├── __init__.py │ ├── GRAPH_VERSION │ ├── util │ ├── __init__.py │ └── gpu.py │ └── VERSION ├── native_client ├── dotnet │ ├── nupkg │ │ ├── build │ │ │ ├── .gitpreserve │ │ │ └── DeepSpeech.targets │ │ ├── tools │ │ │ └── .gitpreserve │ │ └── lib │ │ │ ├── net45 │ │ │ └── .gitpreserve │ │ │ ├── net46 │ │ │ └── .gitpreserve │ │ │ └── net47 │ │ │ └── .gitpreserve │ ├── DeepSpeechConsole │ │ ├── arctic_a0024.wav │ │ ├── packages.config │ │ └── App.config │ ├── DeepSpeechWPF │ │ ├── App.config │ │ ├── Properties │ │ │ └── Settings.settings │ │ ├── App.xaml │ │ ├── MainWindow.xaml.cs │ │ └── packages.config │ └── DeepSpeechClient │ │ ├── Models │ │ └── Metadata.cs │ │ └── Structs │ │ └── Metadata.cs ├── java │ ├── app │ │ ├── .gitignore │ │ └── src │ │ │ ├── main │ │ │ └── res │ │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ └── test │ │ │ └── java │ │ │ └── org │ │ │ └── deepspeech │ │ │ └── ExampleUnitTest.java │ ├── libdeepspeech │ │ ├── .gitignore │ │ ├── libs │ │ │ └── .gitignore │ │ ├── gradle.properties │ │ └── src │ │ │ ├── main │ │ │ ├── res │ │ │ │ └── values │ │ │ │ │ └── strings.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── deepspeech │ │ │ │ ├── libdeepspeech │ │ │ │ └── DeepSpeechStreamingState.java │ │ │ │ └── libdeepspeech_doc │ │ │ │ └── README.rst │ │ │ └── test │ │ │ └── java │ │ │ └── org │ │ │ └── deepspeech │ │ │ └── libdeepspeech │ │ │ └── ExampleUnitTest.java │ ├── settings.gradle │ ├── README.md │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ └── .gitignore ├── kenlm │ ├── lm │ │ ├── interpolate │ │ │ ├── merge_test │ │ │ │ ├── test3 │ │ │ │ ├── test_no_unk │ │ │ │ ├── test1 │ │ │ │ ├── test_bad_order │ │ │ │ └── test2 │ │ │ ├── universal_vocab.cc │ │ │ ├── tune_weights.hh │ │ │ └── tune_matrix.hh │ │ ├── common │ │ │ ├── test_data │ │ │ │ ├── toy0.vocab │ │ │ │ ├── toy1.vocab │ │ │ │ ├── toy0.kenlm_intermediate │ │ │ │ ├── toy1.kenlm_intermediate │ │ │ │ ├── toy0.1 │ │ │ │ ├── toy0.2 │ │ │ │ ├── toy0.3 │ │ │ │ ├── toy1.1 │ │ │ │ ├── toy1.2 │ │ │ │ ├── toy1.3 │ │ │ │ └── generate.sh │ │ │ ├── size_option.hh │ │ │ └── renumber.cc │ │ ├── wrappers │ │ │ └── README │ │ ├── word_index.hh │ │ ├── sizes.hh │ │ ├── weights.hh │ │ └── virtual_interface.cc │ ├── GIT_REVISION │ ├── clean_query_only.sh │ ├── util │ │ ├── spaces.hh │ │ ├── have.hh │ │ ├── pcqueue_test.cc │ │ └── parallel_read.hh │ ├── MANIFEST.in │ ├── .gitignore │ └── BUILDING ├── ctcdecode │ ├── third_party │ │ ├── openfst-1.6.7 │ │ │ ├── Makefile.am │ │ │ └── src │ │ │ │ ├── Makefile.am │ │ │ │ ├── bin │ │ │ │ ├── fstunion.cc │ │ │ │ ├── fstconcat.cc │ │ │ │ ├── fstconnect.cc │ │ │ │ ├── fstinvert.cc │ │ │ │ ├── fsttopsort.cc │ │ │ │ ├── fstsynchronize.cc │ │ │ │ ├── fstconvert.cc │ │ │ │ ├── fstproject.cc │ │ │ │ ├── fstreverse.cc │ │ │ │ ├── fstepsnormalize.cc │ │ │ │ ├── fstreweight.cc │ │ │ │ ├── fstequal.cc │ │ │ │ ├── fstclosure.cc │ │ │ │ ├── fstisomorphic.cc │ │ │ │ ├── fstarcsort.cc │ │ │ │ ├── fstminimize.cc │ │ │ │ ├── fstcompose.cc │ │ │ │ ├── fstintersect.cc │ │ │ │ ├── fstprune.cc │ │ │ │ ├── fstdifference.cc │ │ │ │ └── fstencode.cc │ │ │ │ ├── lib │ │ │ │ └── Makefile.am │ │ │ │ ├── extensions │ │ │ │ ├── python │ │ │ │ │ ├── memory.pxd │ │ │ │ │ └── basictypes.pxd │ │ │ │ ├── linear │ │ │ │ │ ├── linear-tagger-fst.cc │ │ │ │ │ └── linear-classifier-fst.cc │ │ │ │ ├── ngram │ │ │ │ │ ├── ngram-fst.cc │ │ │ │ │ └── Makefile.am │ │ │ │ ├── compact │ │ │ │ │ ├── compact8_string-fst.cc │ │ │ │ │ ├── compact16_string-fst.cc │ │ │ │ │ ├── compact64_string-fst.cc │ │ │ │ │ ├── compact8_acceptor-fst.cc │ │ │ │ │ ├── compact16_acceptor-fst.cc │ │ │ │ │ ├── compact64_acceptor-fst.cc │ │ │ │ │ ├── compact8_unweighted-fst.cc │ │ │ │ │ ├── compact16_unweighted-fst.cc │ │ │ │ │ ├── compact64_unweighted-fst.cc │ │ │ │ │ ├── compact8_weighted_string-fst.cc │ │ │ │ │ ├── compact64_weighted_string-fst.cc │ │ │ │ │ ├── compact16_weighted_string-fst.cc │ │ │ │ │ ├── compact8_unweighted_acceptor-fst.cc │ │ │ │ │ ├── compact16_unweighted_acceptor-fst.cc │ │ │ │ │ └── compact64_unweighted_acceptor-fst.cc │ │ │ │ ├── far │ │ │ │ │ ├── sttable.cc │ │ │ │ │ └── stlist.cc │ │ │ │ └── const │ │ │ │ │ ├── const8-fst.cc │ │ │ │ │ ├── const16-fst.cc │ │ │ │ │ └── const64-fst.cc │ │ │ │ └── include │ │ │ │ └── fst │ │ │ │ ├── config.h.in │ │ │ │ └── config.h │ │ ├── openfst-1.6.9-win │ │ │ ├── Makefile.am │ │ │ ├── src │ │ │ │ ├── Makefile.am │ │ │ │ ├── include │ │ │ │ │ └── fst │ │ │ │ │ │ ├── config.h │ │ │ │ │ │ └── config.h.in │ │ │ │ ├── bin │ │ │ │ │ ├── fstconcat.cc │ │ │ │ │ ├── fstinvert.cc │ │ │ │ │ ├── fstunion.cc │ │ │ │ │ ├── fstconnect.cc │ │ │ │ │ ├── fsttopsort.cc │ │ │ │ │ ├── fstsynchronize.cc │ │ │ │ │ ├── fstconvert.cc │ │ │ │ │ ├── fstproject.cc │ │ │ │ │ ├── fstreverse.cc │ │ │ │ │ ├── fstepsnormalize.cc │ │ │ │ │ ├── fstreweight.cc │ │ │ │ │ ├── fstequal.cc │ │ │ │ │ ├── fstclosure.cc │ │ │ │ │ ├── fstisomorphic.cc │ │ │ │ │ ├── fstarcsort.cc │ │ │ │ │ ├── fstminimize.cc │ │ │ │ │ ├── fstcompose.cc │ │ │ │ │ ├── fstintersect.cc │ │ │ │ │ ├── fstprune.cc │ │ │ │ │ ├── fstdifference.cc │ │ │ │ │ └── fstencode.cc │ │ │ │ ├── extensions │ │ │ │ │ ├── special │ │ │ │ │ │ └── fstspecial.cc │ │ │ │ │ ├── python │ │ │ │ │ │ ├── memory.pxd │ │ │ │ │ │ └── basictypes.pxd │ │ │ │ │ ├── linear │ │ │ │ │ │ ├── linear-tagger-fst.cc │ │ │ │ │ │ └── linear-classifier-fst.cc │ │ │ │ │ ├── ngram │ │ │ │ │ │ ├── ngram-fst.cc │ │ │ │ │ │ └── Makefile.am │ │ │ │ │ ├── compact │ │ │ │ │ │ ├── compact8_string-fst.cc │ │ │ │ │ │ ├── compact16_string-fst.cc │ │ │ │ │ │ ├── compact64_string-fst.cc │ │ │ │ │ │ ├── compact8_acceptor-fst.cc │ │ │ │ │ │ ├── compact16_acceptor-fst.cc │ │ │ │ │ │ ├── compact64_acceptor-fst.cc │ │ │ │ │ │ ├── compact8_unweighted-fst.cc │ │ │ │ │ │ ├── compact16_unweighted-fst.cc │ │ │ │ │ │ ├── compact64_unweighted-fst.cc │ │ │ │ │ │ ├── compact8_weighted_string-fst.cc │ │ │ │ │ │ ├── compact64_weighted_string-fst.cc │ │ │ │ │ │ ├── compact16_weighted_string-fst.cc │ │ │ │ │ │ ├── compact8_unweighted_acceptor-fst.cc │ │ │ │ │ │ ├── compact16_unweighted_acceptor-fst.cc │ │ │ │ │ │ └── compact64_unweighted_acceptor-fst.cc │ │ │ │ │ ├── far │ │ │ │ │ │ ├── sttable.cc │ │ │ │ │ │ └── stlist.cc │ │ │ │ │ └── const │ │ │ │ │ │ ├── const8-fst.cc │ │ │ │ │ │ ├── const16-fst.cc │ │ │ │ │ │ └── const64-fst.cc │ │ │ │ ├── lib │ │ │ │ │ ├── Makefile.am │ │ │ │ │ └── CMakeLists.txt │ │ │ │ └── CMakeLists.txt │ │ │ ├── .gitignore │ │ │ └── README.mozilla │ │ ├── object_pool │ │ │ └── README.mozilla │ │ └── ThreadPool │ │ │ └── README.md │ ├── COPYING │ ├── setup.cfg │ └── output.h ├── swift │ ├── .gitignore │ ├── deepspeech_ios_test │ │ ├── Assets.xcassets │ │ │ └── Contents.json │ │ └── Preview Content │ │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── deepspeech_ios.xcodeproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── deepspeech_ios_test.xcodeproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── deepspeech_ios.xcworkspace │ │ ├── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ │ └── contents.xcworkspacedata │ └── deepspeech_ios │ │ ├── deepspeech_ios.modulemap │ │ └── deepspeech_ios.h ├── javascript │ ├── node-pre-gyp.d.ts │ └── README.md ├── python │ ├── README.rst │ └── setup.cfg ├── workspace_status.h ├── multistrap_armbian64_buster.conf ├── multistrap_raspbian_buster.conf ├── deepspeech_errors.cc └── Android.mk ├── taskcluster ├── tc-true.sh ├── tc-decision_reqs.txt ├── docs-build.sh ├── pyenv-package.sh ├── gradle-package.sh ├── android_cache-package.sh ├── android-apk-build.sh ├── tf_tc-pip.sh ├── docs-package.sh ├── node-build.sh ├── node-gyp-package.sh ├── docker-image-build.yml ├── docker-image-train.yml ├── node-package.sh ├── README.rst ├── decoder-package.sh ├── decoder-build.sh ├── android-package.sh ├── tc-cppwin-ds-tests.sh ├── kenlm_tc-package.sh ├── tc-cpp-bytes-ds-tests.sh ├── tc-cpp-ds-tests.sh ├── examples-nodejs_wav-node10.yml ├── examples-nodejs_wav-node12.yml ├── examples-vad_transcriber-py35.yml ├── examples-vad_transcriber-py36.yml ├── examples-vad_transcriber-py37.yml ├── examples-vad_transcriber-py38.yml ├── examples-vad_transcriber-py39.yml ├── pyenv-win-amd64.yml ├── kenlm_multistrap_arm64_buster.conf ├── test-cpp-linux-amd64-prod_pbmodel-opt.yml ├── test-cpp_tflite-linux-amd64-prod-opt.yml ├── android_cache-build.sh ├── pyenv-darwin-amd64.yml ├── tc-cpp_tflite_basic-ds-tests.sh ├── kenlm_multistrap_rpi3_buster.conf ├── ios-build.sh ├── test-python_38_8k-linux-amd64-prod_pbmodel-opt.yml ├── test-python_39_8k-linux-amd64-prod_pbmodel-opt.yml ├── test-transfer-linux-amd64-py36m-opt.yml ├── test-python_35_16k-linux-amd64-prod_pbmodel-opt.yml ├── test-python_35_8k-linux-amd64-prod_pbmodel-opt.yml ├── test-python_36_8k-linux-amd64-prod_pbmodel-opt.yml ├── test-python_37_16k-linux-amd64-prod_pbmodel-opt.yml ├── test-python_37_8k-linux-amd64-prod_pbmodel-opt.yml ├── test-python_38_16k-linux-amd64-prod_pbmodel-opt.yml ├── test-python_39_16k-linux-amd64-prod_pbmodel-opt.yml ├── rpi3-build-dbg.sh ├── test-python_36_16k-linux-amd64-prod_pbmodel-opt.yml ├── test-python_38_tflite_8k-linux-amd64-prod-opt.yml ├── test-python_39_tflite_8k-linux-amd64-prod-opt.yml ├── tc-train-unittests.sh ├── test-cpp_16k-win-amd64-opt.yml ├── test-python_35_tflite_16k-linux-amd64-prod-opt.yml ├── test-python_35_tflite_8k-linux-amd64-prod-opt.yml ├── test-python_36_tflite_8k-linux-amd64-prod-opt.yml ├── test-python_37_tflite_16k-linux-amd64-prod-opt.yml ├── test-python_37_tflite_8k-linux-amd64-prod-opt.yml ├── test-python_38_tflite_16k-linux-amd64-prod-opt.yml ├── test-python_39_tflite_16k-linux-amd64-prod-opt.yml ├── arm64-build-dbg.sh ├── test-cpp_16k-win-cuda-opt.yml ├── test-python_36_tflite_16k-linux-amd64-prod-opt.yml ├── tc-valgrind-cpp.sh ├── examples-ffmpeg_vad_streaming-node10.yml ├── examples-ffmpeg_vad_streaming-node12.yml ├── homebrew_tests-darwin-amd64.yml ├── test-generate_scorer-darwin-amd64-opt.yml ├── test-generate_scorer-linux-amd64-opt.yml ├── homebrew_builds-darwin-amd64.yml ├── tc-cpp-ds-tests-prod.sh ├── test-cpp_16k_tflite-win-amd64-opt.yml ├── test-netframework-win-amd64-opt.yml ├── examples-mic_vad_streaming-py36.yml ├── examples-mic_vad_streaming-py37.yml ├── examples-mic_vad_streaming-py38.yml ├── test-netframework-win-cuda-opt.yml ├── test-singleshotinference-linux-amd64-py36m-opt.yml ├── worker.cyml ├── scriptworker-task-jcenter.yml ├── test-cpp_16k-raspbian-rpi3-opt.yml ├── test-netframework-win-tflite-opt.yml ├── examples-electronjs.yml ├── kenlm_win-amd64-cpu-opt.yml.DISABLED ├── test-cpp_8k-linux-amd64-opt.yml ├── gradle-cache.yml ├── test-cpp_16k-armbian-arm64-opt.yml ├── test-cpp_16k-darwin-amd64-opt.yml ├── test-cpp_16k-linux-amd64-opt.yml ├── examples-mic_vad_streaming-py39.yml.DISABLED_UNTIL_SCIPY_PY39 ├── scriptworker-task-readthedocs.yml ├── test-python_35-darwin-amd64-opt.yml ├── test-python_37-darwin-amd64-opt.yml ├── test-python_38-darwin-amd64-opt.yml ├── test-python_39-darwin-amd64-opt.yml ├── test-cpp_8k_tflite-linux-amd64-opt.yml ├── test-python_36-darwin-amd64-opt.yml ├── tf_ios-arm64-opt.yml ├── kenlm_darwin-amd64-cpu-opt.yml ├── test-cpp_16k_tflite-darwin-amd64-opt.yml ├── test-cpp_16k_tflite-linux-amd64-opt.yml ├── test-python_38_8k-linux-amd64-opt.yml ├── test-python_39_8k-linux-amd64-opt.yml ├── tf_darwin-amd64-opt.yml ├── tf_ios-x86_64-opt.yml ├── test-python_35-win-amd64-opt.yml ├── test-python_35_8k-linux-amd64-opt.yml ├── test-python_36-win-amd64-opt.yml ├── test-python_36_8k-linux-amd64-opt.yml ├── test-python_37-win-amd64-opt.yml ├── test-python_37_8k-linux-amd64-opt.yml ├── test-python_38-win-amd64-opt.yml ├── test-python_39-win-amd64-opt.yml ├── host-build-dbg.sh ├── swig-darwin-amd64.yml ├── test-python_35_16k-linux-amd64-opt.yml ├── test-python_36_16k-linux-amd64-opt.yml ├── test-python_37_16k-linux-amd64-opt.yml ├── test-python_38-win-cuda-opt.yml ├── test-python_38_16k-linux-amd64-opt.yml ├── test-python_39-win-cuda-opt.yml ├── test-python_39_16k-linux-amd64-opt.yml ├── test-python_35-win-cuda-opt.yml ├── test-python_36-win-cuda-opt.yml ├── test-python_37-win-cuda-opt.yml ├── test-training_8k-linux-amd64-py37m-opt.yml ├── node-package-gpu.yml ├── tc-android-ds-tests.sh └── tc-update-index.sh ├── GRAPH_VERSION ├── requirements_tests.txt ├── .cardboardlint.yml ├── .isort.cfg ├── images ├── usage.gif ├── LSTM3-chain.png ├── Parallelism.png └── rnn_fig-624x598.png ├── doc ├── audioTranscript.png ├── Contributed-Examples.rst ├── Error-Codes.rst ├── Structs.rst ├── Python-API.rst └── Flags.rst ├── .gitattributes ├── ds_generic.supp ├── examples └── README.rst ├── requirements_eval_tflite.txt ├── Makefile ├── ds_lib.supp ├── .gitmodules ├── ci_scripts ├── docs-requirements.txt ├── python-tests.sh ├── cppwin-tests.sh ├── cpp-tests.sh ├── node-tests.sh ├── cpp-bytes-tests.sh ├── armv7-build.sh ├── aarch64-build.sh ├── python_tflite-tests.sh ├── cpp_tflite_basic-tests.sh ├── cppwin_tflite-tests.sh └── cpp-tests-prod.sh ├── DeepSpeech.py ├── evaluate.py ├── bin ├── ops_in_graph.py ├── README.rst └── graphdef_binary_to_text.py ├── RELEASE.rst └── .readthedocs.yml /data/ted/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tensorflow_tflite_runtime.supp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/workflows/.git-keep-empty-folder: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | training/deepspeech_training/VERSION -------------------------------------------------------------------------------- /requirements_transcribe.txt: -------------------------------------------------------------------------------- 1 | webrtcvad 2 | -------------------------------------------------------------------------------- /training/deepspeech_training/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /native_client/dotnet/nupkg/build/.gitpreserve: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /native_client/dotnet/nupkg/tools/.gitpreserve: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /native_client/java/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /taskcluster/tc-true.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | true 3 | -------------------------------------------------------------------------------- /tests/test_data/alphabet_macos.txt: -------------------------------------------------------------------------------- 1 | a b c 2 | -------------------------------------------------------------------------------- /training/deepspeech_training/GRAPH_VERSION: -------------------------------------------------------------------------------- 1 | 6 2 | -------------------------------------------------------------------------------- /training/deepspeech_training/util/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /native_client/dotnet/nupkg/lib/net45/.gitpreserve: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /native_client/dotnet/nupkg/lib/net46/.gitpreserve: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /native_client/dotnet/nupkg/lib/net47/.gitpreserve: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/test_data/alphabet_unix.txt: -------------------------------------------------------------------------------- 1 | a 2 | b 3 | c 4 | -------------------------------------------------------------------------------- /GRAPH_VERSION: -------------------------------------------------------------------------------- 1 | training/deepspeech_training/GRAPH_VERSION -------------------------------------------------------------------------------- /native_client/java/libdeepspeech/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /requirements_tests.txt: -------------------------------------------------------------------------------- 1 | absl-py 2 | argparse 3 | semver 4 | -------------------------------------------------------------------------------- /training/deepspeech_training/VERSION: -------------------------------------------------------------------------------- 1 | 0.10.0-alpha.3 2 | -------------------------------------------------------------------------------- /tests/test_data/alphabet_windows.txt: -------------------------------------------------------------------------------- 1 | a 2 | b 3 | c 4 | 5 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/interpolate/merge_test/test3: -------------------------------------------------------------------------------- 1 | isisecd -------------------------------------------------------------------------------- /native_client/kenlm/lm/interpolate/merge_test/test_no_unk: -------------------------------------------------------------------------------- 1 | toto 2 | -------------------------------------------------------------------------------- /native_client/java/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':libdeepspeech' 2 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/common/test_data/toy0.vocab: -------------------------------------------------------------------------------- 1 | ab -------------------------------------------------------------------------------- /native_client/kenlm/lm/common/test_data/toy1.vocab: -------------------------------------------------------------------------------- 1 | acb -------------------------------------------------------------------------------- /native_client/kenlm/GIT_REVISION: -------------------------------------------------------------------------------- 1 | b9f35777d112ce2fc10bd3986302517a16dc3883 2 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/interpolate/merge_test/test1: -------------------------------------------------------------------------------- 1 | athiscutisfirst -------------------------------------------------------------------------------- /native_client/kenlm/lm/interpolate/merge_test/test_bad_order: -------------------------------------------------------------------------------- 1 | secdis -------------------------------------------------------------------------------- /native_client/java/libdeepspeech/libs/.gitignore: -------------------------------------------------------------------------------- 1 | arm64-v8a/ 2 | armeabi-v7a/ 3 | -------------------------------------------------------------------------------- /.cardboardlint.yml: -------------------------------------------------------------------------------- 1 | linters: 2 | - pylint: 3 | filefilter: ['+ *.py', '+ bin/*.py'] 4 | -------------------------------------------------------------------------------- /data/smoke_test/LDC93S1.txt: -------------------------------------------------------------------------------- 1 | 0 46797 She had your dark suit in greasy wash water all year. 2 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/interpolate/merge_test/test2: -------------------------------------------------------------------------------- 1 | is thisthis afirst cuta first -------------------------------------------------------------------------------- /tests/test_data/validate_locale_fra.py: -------------------------------------------------------------------------------- 1 | def validate_label(label): 2 | return label 3 | -------------------------------------------------------------------------------- /.isort.cfg: -------------------------------------------------------------------------------- 1 | [settings] 2 | line_length=80 3 | multi_line_output=3 4 | default_section=FIRSTPARTY -------------------------------------------------------------------------------- /images/usage.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/images/usage.gif -------------------------------------------------------------------------------- /native_client/java/libdeepspeech/gradle.properties: -------------------------------------------------------------------------------- 1 | ABI_FILTERS = arm64-v8a;armeabi-v7a;x86_64 2 | -------------------------------------------------------------------------------- /images/LSTM3-chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/images/LSTM3-chain.png -------------------------------------------------------------------------------- /images/Parallelism.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/images/Parallelism.png -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src 2 | ACLOCAL_AMFLAGS = -I m4 3 | -------------------------------------------------------------------------------- /doc/audioTranscript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/doc/audioTranscript.png -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src 2 | ACLOCAL_AMFLAGS = -I m4 3 | -------------------------------------------------------------------------------- /native_client/swift/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | build/ 3 | xcuserdata/ 4 | /deepspeech_ios/libdeepspeech.dylib 5 | -------------------------------------------------------------------------------- /taskcluster/tc-decision_reqs.txt: -------------------------------------------------------------------------------- 1 | json-e == 2.3.1 2 | networkx 3 | pyaml 4 | requests 5 | slugid == 1.0.7 6 | -------------------------------------------------------------------------------- /data/smoke_test/LDC93S1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/data/smoke_test/LDC93S1.wav -------------------------------------------------------------------------------- /images/rnn_fig-624x598.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/images/rnn_fig-624x598.png -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = include lib script bin test extensions 2 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = include lib script bin test extensions 2 | -------------------------------------------------------------------------------- /data/smoke_test/pruned_lm.scorer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/data/smoke_test/pruned_lm.scorer -------------------------------------------------------------------------------- /native_client/kenlm/clean_query_only.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rm -rf {lm,util,util/double-conversion}/*.o bin/{query,build_binary} 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | data/lm/kenlm.scorer filter=lfs diff=lfs merge=lfs -text 2 | .github/actions/check_artifact_exists/dist/index.js binary -------------------------------------------------------------------------------- /native_client/javascript/node-pre-gyp.d.ts: -------------------------------------------------------------------------------- 1 | declare module "node-pre-gyp" { 2 | export function find(path: String): any; 3 | } 4 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/common/test_data/toy0.kenlm_intermediate: -------------------------------------------------------------------------------- 1 | KenLM intermediate binary file 2 | Counts 5 7 7 3 | Payload pb 4 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/common/test_data/toy1.kenlm_intermediate: -------------------------------------------------------------------------------- 1 | KenLM intermediate binary file 2 | Counts 6 7 6 3 | Payload pb 4 | -------------------------------------------------------------------------------- /data/smoke_test/russian_sample_data/ru.csv: -------------------------------------------------------------------------------- 1 | wav_filename,wav_filesize,transcript 2 | ru.wav,0,бедняга ребят на его месте должен был быть я -------------------------------------------------------------------------------- /data/smoke_test/pruned_lm.bytes.scorer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/data/smoke_test/pruned_lm.bytes.scorer -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | DeepSpeech 3 | 4 | -------------------------------------------------------------------------------- /data/smoke_test/russian_sample_data/ru.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/data/smoke_test/russian_sample_data/ru.wav -------------------------------------------------------------------------------- /data/smoke_test/LDC93S1_pcms16le_1_16000.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/data/smoke_test/LDC93S1_pcms16le_1_16000.wav -------------------------------------------------------------------------------- /data/smoke_test/LDC93S1_pcms16le_1_8000.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/data/smoke_test/LDC93S1_pcms16le_1_8000.wav -------------------------------------------------------------------------------- /data/smoke_test/LDC93S1_pcms16le_2_44100.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/data/smoke_test/LDC93S1_pcms16le_2_44100.wav -------------------------------------------------------------------------------- /native_client/java/libdeepspeech/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | libdeepspeech 3 | 4 | -------------------------------------------------------------------------------- /data/smoke_test/new-home-in-the-stars-16k.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/data/smoke_test/new-home-in-the-stars-16k.wav -------------------------------------------------------------------------------- /native_client/javascript/README.md: -------------------------------------------------------------------------------- 1 | Full project description and documentation on [https://deepspeech.readthedocs.io/](https://deepspeech.readthedocs.io/). 2 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/common/test_data/toy0.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/kenlm/lm/common/test_data/toy0.1 -------------------------------------------------------------------------------- /native_client/kenlm/lm/common/test_data/toy0.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/kenlm/lm/common/test_data/toy0.2 -------------------------------------------------------------------------------- /native_client/kenlm/lm/common/test_data/toy0.3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/kenlm/lm/common/test_data/toy0.3 -------------------------------------------------------------------------------- /native_client/kenlm/lm/common/test_data/toy1.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/kenlm/lm/common/test_data/toy1.1 -------------------------------------------------------------------------------- /native_client/kenlm/lm/common/test_data/toy1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/kenlm/lm/common/test_data/toy1.2 -------------------------------------------------------------------------------- /native_client/kenlm/lm/common/test_data/toy1.3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/kenlm/lm/common/test_data/toy1.3 -------------------------------------------------------------------------------- /native_client/python/README.rst: -------------------------------------------------------------------------------- 1 | Full project description and documentation on `https://deepspeech.readthedocs.io/ `_ 2 | -------------------------------------------------------------------------------- /native_client/swift/deepspeech_ios_test/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /taskcluster/docs-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | THIS=$(dirname "$0") 6 | 7 | pushd ${THIS}/../ 8 | make -C doc/ dist 9 | popd 10 | -------------------------------------------------------------------------------- /ds_generic.supp: -------------------------------------------------------------------------------- 1 | { 2 | libgomp_malloc 3 | Memcheck:Leak 4 | match-leak-kinds: reachable 5 | fun:malloc 6 | obj:/usr/lib/*/libgomp.so.1.0.0 7 | } 8 | -------------------------------------------------------------------------------- /native_client/java/README.md: -------------------------------------------------------------------------------- 1 | Full project description and documentation on GitHub: [https://github.com/mozilla/DeepSpeech](https://github.com/mozilla/DeepSpeech). 2 | -------------------------------------------------------------------------------- /native_client/java/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/java/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /native_client/dotnet/DeepSpeechConsole/arctic_a0024.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/dotnet/DeepSpeechConsole/arctic_a0024.wav -------------------------------------------------------------------------------- /examples/README.rst: -------------------------------------------------------------------------------- 1 | Examples 2 | ======== 3 | 4 | DeepSpeech examples were moved to a separate repository. 5 | 6 | New location: https://github.com/mozilla/DeepSpeech-examples 7 | -------------------------------------------------------------------------------- /native_client/swift/deepspeech_ios_test/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /native_client/java/libdeepspeech/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /requirements_eval_tflite.txt: -------------------------------------------------------------------------------- 1 | absl-py==0.9.0 2 | attrdict==2.0.1 3 | deepspeech 4 | numpy==1.16.0 5 | progressbar2==3.47.0 6 | python-utils==2.3.0 7 | six==1.13.0 8 | pandas==0.25.3 9 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/include/fst/config.h: -------------------------------------------------------------------------------- 1 | // Windows-specific OpenFst config file 2 | // No dynamic registration. 3 | #define FST_NO_DYNAMIC_LINKING 1 4 | -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/java/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/java/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/java/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /taskcluster/pyenv-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | cd ${PYENV_ROOT}/ && $TAR -czf $TASKCLUSTER_ARTIFACTS/pyenv.tar.gz . 8 | -------------------------------------------------------------------------------- /native_client/dotnet/DeepSpeechConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/java/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/java/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.github/actions/package/action.yml: -------------------------------------------------------------------------------- 1 | name: "Package lib" 2 | description: "Package of lib" 3 | runs: 4 | using: "composite" 5 | steps: 6 | - run: ./ci_scripts/package.sh 7 | shell: bash 8 | -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/java/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/java/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/java/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/java/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arihant-jain-09/DeepSpeech/master/native_client/java/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /taskcluster/gradle-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | cd ${GRADLE_USER_HOME}/../ && tar -czf $TASKCLUSTER_ARTIFACTS/gradle.tar.gz gradle-cache/ 8 | -------------------------------------------------------------------------------- /taskcluster/android_cache-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | cd $HOME/ && tar -czf $TASKCLUSTER_ARTIFACTS/android_cache.tar.gz DeepSpeech/Android/ 8 | -------------------------------------------------------------------------------- /.github/actions/setup-tensorflow/action.yml: -------------------------------------------------------------------------------- 1 | name: "Setup TensorFlow" 2 | description: "Setup TensorFlow Build" 3 | runs: 4 | using: "composite" 5 | steps: 6 | - run: ./ci_scripts/tf-setup.sh 7 | shell: bash 8 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/wrappers/README: -------------------------------------------------------------------------------- 1 | This directory is for wrappers around other people's LMs, presenting an interface similar to KenLM's. You will need to have their LM installed. 2 | 3 | NPLM is a work in progress. 4 | -------------------------------------------------------------------------------- /.github/actions/package-tensorflow/action.yml: -------------------------------------------------------------------------------- 1 | name: "Package TensorFlow" 2 | description: "Package TensorFlow Build" 3 | runs: 4 | using: "composite" 5 | steps: 6 | - run: ./ci_scripts/tf-package.sh 7 | shell: bash 8 | -------------------------------------------------------------------------------- /taskcluster/android-apk-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | arm_flavor=$1 6 | 7 | source $(dirname "$0")/tc-tests-utils.sh 8 | 9 | source $(dirname "$0")/tf_tc-vars.sh 10 | 11 | do_deepspeech_java_apk_build 12 | -------------------------------------------------------------------------------- /taskcluster/tf_tc-pip.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | # Taken from https://www.tensorflow.org/install/source 6 | # Only future is needed for our builds, as we don't build the Python package 7 | pip install -U --user future==0.17.1 8 | -------------------------------------------------------------------------------- /native_client/dotnet/DeepSpeechWPF/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /taskcluster/docs-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | mkdir -p ${TASKCLUSTER_ARTIFACTS} || true 8 | 9 | cp ${DS_DSDIR}/doc/html.zip ${TASKCLUSTER_ARTIFACTS}/doc-html.zip 10 | -------------------------------------------------------------------------------- /taskcluster/node-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | package_option=$1 6 | 7 | source $(dirname "$0")/tc-tests-utils.sh 8 | 9 | source $(dirname "$0")/tf_tc-vars.sh 10 | 11 | do_deepspeech_npm_package "${package_option}" 12 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/object_pool/README.mozilla: -------------------------------------------------------------------------------- 1 | This code was imported from https://github.com/godefv/memory on September 17th 2020, commit 5ff1af8ee09ced04990b4863b2c02a8d07f4356a. It's licensed under "CC0 1.0 Universal" license. 2 | -------------------------------------------------------------------------------- /native_client/dotnet/DeepSpeechConsole/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /native_client/java/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches/build_file_checksums.ser 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | .DS_Store 9 | /build 10 | /captures 11 | .externalNativeBuild 12 | -------------------------------------------------------------------------------- /native_client/kenlm/util/spaces.hh: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_SPACES_H 2 | #define UTIL_SPACES_H 3 | 4 | // bool array of spaces. 5 | 6 | namespace util { 7 | 8 | extern const bool kSpaces[256]; 9 | 10 | } // namespace util 11 | 12 | #endif // UTIL_SPACES_H 13 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | DEEPSPEECH_REPO ?= https://github.com/mozilla/DeepSpeech.git 2 | DEEPSPEECH_SHA ?= master 3 | 4 | Dockerfile%: Dockerfile%.tmpl 5 | sed \ 6 | -e "s|#DEEPSPEECH_REPO#|$(DEEPSPEECH_REPO)|g" \ 7 | -e "s|#DEEPSPEECH_SHA#|$(DEEPSPEECH_SHA)|g" \ 8 | < $< > $@ 9 | -------------------------------------------------------------------------------- /ds_lib.supp: -------------------------------------------------------------------------------- 1 | { 2 | deepspeech_tflite_error_reporter 3 | Memcheck:Leak 4 | match-leak-kinds: reachable 5 | fun:_Znwm 6 | fun:_ZN6tflite20DefaultErrorReporterEv 7 | fun:_ZN16TFLiteModelState4initEPKc 8 | fun:DS_CreateModel 9 | fun:main 10 | } 11 | -------------------------------------------------------------------------------- /native_client/swift/deepspeech_ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /taskcluster/node-gyp-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | mkdir -p ${TASKCLUSTER_ARTIFACTS} || true 8 | 9 | cd $DS_ROOT_TASK/node-gyp-cache/ && tar -czf ${TASKCLUSTER_ARTIFACTS}/node-gyp-cache.tar.gz . 10 | -------------------------------------------------------------------------------- /native_client/dotnet/DeepSpeechWPF/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /native_client/java/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /data/smoke_test/russian_sample_data/alphabet.ru: -------------------------------------------------------------------------------- 1 | 2 | о 3 | е 4 | а 5 | и 6 | н 7 | т 8 | с 9 | л 10 | в 11 | р 12 | к 13 | м 14 | д 15 | п 16 | ы 17 | у 18 | б 19 | я 20 | ь 21 | г 22 | з 23 | ч 24 | й 25 | ж 26 | х 27 | ш 28 | ю 29 | ц 30 | э 31 | щ 32 | ф 33 | ё 34 | ъ 35 | -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #008577 4 | #00574B 5 | #D81B60 6 | 7 | -------------------------------------------------------------------------------- /native_client/swift/deepspeech_ios_test.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /native_client/workspace_status.h: -------------------------------------------------------------------------------- 1 | #ifndef WORKSPACE_STATUS_H 2 | #define WORKSPACE_STATUS_H 3 | 4 | const char *tf_local_git_version(); 5 | const char *ds_version(); 6 | const char *ds_git_version(); 7 | const int ds_graph_version(); 8 | 9 | #endif // WORKSPACE_STATUS_H 10 | -------------------------------------------------------------------------------- /doc/Contributed-Examples.rst: -------------------------------------------------------------------------------- 1 | User contributed examples 2 | ========================= 3 | 4 | There are also several user contributed examples available on a separate examples repository: `https://github.com/mozilla/DeepSpeech-examples `_. 5 | -------------------------------------------------------------------------------- /taskcluster/docker-image-build.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: docker-build-base.tyml 3 | dockerfile: "Dockerfile.build" 4 | workerType: "${docker.tfBuild}" 5 | metadata: 6 | name: "DeepSpeech Docker build" 7 | description: "Testing |docker build| of DeepSpeech build image" 8 | -------------------------------------------------------------------------------- /taskcluster/docker-image-train.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: docker-build-base.tyml 3 | dockerfile: "Dockerfile.train" 4 | workerType: "${docker.tfBuild}" 5 | metadata: 6 | name: "DeepSpeech Docker train" 7 | description: "Testing |docker build| of DeepSpeech train image" 8 | -------------------------------------------------------------------------------- /native_client/kenlm/MANIFEST.in: -------------------------------------------------------------------------------- 1 | # file GENERATED by distutils, do NOT edit 2 | include setup.py 3 | include lm/*.cc 4 | include lm/*.hh 5 | include python/*.cpp 6 | include util/*.cc 7 | include util/*.hh 8 | include util/double-conversion/*.cc 9 | include util/double-conversion/*.h 10 | -------------------------------------------------------------------------------- /taskcluster/node-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | mkdir -p ${TASKCLUSTER_ARTIFACTS} || true 8 | 9 | # NodeJS package 10 | cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/javascript/deepspeech-*.tgz ${TASKCLUSTER_ARTIFACTS}/ 11 | -------------------------------------------------------------------------------- /taskcluster/README.rst: -------------------------------------------------------------------------------- 1 | 2 | Taskcluster 3 | =========== 4 | 5 | This directory contains files associated with Taskcluster -- a task execution framework for Mozilla's Continuous Integration system. 6 | 7 | Please consult the `existing Taskcluster documentation `_. 8 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstunion.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | int fstunion_main(int argc, char **argv); 5 | 6 | int main(int argc, char **argv) { return fstunion_main(argc, argv); } 7 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstconcat.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | int fstconcat_main(int argc, char **argv); 5 | 6 | int main(int argc, char **argv) { return fstconcat_main(argc, argv); } 7 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstconnect.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | int fstconnect_main(int argc, char **argv); 5 | 6 | int main(int argc, char **argv) { return fstconnect_main(argc, argv); } 7 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstinvert.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | int fstinvert_main(int argc, char **argv); 5 | 6 | int main(int argc, char **argv) { return fstinvert_main(argc, argv); } 7 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fsttopsort.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | int fsttopsort_main(int argc, char **argv); 5 | 6 | int main(int argc, char **argv) { return fsttopsort_main(argc, argv); } 7 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconcat.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | int fstconcat_main(int argc, char **argv); 5 | 6 | int main(int argc, char **argv) { return fstconcat_main(argc, argv); } 7 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstinvert.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | int fstinvert_main(int argc, char **argv); 5 | 6 | int main(int argc, char **argv) { return fstinvert_main(argc, argv); } 7 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstunion.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | int fstunion_main(int argc, char **argv); 5 | 6 | int main(int argc, char **argv) { return fstunion_main(argc, argv); } 7 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconnect.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | int fstconnect_main(int argc, char **argv); 5 | 6 | int main(int argc, char **argv) { return fstconnect_main(argc, argv); } 7 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fsttopsort.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | int fsttopsort_main(int argc, char **argv); 5 | 6 | int main(int argc, char **argv) { return fsttopsort_main(argc, argv); } 7 | -------------------------------------------------------------------------------- /taskcluster/decoder-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | mkdir -p ${TASKCLUSTER_ARTIFACTS} || true 8 | 9 | if [ -d ${DS_ROOT_TASK}/DeepSpeech/ds/wheels ]; then 10 | cp ${DS_ROOT_TASK}/DeepSpeech/ds/wheels/* ${TASKCLUSTER_ARTIFACTS}/ 11 | fi; 12 | 13 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstsynchronize.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | int fstsynchronize_main(int argc, char **argv); 5 | 6 | int main(int argc, char **argv) { return fstsynchronize_main(argc, argv); } 7 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstsynchronize.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | int fstsynchronize_main(int argc, char **argv); 5 | 6 | int main(int argc, char **argv) { return fstsynchronize_main(argc, argv); } 7 | -------------------------------------------------------------------------------- /native_client/python/setup.cfg: -------------------------------------------------------------------------------- 1 | [build_ext] 2 | include-dirs=./ 3 | build-lib=temp_build 4 | build-temp=temp_build 5 | 6 | [build_py] 7 | build-lib=temp_build 8 | 9 | [bdist_wheel] 10 | bdist-dir=temp_build 11 | 12 | [install_lib] 13 | build-dir=temp_build 14 | 15 | [metadata] 16 | description-file = ../README.rst 17 | -------------------------------------------------------------------------------- /.github/actions/build-tensorflow/action.yml: -------------------------------------------------------------------------------- 1 | name: "Build TensorFlow" 2 | description: "Build TensorFlow Build" 3 | inputs: 4 | flavor: 5 | description: "Build flavor" 6 | required: true 7 | runs: 8 | using: "composite" 9 | steps: 10 | - run: ./ci_scripts/tf-build.sh ${{ inputs.flavor }} 11 | shell: bash 12 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/common/test_data/generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ../../../bin/lmplz --discount_fallback -o 3 -S 100M --intermediate toy0 --arpa toy0.arpa < 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /native_client/swift/deepspeech_ios/deepspeech_ios.modulemap: -------------------------------------------------------------------------------- 1 | framework module deepspeech_ios { 2 | umbrella header "deepspeech_ios.h" 3 | 4 | export * 5 | module * { export * } 6 | 7 | explicit module libdeepspeech_Private { 8 | header "deepspeech.h" 9 | export * 10 | link "deepspeech" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /taskcluster/decoder-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | source $(dirname "$0")/tf_tc-vars.sh 8 | 9 | if [ "${OS}" = "${TC_MSYS_VERSION}" ]; then 10 | export SYSTEM_TARGET=host-win 11 | else 12 | export SYSTEM_TARGET=host 13 | fi; 14 | 15 | do_deepspeech_decoder_build 16 | -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /native_client/swift/deepspeech_ios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /native_client/kenlm/util/have.hh: -------------------------------------------------------------------------------- 1 | /* Optional packages. You might want to integrate this with your build system e.g. config.h from ./configure. */ 2 | #ifndef UTIL_HAVE_H 3 | #define UTIL_HAVE_H 4 | 5 | #ifdef HAVE_CONFIG_H 6 | #include "config.h" 7 | #endif 8 | 9 | #ifndef HAVE_ICU 10 | //#define HAVE_ICU 11 | #endif 12 | 13 | #endif // UTIL_HAVE_H 14 | -------------------------------------------------------------------------------- /native_client/swift/deepspeech_ios.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /taskcluster/android-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | arm_flavor=$1 6 | 7 | source $(dirname "$0")/tc-tests-utils.sh 8 | 9 | mkdir -p ${TASKCLUSTER_ARTIFACTS} || true 10 | 11 | cp ${DS_ROOT_TASK}/DeepSpeech/ds/tensorflow/bazel*.log ${TASKCLUSTER_ARTIFACTS}/ 12 | 13 | package_native_client_ndk "native_client.tar.xz" "${arm_flavor}" 14 | -------------------------------------------------------------------------------- /.github/actions/select-xcode/action.yml: -------------------------------------------------------------------------------- 1 | name: "Select XCode version" 2 | description: "Select XCode version" 3 | inputs: 4 | version: 5 | description: "XCode version" 6 | required: true 7 | runs: 8 | using: "composite" 9 | steps: 10 | - run: sudo xcode-select --switch /Applications/Xcode_${{ inputs.version }}.app 11 | shell: bash 12 | -------------------------------------------------------------------------------- /native_client/swift/deepspeech_ios.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ci_scripts/docs-requirements.txt: -------------------------------------------------------------------------------- 1 | breathe==4.14.2 2 | semver==2.8.1 3 | sphinx==2.4.4 4 | #FIXME: switch back to upstream sphinx-js when https://github.com/mozilla/sphinx-js/pull/135 is merged or the issue is fixed otherwise 5 | git+git://github.com/reuben/sphinx-js.git@a24775935443d21028ee4a7025a407c78030c4e7#egg=sphinx-js 6 | sphinx-rtd-theme==0.4.3 7 | pygments==2.7.4 8 | -------------------------------------------------------------------------------- /native_client/dotnet/DeepSpeechWPF/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /native_client/swift/deepspeech_ios_test.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/special/fstspecial.cc: -------------------------------------------------------------------------------- 1 | // Work-around to correctly build (e.g. distclean) with autotools 2 | // using files in another directory that are also built there. 3 | // See https://stackoverflow.com/questions/30379837. 4 | 5 | #include "fstconvert-main.cc" // NOLINT 6 | #include "fstconvert.cc" // NOLINT 7 | -------------------------------------------------------------------------------- /.github/actions/check_artifact_exists/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "check_artifact_exists", 3 | "main": "main.js", 4 | "devDependencies": { 5 | "@actions/core": "^1.2.6", 6 | "@actions/github": "^4.0.0", 7 | "@octokit/plugin-throttling": "^3.4.1", 8 | "@vercel/ncc": "^0.27.0", 9 | "adm-zip": "^0.5.2", 10 | "filesize": "^6.1.0" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /native_client/kenlm/.gitignore: -------------------------------------------------------------------------------- 1 | util/file_piece.cc.gz 2 | *.swp 3 | *.o 4 | doc/ 5 | build/ 6 | /bin 7 | /lib 8 | /tests 9 | ._* 10 | windows/Win32 11 | windows/x64 12 | windows/*.user 13 | windows/*.sdf 14 | windows/*.opensdf 15 | windows/*.suo 16 | CMakeFiles 17 | cmake_install.cmake 18 | CMakeCache.txt 19 | CTestTestfile.cmake 20 | DartConfiguration.tcl 21 | Makefile 22 | -------------------------------------------------------------------------------- /taskcluster/tc-cppwin-ds-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | bitrate=$1 8 | set_ldc_sample_filename "${bitrate}" 9 | 10 | download_material "${TASKCLUSTER_TMP_DIR}/ds" 11 | 12 | export PATH=${TASKCLUSTER_TMP_DIR}/ds/:$PATH 13 | 14 | check_versions 15 | 16 | ensure_cuda_usage "$2" 17 | 18 | run_basic_inference_tests 19 | -------------------------------------------------------------------------------- /training/deepspeech_training/util/gpu.py: -------------------------------------------------------------------------------- 1 | from tensorflow.python.client import device_lib 2 | 3 | 4 | def get_available_gpus(config): 5 | r""" 6 | Returns the number of GPUs available on this system. 7 | """ 8 | local_device_protos = device_lib.list_local_devices(session_config=config) 9 | return [x.name for x in local_device_protos if x.device_type == 'GPU'] 10 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/common/size_option.hh: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | 6 | namespace lm { 7 | 8 | // Create a boost program option for data sizes. This parses sizes like 1T and 10k. 9 | boost::program_options::typed_value *SizeOption(std::size_t &to, const char *default_value); 10 | 11 | } // namespace lm 12 | -------------------------------------------------------------------------------- /ci_scripts/python-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/all-vars.sh 6 | source $(dirname "$0")/all-utils.sh 7 | source $(dirname "$0")/asserts.sh 8 | 9 | bitrate=$1 10 | set_ldc_sample_filename "${bitrate}" 11 | 12 | download_data 13 | 14 | export_py_bin_path 15 | 16 | deepspeech --version 17 | 18 | run_all_inference_tests 19 | 20 | run_hotword_tests 21 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/word_index.hh: -------------------------------------------------------------------------------- 1 | // Separate header because this is used often. 2 | #ifndef LM_WORD_INDEX_H 3 | #define LM_WORD_INDEX_H 4 | 5 | #include 6 | 7 | namespace lm { 8 | typedef unsigned int WordIndex; 9 | const WordIndex kMaxWordIndex = UINT_MAX; 10 | const WordIndex kUNK = 0; 11 | } // namespace lm 12 | 13 | typedef lm::WordIndex LMWordIndex; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /doc/Error-Codes.rst: -------------------------------------------------------------------------------- 1 | .. _error-codes: 2 | 3 | Error codes 4 | =========== 5 | 6 | Below is the definition for all error codes used in the API, their numerical values, and a human readable description. 7 | 8 | .. literalinclude:: ../native_client/deepspeech.h 9 | :language: c 10 | :start-after: sphinx-doc: error_code_listing_start 11 | :end-before: sphinx-doc: error_code_listing_end 12 | -------------------------------------------------------------------------------- /native_client/dotnet/nupkg/build/DeepSpeech.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %(FileName)%(Extension) 6 | PreserveNewest 7 | 8 | 9 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstconvert.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_string(fst_type, "vector", "Output FST type"); 7 | 8 | int fstconvert_main(int argc, char **argv); 9 | 10 | int main(int argc, char **argv) { return fstconvert_main(argc, argv); } 11 | -------------------------------------------------------------------------------- /DeepSpeech.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from __future__ import absolute_import, division, print_function 4 | 5 | if __name__ == '__main__': 6 | try: 7 | from deepspeech_training import train as ds_train 8 | except ImportError: 9 | print('Training package is not installed. See training documentation.') 10 | raise 11 | 12 | ds_train.run_script() 13 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstconvert.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_string(fst_type, "vector", "Output FST type"); 7 | 8 | int fstconvert_main(int argc, char **argv); 9 | 10 | int main(int argc, char **argv) { return fstconvert_main(argc, argv); } 11 | -------------------------------------------------------------------------------- /evaluate.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from __future__ import absolute_import, division, print_function 4 | 5 | if __name__ == '__main__': 6 | try: 7 | from deepspeech_training import evaluate as ds_evaluate 8 | except ImportError: 9 | print('Training package is not installed. See training documentation.') 10 | raise 11 | 12 | ds_evaluate.run_script() 13 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstproject.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_bool(project_output, false, "Project on output (vs. input)"); 7 | 8 | int fstproject_main(int argc, char **argv); 9 | 10 | int main(int argc, char **argv) { return fstproject_main(argc, argv); } 11 | -------------------------------------------------------------------------------- /native_client/swift/deepspeech_ios/deepspeech_ios.h: -------------------------------------------------------------------------------- 1 | // 2 | // deepspeech_ios.h 3 | // deepspeech_ios 4 | // 5 | // Created by Reuben Morais on 14.06.20. 6 | // Copyright © 2020 Mozilla. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // In this header, you should import all the public headers of your framework using statements like #import 12 | 13 | 14 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/lib/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(srcdir)/../include $(ICU_CPPFLAGS) 2 | 3 | lib_LTLIBRARIES = libfst.la 4 | libfst_la_SOURCES = compat.cc flags.cc fst.cc fst-types.cc mapped-file.cc \ 5 | properties.cc symbol-table.cc symbol-table-ops.cc \ 6 | weight.cc util.cc 7 | libfst_la_LDFLAGS = -version-info 10:0:0 8 | libfst_la_LIBADD = $(DL_LIBS) 9 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstproject.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_bool(project_output, false, "Project on output (vs. input)"); 7 | 8 | int fstproject_main(int argc, char **argv); 9 | 10 | int main(int argc, char **argv) { return fstproject_main(argc, argv); } 11 | -------------------------------------------------------------------------------- /taskcluster/kenlm_tc-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname $0)/tc-all-vars.sh 6 | 7 | mkdir -p ${TASKCLUSTER_ARTIFACTS} || true 8 | 9 | cd ${DS_ROOT_TASK}/DeepSpeech/ds/kenlm/build/bin/ && \ 10 | tar \ 11 | -czf ${TASKCLUSTER_ARTIFACTS}/kenlm.tar.gz \ 12 | build_binary${PLATFORM_EXE_SUFFIX} \ 13 | filter${PLATFORM_EXE_SUFFIX} \ 14 | lmplz${PLATFORM_EXE_SUFFIX} 15 | -------------------------------------------------------------------------------- /ci_scripts/cppwin-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/all-vars.sh 6 | source $(dirname "$0")/all-utils.sh 7 | source $(dirname "$0")/asserts.sh 8 | 9 | bitrate=$1 10 | set_ldc_sample_filename "${bitrate}" 11 | 12 | download_material "${CI_TMP_DIR}/ds" 13 | 14 | export PATH=${CI_TMP_DIR}/ds/:$PATH 15 | 16 | check_versions 17 | 18 | ensure_cuda_usage "$2" 19 | 20 | run_basic_inference_tests 21 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstreverse.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_bool(require_superinitial, true, "Always create a superinitial state"); 7 | 8 | int fstreverse_main(int argc, char **argv); 9 | 10 | int main(int argc, char **argv) { return fstreverse_main(argc, argv); } 11 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/lib/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(srcdir)/../include $(ICU_CPPFLAGS) 2 | 3 | lib_LTLIBRARIES = libfst.la 4 | libfst_la_SOURCES = compat.cc flags.cc fst.cc fst-types.cc mapped-file.cc \ 5 | properties.cc symbol-table.cc symbol-table-ops.cc \ 6 | weight.cc util.cc 7 | libfst_la_LDFLAGS = -version-info 13:0:0 8 | libfst_la_LIBADD = $(DL_LIBS) 9 | -------------------------------------------------------------------------------- /native_client/ctcdecode/COPYING: -------------------------------------------------------------------------------- 1 | Decoder sources originally imported from https://github.com/parlance/ctcdecode, commit 140b45860cec6671fb0bf6dbb675073241c0f9b0 2 | Decoder sources are under the MIT license (LICENSE.parlance). 3 | 4 | Binding code adapted from https://github.com/PaddlePaddle/DeepSpeech/tree/develop/decoders/swig, commit 3ea19973c66a6a10320888ba47a8857bebf5abfa 5 | Binding code are under the Apache License (LICENSE.paddlepaddle). 6 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstepsnormalize.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_bool(eps_norm_output, false, "Normalize output epsilons"); 7 | 8 | int fstepsnormalize_main(int argc, char **argv); 9 | 10 | int main(int argc, char **argv) { return fstepsnormalize_main(argc, argv); } 11 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstreweight.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_bool(to_final, false, "Push/reweight to final (vs. to initial) states"); 7 | 8 | int fstreweight_main(int argc, char **argv); 9 | 10 | int main(int argc, char **argv) { return fstreweight_main(argc, argv); } 11 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreverse.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_bool(require_superinitial, true, "Always create a superinitial state"); 7 | 8 | int fstreverse_main(int argc, char **argv); 9 | 10 | int main(int argc, char **argv) { return fstreverse_main(argc, argv); } 11 | -------------------------------------------------------------------------------- /native_client/multistrap_armbian64_buster.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | arch=arm64 3 | noauth=false 4 | unpack=true 5 | debootstrap=Debian 6 | aptsources=Debian 7 | cleanup=true 8 | 9 | [Debian] 10 | packages=apt libc6 libc6-dev libstdc++-7-dev linux-libc-dev libffi-dev libpython3.7-dev libsox-dev python3-numpy python3-setuptools 11 | source=http://deb.debian.org/debian 12 | keyring=debian-archive-keyring 13 | components=main 14 | suite=buster 15 | -------------------------------------------------------------------------------- /taskcluster/tc-cpp-bytes-ds-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | bitrate=$1 8 | set_ldc_sample_filename "${bitrate}" 9 | 10 | download_material "${TASKCLUSTER_TMP_DIR}/ds" 11 | 12 | export PATH=${TASKCLUSTER_TMP_DIR}/ds/:$PATH 13 | 14 | # Bytes output mode with LDC93S1 takes too long to converge so we simply test 15 | # that loading the model won't crash 16 | check_versions 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/python/memory.pxd: -------------------------------------------------------------------------------- 1 | # See www.openfst.org for extensive documentation on this weighted 2 | # finite-state transducer library. 3 | 4 | 5 | from libcpp.memory cimport shared_ptr 6 | 7 | 8 | # This is mysteriously missing from libcpp.memory. 9 | 10 | cdef extern from "" namespace "std" nogil: 11 | 12 | shared_ptr[T] static_pointer_cast[T, U](const shared_ptr[U] &) 13 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstepsnormalize.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_bool(eps_norm_output, false, "Normalize output epsilons"); 7 | 8 | int fstepsnormalize_main(int argc, char **argv); 9 | 10 | int main(int argc, char **argv) { return fstepsnormalize_main(argc, argv); } 11 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstreweight.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_bool(to_final, false, "Push/reweight to final (vs. to initial) states"); 7 | 8 | int fstreweight_main(int argc, char **argv); 9 | 10 | int main(int argc, char **argv) { return fstreweight_main(argc, argv); } 11 | -------------------------------------------------------------------------------- /native_client/ctcdecode/setup.cfg: -------------------------------------------------------------------------------- 1 | # temp_build is two deep because SWIG does not clean relative paths when 2 | # building, so ../kenlm pollutes the source directory. 3 | 4 | [build_ext] 5 | build-lib=temp_build/temp_build 6 | build-temp=temp_build/temp_build 7 | 8 | [build_py] 9 | build-lib=temp_build/temp_build 10 | 11 | [bdist_wheel] 12 | bdist-dir=temp_build/temp_build 13 | 14 | [install_lib] 15 | build-dir=temp_build/temp_build 16 | 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/ThreadPool/README.md: -------------------------------------------------------------------------------- 1 | ThreadPool 2 | ========== 3 | 4 | A simple C++11 Thread Pool implementation. 5 | 6 | Basic usage: 7 | ```c++ 8 | // create thread pool with 4 worker threads 9 | ThreadPool pool(4); 10 | 11 | // enqueue and store future 12 | auto result = pool.enqueue([](int answer) { return answer; }, 42); 13 | 14 | // get result from future 15 | std::cout << result.get() << std::endl; 16 | 17 | ``` 18 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstequal.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta"); 8 | 9 | int fstequal_main(int argc, char **argv); 10 | 11 | int main(int argc, char **argv) { return fstequal_main(argc, argv); } 12 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/python/memory.pxd: -------------------------------------------------------------------------------- 1 | # See www.openfst.org for extensive documentation on this weighted 2 | # finite-state transducer library. 3 | 4 | 5 | from libcpp.memory cimport shared_ptr 6 | 7 | 8 | # This is mysteriously missing from libcpp.memory. 9 | 10 | cdef extern from "" namespace "std" nogil: 11 | 12 | shared_ptr[T] static_pointer_cast[T, U](const shared_ptr[U] &) 13 | -------------------------------------------------------------------------------- /native_client/dotnet/DeepSpeechClient/Models/Metadata.cs: -------------------------------------------------------------------------------- 1 | namespace DeepSpeechClient.Models 2 | { 3 | /// 4 | /// Stores the entire CTC output as an array of character metadata objects. 5 | /// 6 | public class Metadata 7 | { 8 | /// 9 | /// List of candidate transcripts. 10 | /// 11 | public CandidateTranscript[] Transcripts { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /taskcluster/tc-cpp-ds-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | bitrate=$1 8 | set_ldc_sample_filename "${bitrate}" 9 | 10 | download_material "${TASKCLUSTER_TMP_DIR}/ds" 11 | 12 | export PATH=${TASKCLUSTER_TMP_DIR}/ds/:$PATH 13 | 14 | check_versions 15 | 16 | run_all_inference_tests 17 | 18 | run_multi_inference_tests 19 | 20 | run_cpp_only_inference_tests 21 | 22 | run_hotword_tests 23 | -------------------------------------------------------------------------------- /bin/ops_in_graph.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import sys 5 | 6 | import tensorflow.compat.v1 as tfv1 7 | 8 | 9 | def main(): 10 | with tfv1.gfile.FastGFile(sys.argv[1], "rb") as fin: 11 | graph_def = tfv1.GraphDef() 12 | graph_def.ParseFromString(fin.read()) 13 | 14 | print("\n".join(sorted(set(n.op for n in graph_def.node)))) 15 | 16 | 17 | if __name__ == "__main__": 18 | main() 19 | -------------------------------------------------------------------------------- /native_client/ctcdecode/output.h: -------------------------------------------------------------------------------- 1 | #ifndef OUTPUT_H_ 2 | #define OUTPUT_H_ 3 | 4 | #include 5 | 6 | /* Struct for the beam search output, containing the tokens based on the vocabulary indices, and the timesteps 7 | * for each token in the beam search output 8 | */ 9 | struct Output { 10 | double confidence; 11 | std::vector tokens; 12 | std::vector timesteps; 13 | }; 14 | 15 | #endif // OUTPUT_H_ 16 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/include/fst/config.h.in: -------------------------------------------------------------------------------- 1 | // OpenFst config file 2 | 3 | /* Define to 1 if you have the ICU library. */ 4 | #undef HAVE_ICU 5 | 6 | /* Define to 1 if the system has the type `std::tr1::hash'. */ 8 | #define HAVE_STD__TR1__HASH_LONG_LONG_UNSIGNED_ 1 9 | 10 | /* Define to 1 if the system has the type `__gnu_cxx::slist'. */ 11 | #define HAVE___GNU_CXX__SLIST_INT_ 1 12 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstequal.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta"); 8 | 9 | int fstequal_main(int argc, char **argv); 10 | 11 | int main(int argc, char **argv) { return fstequal_main(argc, argv); } 12 | -------------------------------------------------------------------------------- /doc/Structs.rst: -------------------------------------------------------------------------------- 1 | Data structures 2 | =============== 3 | 4 | Metadata 5 | -------- 6 | 7 | .. doxygenstruct:: Metadata 8 | :project: deepspeech-c 9 | :members: 10 | 11 | CandidateTranscript 12 | ------------------- 13 | 14 | .. doxygenstruct:: CandidateTranscript 15 | :project: deepspeech-c 16 | :members: 17 | 18 | TokenMetadata 19 | ------------- 20 | 21 | .. doxygenstruct:: TokenMetadata 22 | :project: deepspeech-c 23 | :members: 24 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstclosure.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_bool(closure_plus, false, 7 | "Do not add the empty path (T+ instead of T*)?"); 8 | 9 | int fstclosure_main(int argc, char **argv); 10 | 11 | int main(int argc, char **argv) { return fstclosure_main(argc, argv); } 12 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstclosure.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_bool(closure_plus, false, 7 | "Do not add the empty path (T+ instead of T*)?"); 8 | 9 | int fstclosure_main(int argc, char **argv); 10 | 11 | int main(int argc, char **argv) { return fstclosure_main(argc, argv); } 12 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/include/fst/config.h.in: -------------------------------------------------------------------------------- 1 | // OpenFst config file 2 | 3 | /* Define to 1 if you have the ICU library. */ 4 | #undef HAVE_ICU 5 | 6 | /* Define to 1 if the system has the type `std::tr1::hash'. */ 8 | #define HAVE_STD__TR1__HASH_LONG_LONG_UNSIGNED_ 1 9 | 10 | /* Define to 1 if the system has the type `__gnu_cxx::slist'. */ 11 | #define HAVE___GNU_CXX__SLIST_INT_ 1 12 | -------------------------------------------------------------------------------- /native_client/multistrap_raspbian_buster.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | arch=armhf 3 | noauth=false 4 | unpack=true 5 | debootstrap=Raspbian 6 | aptsources=Raspbian 7 | cleanup=true 8 | 9 | [Raspbian] 10 | packages=apt libc6 libc6-dev libffi-dev libstdc++-6-dev linux-libc-dev libpython3.7-dev libsox-dev python3-numpy python3-setuptools 11 | source=http://raspbian.raspberrypi.org/raspbian/ 12 | keyring=raspbian-archive-keyring 13 | components=main 14 | suite=buster 15 | -------------------------------------------------------------------------------- /taskcluster/examples-nodejs_wav-node10.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "node:10" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | args: 7 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/nodejs_wav/test.sh" 8 | workerType: "${docker.dsTests}" 9 | metadata: 10 | name: "DeepSpeech examples: NodeJS WAV NodeJS v10.x" 11 | description: "DeepSpeech examples: NodeJS WAV NodeJS v10.x" 12 | -------------------------------------------------------------------------------- /taskcluster/examples-nodejs_wav-node12.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "node:12" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | args: 7 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/nodejs_wav/test.sh" 8 | workerType: "${docker.dsTests}" 9 | metadata: 10 | name: "DeepSpeech examples: NodeJS WAV NodeJS v12.x" 11 | description: "DeepSpeech examples: NodeJS WAV NodeJS v12.x" 12 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstisomorphic.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta"); 8 | 9 | int fstisomorphic_main(int argc, char **argv); 10 | 11 | int main(int argc, char **argv) { return fstisomorphic_main(argc, argv); } 12 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/linear/linear-tagger-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | using fst::LinearTaggerFst; 8 | using fst::StdArc; 9 | using fst::LogArc; 10 | 11 | REGISTER_FST(LinearTaggerFst, StdArc); 12 | REGISTER_FST(LinearTaggerFst, LogArc); 13 | -------------------------------------------------------------------------------- /native_client/java/libdeepspeech/src/main/java/org/deepspeech/libdeepspeech/DeepSpeechStreamingState.java: -------------------------------------------------------------------------------- 1 | package org.deepspeech.libdeepspeech; 2 | 3 | public final class DeepSpeechStreamingState { 4 | private SWIGTYPE_p_StreamingState _sp; 5 | 6 | public DeepSpeechStreamingState(SWIGTYPE_p_StreamingState sp) { 7 | this._sp = sp; 8 | } 9 | 10 | public SWIGTYPE_p_StreamingState get() { 11 | return this._sp; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/interpolate/universal_vocab.cc: -------------------------------------------------------------------------------- 1 | #include "lm/interpolate/universal_vocab.hh" 2 | 3 | namespace lm { 4 | namespace interpolate { 5 | 6 | UniversalVocab::UniversalVocab(const std::vector& model_vocab_sizes) { 7 | model_index_map_.resize(model_vocab_sizes.size()); 8 | for (size_t i = 0; i < model_vocab_sizes.size(); ++i) { 9 | model_index_map_[i].resize(model_vocab_sizes[i]); 10 | } 11 | } 12 | 13 | }} // namespaces 14 | -------------------------------------------------------------------------------- /.github/actions/host-build/action.yml: -------------------------------------------------------------------------------- 1 | name: "Run build lib" 2 | description: "Run build of lib" 3 | inputs: 4 | arch: 5 | description: "Target arch for loading script (host/armv7/aarch64)" 6 | required: false 7 | default: "host" 8 | flavor: 9 | description: "Build flavor" 10 | required: true 11 | runs: 12 | using: "composite" 13 | steps: 14 | - run: ./ci_scripts/${{ inputs.arch }}-build.sh ${{ inputs.flavor }} 15 | shell: bash 16 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore extensionless files 2 | !*.* 3 | !*/ 4 | 5 | # Other patterns 6 | /config.h 7 | /config.log 8 | /config.status 9 | .deps/ 10 | .libs/ 11 | .dirstamp 12 | *.la 13 | *.lo 14 | *.o 15 | 16 | # Windows-specific files 17 | .vs/ 18 | *.VC.db 19 | Win32/ 20 | x64/ 21 | Debug/ 22 | Release/ 23 | obj/ 24 | /bin/ 25 | *.binlog 26 | *proj.user 27 | /cmake 28 | /cmake64 29 | /CMakeSettings.json 30 | /*.zip -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstisomorphic.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta"); 8 | 9 | int fstisomorphic_main(int argc, char **argv); 10 | 11 | int main(int argc, char **argv) { return fstisomorphic_main(argc, argv); } 12 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/linear/linear-tagger-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | using fst::LinearTaggerFst; 8 | using fst::StdArc; 9 | using fst::LogArc; 10 | 11 | REGISTER_FST(LinearTaggerFst, StdArc); 12 | REGISTER_FST(LinearTaggerFst, LogArc); 13 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/README.mozilla: -------------------------------------------------------------------------------- 1 | openfst-1.6.9-win source downloaded from https://github.com/kkm000/openfst on 2018/12/10 2 | 3 | This corresponds to https://github.com/kkm000/openfst/commit/d4dd88e17393454e252d4644b39cf496a8cd9cac 4 | 5 | The following procedure was needed to compile with BAZEL 0.17.2: 6 | 7 | Used VS CODE to rename the following types: 8 | uint64 -> uint64_t 9 | uint32 -> uint32_t 10 | uint16 -> uint16_t -------------------------------------------------------------------------------- /ci_scripts/cpp-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/all-vars.sh 6 | source $(dirname "$0")/all-utils.sh 7 | source $(dirname "$0")/asserts.sh 8 | 9 | bitrate=$1 10 | set_ldc_sample_filename "${bitrate}" 11 | 12 | download_data 13 | 14 | export PATH=${CI_TMP_DIR}/ds/:$PATH 15 | 16 | check_versions 17 | 18 | run_all_inference_tests 19 | 20 | run_multi_inference_tests 21 | 22 | run_cpp_only_inference_tests 23 | 24 | run_hotword_tests 25 | -------------------------------------------------------------------------------- /ci_scripts/node-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/all-vars.sh 6 | source $(dirname "$0")/all-utils.sh 7 | source $(dirname "$0")/asserts.sh 8 | 9 | bitrate=$1 10 | set_ldc_sample_filename "${bitrate}" 11 | 12 | download_data 13 | 14 | node --version 15 | npm --version 16 | 17 | export_node_bin_path 18 | 19 | check_runtime_nodejs 20 | 21 | run_all_inference_tests 22 | 23 | run_js_streaming_inference_tests 24 | 25 | run_hotword_tests 26 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/linear/linear-classifier-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | using fst::LinearClassifierFst; 8 | using fst::StdArc; 9 | using fst::LogArc; 10 | 11 | REGISTER_FST(LinearClassifierFst, StdArc); 12 | REGISTER_FST(LinearClassifierFst, LogArc); 13 | -------------------------------------------------------------------------------- /native_client/java/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/sizes.hh: -------------------------------------------------------------------------------- 1 | #ifndef LM_SIZES_H 2 | #define LM_SIZES_H 3 | 4 | #include 5 | 6 | #include 7 | 8 | namespace lm { namespace ngram { 9 | 10 | struct Config; 11 | 12 | void ShowSizes(const std::vector &counts, const lm::ngram::Config &config); 13 | void ShowSizes(const std::vector &counts); 14 | void ShowSizes(const char *file, const lm::ngram::Config &config); 15 | 16 | }} // namespaces 17 | #endif // LM_SIZES_H 18 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/linear/linear-classifier-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | using fst::LinearClassifierFst; 8 | using fst::StdArc; 9 | using fst::LogArc; 10 | 11 | REGISTER_FST(LinearClassifierFst, StdArc); 12 | REGISTER_FST(LinearClassifierFst, LogArc); 13 | -------------------------------------------------------------------------------- /ci_scripts/cpp-bytes-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/all-vars.sh 6 | source $(dirname "$0")/all-utils.sh 7 | source $(dirname "$0")/asserts.sh 8 | 9 | bitrate=$1 10 | set_ldc_sample_filename "${bitrate}" 11 | 12 | download_material "${CI_TMP_DIR}/ds" 13 | 14 | export PATH=${CI_TMP_DIR}/ds/:$PATH 15 | 16 | # Bytes output mode with LDC93S1 takes too long to converge so we simply test 17 | # that loading the model won't crash 18 | check_versions 19 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/weights.hh: -------------------------------------------------------------------------------- 1 | #ifndef LM_WEIGHTS_H 2 | #define LM_WEIGHTS_H 3 | 4 | // Weights for n-grams. Probability and possibly a backoff. 5 | 6 | namespace lm { 7 | struct Prob { 8 | float prob; 9 | }; 10 | // No inheritance so this will be a POD. 11 | struct ProbBackoff { 12 | float prob; 13 | float backoff; 14 | }; 15 | struct RestWeights { 16 | float prob; 17 | float backoff; 18 | float rest; 19 | }; 20 | 21 | } // namespace lm 22 | #endif // LM_WEIGHTS_H 23 | -------------------------------------------------------------------------------- /native_client/kenlm/util/pcqueue_test.cc: -------------------------------------------------------------------------------- 1 | #include "util/pcqueue.hh" 2 | 3 | #define BOOST_TEST_MODULE PCQueueTest 4 | #include 5 | 6 | namespace util { 7 | namespace { 8 | 9 | BOOST_AUTO_TEST_CASE(SingleThread) { 10 | PCQueue queue(10); 11 | for (int i = 0; i < 10; ++i) { 12 | queue.Produce(i); 13 | } 14 | for (int i = 0; i < 10; ++i) { 15 | BOOST_CHECK_EQUAL(i, queue.Consume()); 16 | } 17 | } 18 | 19 | } 20 | } // namespace util 21 | -------------------------------------------------------------------------------- /taskcluster/examples-vad_transcriber-py35.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "python:3.5" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | args: 7 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/vad_transcriber/test.sh 3.5.0:m" 8 | workerType: "${docker.dsTests}" 9 | metadata: 10 | name: "DeepSpeech examples: VAD transcriber Py3.5" 11 | description: "DeepSpeech examples: VAD transcriber streaming Python 3.5" 12 | -------------------------------------------------------------------------------- /taskcluster/examples-vad_transcriber-py36.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "python:3.6" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | args: 7 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/vad_transcriber/test.sh 3.6.0:m" 8 | workerType: "${docker.dsTests}" 9 | metadata: 10 | name: "DeepSpeech examples: VAD transcriber Py3.6" 11 | description: "DeepSpeech examples: VAD transcriber streaming Python 3.6" 12 | -------------------------------------------------------------------------------- /taskcluster/examples-vad_transcriber-py37.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "python:3.7" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | args: 7 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/vad_transcriber/test.sh 3.7.0:m" 8 | workerType: "${docker.dsTests}" 9 | metadata: 10 | name: "DeepSpeech examples: VAD transcriber Py3.7" 11 | description: "DeepSpeech examples: VAD transcriber streaming Python 3.7" 12 | -------------------------------------------------------------------------------- /taskcluster/examples-vad_transcriber-py38.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "python:3.8" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | args: 7 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/vad_transcriber/test.sh 3.8.0:" 8 | workerType: "${docker.dsTests}" 9 | metadata: 10 | name: "DeepSpeech examples: VAD transcriber Py3.8" 11 | description: "DeepSpeech examples: VAD transcriber streaming Python 3.8" 12 | -------------------------------------------------------------------------------- /taskcluster/examples-vad_transcriber-py39.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "python:3.9" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | args: 7 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/vad_transcriber/test.sh 3.9.0:" 8 | workerType: "${docker.dsTests}" 9 | metadata: 10 | name: "DeepSpeech examples: VAD transcriber Py3.9" 11 | description: "DeepSpeech examples: VAD transcriber streaming Python 3.9" 12 | -------------------------------------------------------------------------------- /taskcluster/pyenv-win-amd64.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: generic_tc_caching-win-opt-base.tyml 3 | cache: 4 | artifact_url: "${system.pyenv.win.url}" 5 | artifact_namespace: "${system.pyenv.win.namespace}" 6 | scripts: 7 | setup: "taskcluster/tc-true.sh" 8 | build: "taskcluster/pyenv-build.sh" 9 | package: "taskcluster/pyenv-package.sh" 10 | metadata: 11 | name: "Builds Pyenv Windows AMD64" 12 | description: "Setup a builds Pyenv for Windows/AMD64" 13 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstarcsort.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | DEFINE_string(sort_type, "ilabel", 8 | "Comparison method, one of: \"ilabel\", \"olabel\""); 9 | 10 | int fstarcsort_main(int argc, char **argv); 11 | 12 | int main(int argc, char **argv) { return fstarcsort_main(argc, argv); } 13 | -------------------------------------------------------------------------------- /taskcluster/kenlm_multistrap_arm64_buster.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | arch=arm64 3 | noauth=true 4 | unpack=true 5 | debootstrap=Debian 6 | aptsources=Debian 7 | cleanup=true 8 | 9 | [Debian] 10 | packages=libc6 libc6-dev libstdc++-7-dev linux-libc-dev libboost-dev zlib1g-dev libbz2-dev liblzma-dev libboost-program-options-dev libboost-system-dev libboost-thread-dev libboost-test-dev 11 | source=http://deb.debian.org/debian 12 | keyring=debian-archive-keyring 13 | components=main 14 | suite=buster 15 | -------------------------------------------------------------------------------- /taskcluster/test-cpp-linux-amd64-prod_pbmodel-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-cpp-ds-tests-prod.sh 16k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 CPU C++ prod tests" 10 | description: "Testing DeepSpeech C++ for Linux/AMD64 on prod model, CPU only, optimized version" 11 | -------------------------------------------------------------------------------- /RELEASE.rst: -------------------------------------------------------------------------------- 1 | 2 | Making a (new) release of the codebase 3 | ====================================== 4 | 5 | 6 | * Update version in VERSION file, commit 7 | * Open PR, ensure all tests are passing properly 8 | * Merge the PR 9 | * Fetch the new master, tag it with (hopefully) the same version as in VERSION 10 | * Push that to Github 11 | * New build should be triggered and new packages should be made 12 | * TaskCluster should schedule a merge build **including** a "DeepSpeech Packages" task 13 | -------------------------------------------------------------------------------- /data/alphabet.txt: -------------------------------------------------------------------------------- 1 | # Each line in this file represents the Unicode codepoint (UTF-8 encoded) 2 | # associated with a numeric label. 3 | # A line that starts with # is a comment. You can escape it with \# if you wish 4 | # to use '#' as a label. 5 | 6 | a 7 | b 8 | c 9 | d 10 | e 11 | f 12 | g 13 | h 14 | i 15 | j 16 | k 17 | l 18 | m 19 | n 20 | o 21 | p 22 | q 23 | r 24 | s 25 | t 26 | u 27 | v 28 | w 29 | x 30 | y 31 | z 32 | ' 33 | # The last (non-comment) line needs to end with a newline. 34 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/ngram/ngram-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | #include 7 | 8 | #include 9 | #include 10 | 11 | using fst::NGramFst; 12 | using fst::StdArc; 13 | using fst::LogArc; 14 | 15 | REGISTER_FST(NGramFst, StdArc); 16 | REGISTER_FST(NGramFst, LogArc); 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstarcsort.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | DEFINE_string(sort_type, "ilabel", 8 | "Comparison method, one of: \"ilabel\", \"olabel\""); 9 | 10 | int fstarcsort_main(int argc, char **argv); 11 | 12 | int main(int argc, char **argv) { return fstarcsort_main(argc, argv); } 13 | -------------------------------------------------------------------------------- /taskcluster/test-cpp_tflite-linux-amd64-prod-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-tflite-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-cpp_tflite-tests-prod.sh 16k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 TFLite C++ prod tests" 10 | description: "Testing DeepSpeech C++ for Linux/AMD64 on prod model, TFLite, optimized version" 11 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/ngram/ngram-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | #include 7 | 8 | #include 9 | #include 10 | 11 | using fst::NGramFst; 12 | using fst::StdArc; 13 | using fst::LogArc; 14 | 15 | REGISTER_FST(NGramFst, StdArc); 16 | REGISTER_FST(NGramFst, LogArc); 17 | -------------------------------------------------------------------------------- /native_client/deepspeech_errors.cc: -------------------------------------------------------------------------------- 1 | #include "deepspeech.h" 2 | #include 3 | 4 | char* 5 | DS_ErrorCodeToErrorMessage(int aErrorCode) 6 | { 7 | #define RETURN_MESSAGE(NAME, VALUE, DESC) \ 8 | case NAME: \ 9 | return strdup(DESC); 10 | 11 | switch(aErrorCode) 12 | { 13 | DS_FOR_EACH_ERROR(RETURN_MESSAGE) 14 | default: 15 | return strdup("Unknown error, please make sure you are using the correct native binary."); 16 | } 17 | 18 | #undef RETURN_MESSAGE 19 | } 20 | -------------------------------------------------------------------------------- /native_client/java/app/src/test/java/org/deepspeech/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package org.deepspeech; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /native_client/kenlm/lm/virtual_interface.cc: -------------------------------------------------------------------------------- 1 | #include "lm/virtual_interface.hh" 2 | 3 | #include "lm/lm_exception.hh" 4 | 5 | namespace lm { 6 | namespace base { 7 | 8 | Vocabulary::~Vocabulary() {} 9 | 10 | void Vocabulary::SetSpecial(WordIndex begin_sentence, WordIndex end_sentence, WordIndex not_found) { 11 | begin_sentence_ = begin_sentence; 12 | end_sentence_ = end_sentence; 13 | not_found_ = not_found; 14 | } 15 | 16 | Model::~Model() {} 17 | 18 | } // namespace base 19 | } // namespace lm 20 | -------------------------------------------------------------------------------- /taskcluster/android_cache-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | arm_flavor=$1 8 | api_level=$2 9 | api_kind=$3 10 | 11 | export ANDROID_HOME=${ANDROID_SDK_HOME} 12 | 13 | android_install_ndk 14 | 15 | android_install_sdk 16 | 17 | # Required for running APK tests later 18 | android_install_sdk_platform "android-27" 19 | 20 | if [ "${arm_flavor}" != "sdk" ]; then 21 | android_setup_emulator "${arm_flavor}" "${api_level}" "${api_kind}" 22 | fi; 23 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | # Build documentation in the docs/ directory with Sphinx 9 | sphinx: 10 | builder: html 11 | configuration: doc/conf.py 12 | 13 | # Optionally set the version of Python and requirements required to build your docs 14 | python: 15 | version: 3.7 16 | install: 17 | - requirements: ci_scripts/docs-requirements.txt 18 | -------------------------------------------------------------------------------- /native_client/java/libdeepspeech/src/main/java/org/deepspeech/libdeepspeech_doc/README.rst: -------------------------------------------------------------------------------- 1 | 2 | Javadoc for Sphinx 3 | ================== 4 | 5 | This code is only here for reference for documentation generation. 6 | 7 | To update, please install SWIG (4.0 at least) and then run from native_client/java: 8 | 9 | .. code-block:: 10 | 11 | swig -c++ -java -doxygen -package org.deepspeech.libdeepspeech -outdir libdeepspeech/src/main/java/org/deepspeech/libdeepspeech_doc -o jni/deepspeech_wrap.cpp jni/deepspeech.i 12 | -------------------------------------------------------------------------------- /taskcluster/pyenv-darwin-amd64.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: generic_tc_caching-darwin-opt-base.tyml 3 | cache: 4 | artifact_url: ${system.pyenv.osx.url} 5 | artifact_namespace: ${system.pyenv.osx.namespace} 6 | workerType: ${macOS.dsBuild} 7 | scripts: 8 | setup: "taskcluster/tc-true.sh" 9 | build: "taskcluster/pyenv-build.sh" 10 | package: "taskcluster/pyenv-package.sh" 11 | metadata: 12 | name: "Builds Pyenv macOS AMD64" 13 | description: "Setup a builds Pyenv for macOS/AMD64" 14 | -------------------------------------------------------------------------------- /taskcluster/tc-cpp_tflite_basic-ds-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | bitrate=$1 8 | set_ldc_sample_filename "${bitrate}" 9 | 10 | model_source=${DEEPSPEECH_TEST_MODEL//.pb/.tflite} 11 | model_name=$(basename "${model_source}") 12 | export DATA_TMP_DIR=${TASKCLUSTER_TMP_DIR} 13 | 14 | download_material "${TASKCLUSTER_TMP_DIR}/ds" 15 | 16 | export PATH=${TASKCLUSTER_TMP_DIR}/ds/:$PATH 17 | 18 | check_versions 19 | 20 | run_tflite_basic_inference_tests 21 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/common/renumber.cc: -------------------------------------------------------------------------------- 1 | #include "lm/common/renumber.hh" 2 | #include "lm/common/ngram.hh" 3 | 4 | #include "util/stream/stream.hh" 5 | 6 | namespace lm { 7 | 8 | void Renumber::Run(const util::stream::ChainPosition &position) { 9 | for (util::stream::Stream stream(position); stream; ++stream) { 10 | NGramHeader gram(stream.Get(), order_); 11 | for (WordIndex *w = gram.begin(); w != gram.end(); ++w) { 12 | *w = new_numbers_[*w]; 13 | } 14 | } 15 | } 16 | 17 | } // namespace lm 18 | -------------------------------------------------------------------------------- /taskcluster/kenlm_multistrap_rpi3_buster.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | arch=armhf 3 | noauth=true 4 | unpack=true 5 | debootstrap=Raspbian 6 | aptsources=Raspbian 7 | cleanup=true 8 | 9 | [Raspbian] 10 | packages=libc6 libc6-dev libffi-dev libstdc++-6-dev linux-libc-dev libboost-dev zlib1g-dev libbz2-dev liblzma-dev libboost-program-options-dev libboost-system-dev libboost-thread-dev libboost-test-dev 11 | source=http://raspbian.raspberrypi.org/raspbian/ 12 | keyring=raspbian-archive-keyring 13 | components=main 14 | suite=buster 15 | -------------------------------------------------------------------------------- /.github/actions/win-install-sox/action.yml: -------------------------------------------------------------------------------- 1 | name: "Install SoX and add to PATH" 2 | description: "Install SoX and add to PATH" 3 | runs: 4 | using: "composite" 5 | steps: 6 | - run: | 7 | set -ex 8 | wget https://sourceforge.net/projects/sox/files/sox/14.4.2/sox-14.4.2-win32.zip/download -O sox-14.4.2-win32.zip 9 | "C:/Program Files/7-Zip/7z.exe" x -o`pwd`/bin/ -tzip -aoa sox-14.4.2-win32.zip 10 | rm sox-*zip 11 | echo "`pwd`/bin/sox-14.4.2/" >> $GITHUB_PATH 12 | shell: bash 13 | -------------------------------------------------------------------------------- /native_client/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_MODULE := deepspeech-prebuilt 5 | LOCAL_SRC_FILES := $(TFDIR)/bazel-bin/native_client/libdeepspeech.so 6 | include $(PREBUILT_SHARED_LIBRARY) 7 | 8 | include $(CLEAR_VARS) 9 | LOCAL_CPP_EXTENSION := .cc .cxx .cpp 10 | LOCAL_MODULE := deepspeech 11 | LOCAL_SRC_FILES := client.cc 12 | LOCAL_SHARED_LIBRARIES := deepspeech-prebuilt 13 | LOCAL_LDFLAGS := -Wl,--no-as-needed 14 | include $(BUILD_EXECUTABLE) 15 | -------------------------------------------------------------------------------- /taskcluster/ios-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | arch=$1 6 | 7 | source $(dirname "$0")/tc-tests-utils.sh 8 | 9 | source $(dirname "$0")/tf_tc-vars.sh 10 | 11 | BAZEL_TARGETS=" 12 | //native_client:deepspeech_ios 13 | " 14 | 15 | if [ "${arch}" = "--arm64" ]; then 16 | BAZEL_BUILD_FLAGS="${BAZEL_IOS_ARM64_FLAGS}" 17 | else 18 | BAZEL_BUILD_FLAGS="${BAZEL_IOS_X86_64_FLAGS}" 19 | fi 20 | 21 | BAZEL_ENV_FLAGS="TF_NEED_CUDA=0" 22 | 23 | do_bazel_build 24 | 25 | do_deepspeech_ios_framework_build "${arch}" 26 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/python/basictypes.pxd: -------------------------------------------------------------------------------- 1 | # See www.openfst.org for extensive documentation on this weighted 2 | # finite-state transducer library. 3 | 4 | 5 | from libc.stdint cimport * 6 | 7 | 8 | cdef extern from "" nogil: 9 | 10 | ctypedef int8_t int8 11 | ctypedef int16_t int16 12 | ctypedef int32_t int32 13 | ctypedef int64_t int64 14 | ctypedef uint8_t uint8 15 | ctypedef uint16_t uint16 16 | ctypedef uint32_t uint32 17 | ctypedef uint64_t uint64 18 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/include/fst/config.h: -------------------------------------------------------------------------------- 1 | /* src/include/fst/config.h. Generated from config.h.in by configure. */ 2 | // OpenFst config file 3 | 4 | /* Define to 1 if you have the ICU library. */ 5 | /* #undef HAVE_ICU */ 6 | 7 | /* Define to 1 if the system has the type `std::tr1::hash'. */ 9 | #define HAVE_STD__TR1__HASH_LONG_LONG_UNSIGNED_ 1 10 | 11 | /* Define to 1 if the system has the type `__gnu_cxx::slist'. */ 12 | #define HAVE___GNU_CXX__SLIST_INT_ 1 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_38_8k-linux-amd64-prod_pbmodel-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests-prod.sh 3.8.1: 8k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 CPU Python v3.8 prod tests (8kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.8 on prod model, CPU only, optimized version (8kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_39_8k-linux-amd64-prod_pbmodel-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests-prod.sh 3.9.0: 8k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 CPU Python v3.9 prod tests (8kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.9 on prod model, CPU only, optimized version (8kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-transfer-linux-amd64-py36m-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-ctc-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-transfer-tests.sh 3.6.10:m" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 CPU transfer learning Py3.6" 10 | description: "Training a DeepSpeech LDC93S1 model with transfer learning for Linux/AMD64 16kHz Python 3.6, CPU only, optimized version" 11 | -------------------------------------------------------------------------------- /ci_scripts/armv7-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/all-vars.sh 6 | source $(dirname "$0")/all-utils.sh 7 | source $(dirname "$0")/build-utils.sh 8 | 9 | source $(dirname "$0")/tf-vars.sh 10 | 11 | BAZEL_TARGETS=" 12 | //native_client:libdeepspeech.so 13 | //native_client:generate_scorer_package 14 | " 15 | 16 | BAZEL_BUILD_FLAGS="${BAZEL_ARM_FLAGS} ${BAZEL_EXTRA_FLAGS}" 17 | BAZEL_ENV_FLAGS="TF_NEED_CUDA=0" 18 | 19 | maybe_install_xldd 20 | 21 | do_bazel_build 22 | 23 | do_deepspeech_binary_build 24 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/python/basictypes.pxd: -------------------------------------------------------------------------------- 1 | # See www.openfst.org for extensive documentation on this weighted 2 | # finite-state transducer library. 3 | 4 | 5 | from libc.stdint cimport * 6 | 7 | 8 | cdef extern from "" nogil: 9 | 10 | ctypedef int8_t int8 11 | ctypedef int16_t int16 12 | ctypedef int32_t int32 13 | ctypedef int64_t int64 14 | ctypedef uint8_t uint8 15 | ctypedef uint16_t uint16 16 | ctypedef uint32_t uint32 17 | ctypedef uint64_t uint64 18 | -------------------------------------------------------------------------------- /taskcluster/test-python_35_16k-linux-amd64-prod_pbmodel-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests-prod.sh 3.5.8:m 16k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 CPU Python v3.5 prod tests (16kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.5 on prod model, CPU only, optimized version (16kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_35_8k-linux-amd64-prod_pbmodel-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests-prod.sh 3.5.8:m 8k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 CPU Python v3.5 prod tests (8kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.5 on prod model, CPU only, optimized version (8kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_36_8k-linux-amd64-prod_pbmodel-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests-prod.sh 3.6.10:m 8k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 CPU Python v3.6 prod tests (8kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.6 on prod model, CPU only, optimized version (8kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_37_16k-linux-amd64-prod_pbmodel-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests-prod.sh 3.7.6:m 16k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 CPU Python v3.7 prod tests (16kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.7 on prod model, CPU only, optimized version (16kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_37_8k-linux-amd64-prod_pbmodel-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests-prod.sh 3.7.6:m 8k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 CPU Python v3.7 prod tests (8kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.7 on prod model, CPU only, optimized version (8kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_38_16k-linux-amd64-prod_pbmodel-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests-prod.sh 3.8.1: 16k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 CPU Python v3.8 prod tests (16kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.8 on prod model, CPU only, optimized version (16kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_39_16k-linux-amd64-prod_pbmodel-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests-prod.sh 3.9.0: 16k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 CPU Python v3.9 prod tests (16kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.9 on prod model, CPU only, optimized version (16kHz)" 11 | -------------------------------------------------------------------------------- /ci_scripts/aarch64-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/all-vars.sh 6 | source $(dirname "$0")/all-utils.sh 7 | source $(dirname "$0")/build-utils.sh 8 | 9 | source $(dirname "$0")/tf-vars.sh 10 | 11 | BAZEL_TARGETS=" 12 | //native_client:libdeepspeech.so 13 | //native_client:generate_scorer_package 14 | " 15 | 16 | BAZEL_BUILD_FLAGS="${BAZEL_ARM64_FLAGS} ${BAZEL_EXTRA_FLAGS}" 17 | BAZEL_ENV_FLAGS="TF_NEED_CUDA=0" 18 | 19 | maybe_install_xldd 20 | 21 | do_bazel_build 22 | 23 | do_deepspeech_binary_build 24 | -------------------------------------------------------------------------------- /doc/Python-API.rst: -------------------------------------------------------------------------------- 1 | Python 2 | ====== 3 | 4 | .. automodule:: native_client.python 5 | 6 | Model 7 | ----- 8 | 9 | .. autoclass:: Model 10 | :members: 11 | 12 | Stream 13 | ------ 14 | 15 | .. autoclass:: Stream 16 | :members: 17 | 18 | Metadata 19 | -------- 20 | 21 | .. autoclass:: Metadata 22 | :members: 23 | 24 | CandidateTranscript 25 | ------------------- 26 | 27 | .. autoclass:: CandidateTranscript 28 | :members: 29 | 30 | TokenMetadata 31 | ------------- 32 | 33 | .. autoclass:: TokenMetadata 34 | :members: 35 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact8_string-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactStringFst_StdArc_uint8_registerer; 11 | static FstRegisterer> 12 | CompactStringFst_LogArc_uint8_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/ngram/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(srcdir)/../../include $(ICU_CPPFLAGS) 2 | 3 | libfstdir = @libfstdir@ 4 | libfst_LTLIBRARIES = ngram-fst.la 5 | 6 | lib_LTLIBRARIES = libfstngram.la 7 | 8 | ngram_fst_la_SOURCES = bitmap-index.cc ngram-fst.cc nthbit.cc 9 | ngram_fst_la_LDFLAGS = -module 10 | 11 | libfstngram_la_SOURCES = bitmap-index.cc ngram-fst.cc nthbit.cc 12 | libfstngram_la_LDFLAGS = -version-info 10:0:0 13 | libfstngram_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) 14 | -------------------------------------------------------------------------------- /taskcluster/rpi3-build-dbg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | source $(dirname "$0")/tf_tc-vars.sh 8 | 9 | BAZEL_TARGETS=" 10 | //native_client:libdeepspeech.so 11 | " 12 | 13 | BAZEL_BUILD_FLAGS="${BAZEL_ARM_FLAGS} ${BAZEL_EXTRA_FLAGS}" 14 | BAZEL_ENV_FLAGS="TF_NEED_CUDA=0" 15 | SYSTEM_TARGET=rpi3 16 | SYSTEM_RASPBIAN=/tmp/multistrap-raspbian-buster 17 | 18 | maybe_install_xldd 19 | 20 | do_bazel_build "dbg" 21 | 22 | export EXTRA_LOCAL_CFLAGS="-ggdb" 23 | do_deepspeech_binary_build 24 | -------------------------------------------------------------------------------- /taskcluster/test-python_36_16k-linux-amd64-prod_pbmodel-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests-prod.sh 3.6.10:m 16k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 CPU Python v3.6 prod tests (16kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.6 on prod model, CPU only, optimized version (16kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_38_tflite_8k-linux-amd64-prod-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-tflite-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python_tflite-tests-prod.sh 3.8.1: 8k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 TFLite Python v3.8 prod tests (8kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.8 on prod model, TFLite, optimized version (8kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_39_tflite_8k-linux-amd64-prod-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-tflite-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python_tflite-tests-prod.sh 3.9.0: 8k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 TFLite Python v3.9 prod tests (8kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.9 on prod model, TFLite, optimized version (8kHz)" 11 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact16_string-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactStringFst_StdArc_uint16_registerer; 11 | static FstRegisterer> 12 | CompactStringFst_LogArc_uint16_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact64_string-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactStringFst_StdArc_uint64_registerer; 11 | static FstRegisterer> 12 | CompactStringFst_LogArc_uint64_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact8_string-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactStringFst_StdArc_uint8_registerer; 11 | static FstRegisterer> 12 | CompactStringFst_LogArc_uint8_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/ngram/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(srcdir)/../../include $(ICU_CPPFLAGS) 2 | 3 | libfstdir = @libfstdir@ 4 | libfst_LTLIBRARIES = ngram-fst.la 5 | 6 | lib_LTLIBRARIES = libfstngram.la 7 | 8 | ngram_fst_la_SOURCES = bitmap-index.cc ngram-fst.cc nthbit.cc 9 | ngram_fst_la_LDFLAGS = -module 10 | 11 | libfstngram_la_SOURCES = bitmap-index.cc ngram-fst.cc nthbit.cc 12 | libfstngram_la_LDFLAGS = -version-info 13:0:0 13 | libfstngram_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) 14 | -------------------------------------------------------------------------------- /native_client/java/libdeepspeech/src/test/java/org/deepspeech/libdeepspeech/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package org.deepspeech.libdeepspeech; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /native_client/kenlm/lm/interpolate/tune_weights.hh: -------------------------------------------------------------------------------- 1 | #ifndef LM_INTERPOLATE_TUNE_WEIGHTS_H 2 | #define LM_INTERPOLATE_TUNE_WEIGHTS_H 3 | 4 | #include "util/string_piece.hh" 5 | 6 | #include 7 | 8 | namespace lm { namespace interpolate { 9 | struct InstancesConfig; 10 | 11 | // Run a tuning loop, producing weights as output. 12 | void TuneWeights(int tune_file, const std::vector &model_names, const InstancesConfig &config, std::vector &weights); 13 | 14 | }} // namespaces 15 | #endif // LM_INTERPOLATE_TUNE_WEIGHTS_H 16 | -------------------------------------------------------------------------------- /taskcluster/tc-train-unittests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | extract_python_versions "$1" "pyver" "pyver_pkg" "py_unicode_type" "pyconf" "pyalias" 8 | 9 | mkdir -p ${TASKCLUSTER_ARTIFACTS} || true 10 | 11 | virtualenv_activate "${pyalias}" "deepspeech" 12 | 13 | set -o pipefail 14 | pip install --upgrade pip==19.3.1 setuptools==45.0.0 wheel==0.33.6 | cat 15 | pushd ${HOME}/DeepSpeech/ds 16 | pip install --upgrade . | cat 17 | python -m unittest 18 | popd 19 | set +o pipefail 20 | -------------------------------------------------------------------------------- /taskcluster/test-cpp_16k-win-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-cppwin-ds-tests.sh 16k" 9 | metadata: 10 | name: "DeepSpeech Windows AMD64 CPU C++ tests (16kHz)" 11 | description: "Testing DeepSpeech C++ for Windows/AMD64, CPU only, optimized version (16kHz)" 12 | -------------------------------------------------------------------------------- /taskcluster/test-python_35_tflite_16k-linux-amd64-prod-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-tflite-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python_tflite-tests-prod.sh 3.5.8:m 16k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 TFLite Python v3.5 prod tests (16kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.5 on prod model, TFLite, optimized version (16kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_35_tflite_8k-linux-amd64-prod-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-tflite-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python_tflite-tests-prod.sh 3.5.8:m 8k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 TFLite Python v3.5 prod tests (8kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.5 on prod model, TFLite, optimized version (8kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_36_tflite_8k-linux-amd64-prod-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-tflite-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python_tflite-tests-prod.sh 3.6.10:m 8k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 TFLite Python v3.6 prod tests (8kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.6 on prod model, TFLite, optimized version (8kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_37_tflite_16k-linux-amd64-prod-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-tflite-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python_tflite-tests-prod.sh 3.7.6:m 16k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 TFLite Python v3.7 prod tests (16kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.7 on prod model, TFLite, optimized version (16kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_37_tflite_8k-linux-amd64-prod-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-tflite-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python_tflite-tests-prod.sh 3.7.6:m 8k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 TFLite Python v3.7 prod tests (8kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.7 on prod model, TFLite, optimized version (8kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_38_tflite_16k-linux-amd64-prod-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-tflite-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python_tflite-tests-prod.sh 3.8.1: 16k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 TFLite Python v3.8 prod tests (16kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.8 on prod model, TFLite, optimized version (16kHz)" 11 | -------------------------------------------------------------------------------- /taskcluster/test-python_39_tflite_16k-linux-amd64-prod-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-tflite-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python_tflite-tests-prod.sh 3.9.0: 16k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 TFLite Python v3.9 prod tests (16kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.9 on prod model, TFLite, optimized version (16kHz)" 11 | -------------------------------------------------------------------------------- /ci_scripts/python_tflite-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/all-vars.sh 6 | source $(dirname "$0")/all-utils.sh 7 | source $(dirname "$0")/asserts.sh 8 | 9 | bitrate=$1 10 | set_ldc_sample_filename "${bitrate}" 11 | 12 | model_source=${DEEPSPEECH_TEST_MODEL//.pb/.tflite} 13 | model_name=$(basename "${model_source}") 14 | model_name_mmap=$(basename "${model_source}") 15 | 16 | download_data 17 | 18 | export_py_bin_path 19 | 20 | deepspeech --version 21 | 22 | run_all_inference_tests 23 | 24 | run_hotword_tests 25 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact8_acceptor-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactAcceptorFst_StdArc_uint8_registerer; 11 | static FstRegisterer> 12 | CompactAcceptorFst_LogArc_uint8_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact16_string-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactStringFst_StdArc_uint16_registerer; 11 | static FstRegisterer> 12 | CompactStringFst_LogArc_uint16_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact64_string-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactStringFst_StdArc_uint64_registerer; 11 | static FstRegisterer> 12 | CompactStringFst_LogArc_uint64_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /taskcluster/arm64-build-dbg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | source $(dirname "$0")/tf_tc-vars.sh 8 | 9 | BAZEL_TARGETS=" 10 | //native_client:libdeepspeech.so 11 | " 12 | 13 | BAZEL_BUILD_FLAGS="${BAZEL_ARM64_FLAGS} ${BAZEL_EXTRA_FLAGS}" 14 | BAZEL_ENV_FLAGS="TF_NEED_CUDA=0" 15 | SYSTEM_TARGET=rpi3-armv8 16 | SYSTEM_RASPBIAN=/tmp/multistrap-armbian64-buster 17 | 18 | maybe_install_xldd 19 | 20 | do_bazel_build "dbg" 21 | 22 | export EXTRA_LOCAL_CFLAGS="-ggdb" 23 | do_deepspeech_binary_build 24 | -------------------------------------------------------------------------------- /taskcluster/test-cpp_16k-win-cuda-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-cuda-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-gpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-cppwin-ds-tests.sh 16k cuda" 9 | metadata: 10 | name: "DeepSpeech Windows AMD64 CUDA C++ tests (16kHz)" 11 | description: "Testing DeepSpeech C++ for Windows/AMD64, CUDA, optimized version (16kHz)" 12 | -------------------------------------------------------------------------------- /taskcluster/test-python_36_tflite_16k-linux-amd64-prod-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-tflite-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python_tflite-tests-prod.sh 3.6.10:m 16k" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 TFLite Python v3.6 prod tests (16kHz)" 10 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.6 on prod model, TFLite, optimized version (16kHz)" 11 | -------------------------------------------------------------------------------- /ci_scripts/cpp_tflite_basic-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/all-vars.sh 6 | source $(dirname "$0")/all-utils.sh 7 | source $(dirname "$0")/asserts.sh 8 | 9 | bitrate=$1 10 | set_ldc_sample_filename "${bitrate}" 11 | 12 | model_source=${DEEPSPEECH_TEST_MODEL//.pb/.tflite} 13 | model_name=$(basename "${model_source}") 14 | export DATA_TMP_DIR=${CI_TMP_DIR} 15 | 16 | download_material "${CI_TMP_DIR}/ds" 17 | 18 | export PATH=${CI_TMP_DIR}/ds/:$PATH 19 | 20 | check_versions 21 | 22 | run_tflite_basic_inference_tests 23 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact16_acceptor-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactAcceptorFst_StdArc_uint16_registerer; 11 | static FstRegisterer> 12 | CompactAcceptorFst_LogArc_uint16_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact8_acceptor-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactAcceptorFst_StdArc_uint8_registerer; 11 | static FstRegisterer> 12 | CompactAcceptorFst_LogArc_uint8_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /taskcluster/tc-valgrind-cpp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | kind=$1 6 | 7 | source $(dirname "$0")/tc-tests-utils.sh 8 | 9 | set_ldc_sample_filename "16k" 10 | 11 | download_material "${TASKCLUSTER_TMP_DIR}/ds" 12 | 13 | mkdir -p ${TASKCLUSTER_ARTIFACTS} || true 14 | 15 | export PATH=${TASKCLUSTER_TMP_DIR}/ds/:$PATH 16 | 17 | if [ "${kind}" = "--basic" ]; then 18 | run_valgrind_basic 19 | run_valgrind_stream 20 | fi 21 | 22 | if [ "${kind}" = "--metadata" ]; then 23 | run_valgrind_extended 24 | run_valgrind_extended_stream 25 | fi 26 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact64_acceptor-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactAcceptorFst_StdArc_uint64_registerer; 11 | 12 | static FstRegisterer> 13 | CompactAcceptorFst_LogArc_uint64_registerer; 14 | 15 | } // namespace fst 16 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact8_unweighted-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactUnweightedFst_StdArc_uint8_registerer; 11 | static FstRegisterer> 12 | CompactUnweightedFst_LogArc_uint8_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact16_acceptor-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactAcceptorFst_StdArc_uint16_registerer; 11 | static FstRegisterer> 12 | CompactAcceptorFst_LogArc_uint16_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/kenlm/util/parallel_read.hh: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_PARALLEL_READ__ 2 | #define UTIL_PARALLEL_READ__ 3 | 4 | /* Read pieces of a file in parallel. This has a very specific use case: 5 | * reading files from Lustre is CPU bound so multiple threads actually 6 | * increases throughput. Speed matters when an LM takes a terabyte. 7 | */ 8 | 9 | #include 10 | #include 11 | 12 | namespace util { 13 | void ParallelRead(int fd, void *to, std::size_t amount, uint64_t offset); 14 | } // namespace util 15 | 16 | #endif // UTIL_PARALLEL_READ__ 17 | -------------------------------------------------------------------------------- /taskcluster/examples-ffmpeg_vad_streaming-node10.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "node:10" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | system_setup: 7 | > 8 | apt-get -qq -y install ffmpeg 9 | args: 10 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/ffmpeg_vad_streaming/test.sh" 11 | workerType: "${docker.dsTests}" 12 | metadata: 13 | name: "DeepSpeech examples: ffmpeg VAD Streaming NodeJS v10.x" 14 | description: "DeepSpeech examples: ffmpeg VAD Streaming NodeJS v10.x" 15 | -------------------------------------------------------------------------------- /taskcluster/examples-ffmpeg_vad_streaming-node12.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "node:12" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | system_setup: 7 | > 8 | apt-get -qq -y install ffmpeg 9 | args: 10 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/ffmpeg_vad_streaming/test.sh" 11 | workerType: "${docker.dsTests}" 12 | metadata: 13 | name: "DeepSpeech examples: ffmpeg VAD Streaming NodeJS v12.x" 14 | description: "DeepSpeech examples: ffmpeg VAD Streaming NodeJS v12.x" 15 | -------------------------------------------------------------------------------- /taskcluster/homebrew_tests-darwin-amd64.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: generic_tc_caching-darwin-opt-base.tyml 3 | cache: 4 | artifact_url: ${system.homebrew_tests.url} 5 | artifact_namespace: ${system.homebrew_tests.namespace} 6 | workerType: ${macOS.dsBuild} 7 | scripts: 8 | setup: "taskcluster/tc-true.sh" 9 | build: "taskcluster/homebrew-build.sh --tests" 10 | package: "taskcluster/homebrew-package.sh --tests" 11 | metadata: 12 | name: "Tests Homebrew macOS AMD64" 13 | description: "Setup a tests Homebrew for macOS/AMD64" 14 | -------------------------------------------------------------------------------- /taskcluster/test-generate_scorer-darwin-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-darwin-opt-base.tyml 3 | dependencies: 4 | - "darwin-amd64-cpu-opt" 5 | - "kenlm_darwin-amd64-cpu-opt" 6 | args: 7 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-scorer-tests.sh ${system.kenlm.darwin_amd64_cpu.url} 3.6.10:m" 8 | workerType: "${docker.dsTests}" 9 | metadata: 10 | name: "Testing DeepSpeech macOS AMD64 CPU generate scorer" 11 | description: "Generate a DeepSpeech Scorer for macOS/AMD64, CPU only, optimized version" 12 | -------------------------------------------------------------------------------- /taskcluster/test-generate_scorer-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | - "kenlm_linux-amd64-cpu-opt" 6 | args: 7 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-scorer-tests.sh ${system.kenlm.linux_amd64_cpu.url} 3.6.10:m" 8 | workerType: "${docker.dsTests}" 9 | metadata: 10 | name: "Testing DeepSpeech Linux AMD64 CPU generate scorer" 11 | description: "Generate a DeepSpeech Scorer for Linux/AMD64, CPU only, optimized version" 12 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact16_unweighted-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactUnweightedFst_StdArc_uint16_registerer; 11 | static FstRegisterer> 12 | CompactUnweightedFst_LogArc_uint16_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact64_unweighted-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactUnweightedFst_StdArc_uint64_registerer; 11 | static FstRegisterer> 12 | CompactUnweightedFst_LogArc_uint64_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/far/sttable.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | bool IsSTTable(const string &filename) { 10 | std::ifstream strm(filename); 11 | if (!strm.good()) return false; 12 | 13 | int32 magic_number = 0; 14 | ReadType(strm, &magic_number); 15 | return magic_number == kSTTableMagicNumber; 16 | } 17 | 18 | } // namespace fst 19 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact64_acceptor-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactAcceptorFst_StdArc_uint64_registerer; 11 | 12 | static FstRegisterer> 13 | CompactAcceptorFst_LogArc_uint64_registerer; 14 | 15 | } // namespace fst 16 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact8_unweighted-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactUnweightedFst_StdArc_uint8_registerer; 11 | static FstRegisterer> 12 | CompactUnweightedFst_LogArc_uint8_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /taskcluster/homebrew_builds-darwin-amd64.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: generic_tc_caching-darwin-opt-base.tyml 3 | cache: 4 | artifact_url: ${system.homebrew_builds.url} 5 | artifact_namespace: ${system.homebrew_builds.namespace} 6 | workerType: ${macOS.dsBuild} 7 | scripts: 8 | setup: "taskcluster/tc-true.sh" 9 | build: "taskcluster/homebrew-build.sh --builds" 10 | package: "taskcluster/homebrew-package.sh --builds" 11 | metadata: 12 | name: "Builds Homebrew macOS AMD64" 13 | description: "Setup a builds Homebrew for macOS/AMD64" 14 | -------------------------------------------------------------------------------- /taskcluster/tc-cpp-ds-tests-prod.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/tc-tests-utils.sh 6 | 7 | bitrate=$1 8 | set_ldc_sample_filename "${bitrate}" 9 | 10 | model_source=${DEEPSPEECH_PROD_MODEL} 11 | model_name=$(basename "${model_source}") 12 | 13 | model_source_mmap=${DEEPSPEECH_PROD_MODEL_MMAP} 14 | model_name_mmap=$(basename "${model_source_mmap}") 15 | 16 | download_material "${TASKCLUSTER_TMP_DIR}/ds" 17 | 18 | export PATH=${TASKCLUSTER_TMP_DIR}/ds/:$PATH 19 | 20 | check_versions 21 | 22 | run_prod_inference_tests "${bitrate}" 23 | -------------------------------------------------------------------------------- /taskcluster/test-cpp_16k_tflite-win-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-tflite-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-cpp_tflite_basic-ds-tests.sh 16k" 9 | metadata: 10 | name: "DeepSpeech Windows AMD64 TFLite C++ tests (16kHz)" 11 | description: "Testing DeepSpeech C++ for Windows/AMD64, TFLite, optimized version (16kHz)" 12 | -------------------------------------------------------------------------------- /taskcluster/test-netframework-win-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-netframework-ds-tests.sh 16k" 9 | metadata: 10 | name: "DeepSpeech Windows AMD64 CPU .Net Framework tests" 11 | description: "Testing DeepSpeech .Net Framework for Windows/AMD64, CPU only, optimized version" 12 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstminimize.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | DEFINE_double(delta, fst::kShortestDelta, "Comparison/quantization delta"); 9 | DEFINE_bool(allow_nondet, false, "Minimize non-deterministic FSTs"); 10 | 11 | int fstminimize_main(int argc, char **argv); 12 | 13 | int main(int argc, char **argv) { return fstminimize_main(argc, argv); } 14 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact16_unweighted-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactUnweightedFst_StdArc_uint16_registerer; 11 | static FstRegisterer> 12 | CompactUnweightedFst_LogArc_uint16_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact64_unweighted-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | CompactUnweightedFst_StdArc_uint64_registerer; 11 | static FstRegisterer> 12 | CompactUnweightedFst_LogArc_uint64_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/far/sttable.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | bool IsSTTable(const string &filename) { 10 | std::ifstream strm(filename); 11 | if (!strm.good()) return false; 12 | 13 | int32 magic_number = 0; 14 | ReadType(strm, &magic_number); 15 | return magic_number == kSTTableMagicNumber; 16 | } 17 | 18 | } // namespace fst 19 | -------------------------------------------------------------------------------- /taskcluster/examples-mic_vad_streaming-py36.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "python:3.6" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | system_setup: 7 | > 8 | apt-get -qq -y install portaudio19-dev pulseaudio 9 | args: 10 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/mic_vad_streaming/test.sh 3.6.0:m" 11 | workerType: "${docker.dsTests}" 12 | metadata: 13 | name: "DeepSpeech examples: mic VAD streaming Py3.6" 14 | description: "DeepSpeech examples: mic VAD streaming Python 3.6" 15 | -------------------------------------------------------------------------------- /taskcluster/examples-mic_vad_streaming-py37.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "python:3.7" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | system_setup: 7 | > 8 | apt-get -qq -y install portaudio19-dev pulseaudio 9 | args: 10 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/mic_vad_streaming/test.sh 3.7.0:m" 11 | workerType: "${docker.dsTests}" 12 | metadata: 13 | name: "DeepSpeech examples: mic VAD streaming Py3.7" 14 | description: "DeepSpeech examples: mic VAD streaming Python 3.7" 15 | -------------------------------------------------------------------------------- /taskcluster/examples-mic_vad_streaming-py38.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "python:3.8" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | system_setup: 7 | > 8 | apt-get -qq -y install portaudio19-dev pulseaudio 9 | args: 10 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/mic_vad_streaming/test.sh 3.8.0:" 11 | workerType: "${docker.dsTests}" 12 | metadata: 13 | name: "DeepSpeech examples: mic VAD streaming Py3.8" 14 | description: "DeepSpeech examples: mic VAD streaming Python 3.8" 15 | -------------------------------------------------------------------------------- /taskcluster/test-netframework-win-cuda-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-cuda-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-gpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-netframework-ds-tests.sh 16k cuda" 9 | metadata: 10 | name: "DeepSpeech Windows AMD64 CUDA .Net Framework tests" 11 | description: "Testing DeepSpeech .Net Framework for Windows/AMD64, CUDA, optimized version" 12 | -------------------------------------------------------------------------------- /taskcluster/test-singleshotinference-linux-amd64-py36m-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-ctc-opt" 5 | args: 6 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-single-shot-inference.sh 3.6.10:m" 7 | workerType: "${docker.dsTests}" 8 | metadata: 9 | name: "DeepSpeech Linux AMD64 CPU single-shot inference Py3.6" 10 | description: "Single-shot inference a DeepSpeech LDC93S1 checkpoint for Linux/AMD64 using upstream TensorFlow Python 3.6, CPU only, optimized version" 11 | -------------------------------------------------------------------------------- /taskcluster/worker.cyml: -------------------------------------------------------------------------------- 1 | taskcluster: 2 | schedulerId: taskcluster-github 3 | docker: 4 | provisionerId: proj-deepspeech 5 | workerTypeKvm: kvm 6 | workerTypeWin: win 7 | workerTypeCuda: win-gpu 8 | dockerrpi3: 9 | provisionerId: proj-deepspeech 10 | workerType: ds-rpi3 11 | dockerarm64: 12 | provisionerId: proj-deepspeech 13 | workerType: ds-lepotato 14 | generic: 15 | provisionerId: proj-deepspeech 16 | workerType: ds-macos-light 17 | script: 18 | provisionerId: proj-deepspeech 19 | workerType: ds-scriptworker 20 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/const/const8-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> ConstFst_StdArc_uint8_registerer; 10 | static FstRegisterer> ConstFst_LogArc_uint8_registerer; 11 | static FstRegisterer> 12 | ConstFst_Log64Arc_uint8_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstminimize.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | DEFINE_double(delta, fst::kShortestDelta, "Comparison/quantization delta"); 9 | DEFINE_bool(allow_nondet, false, "Minimize non-deterministic FSTs"); 10 | 11 | int fstminimize_main(int argc, char **argv); 12 | 13 | int main(int argc, char **argv) { return fstminimize_main(argc, argv); } 14 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB HEADER_FILES ../include/fst/*.h) 2 | 3 | 4 | add_library(fst 5 | compat.cc 6 | flags.cc 7 | fst-types.cc 8 | fst.cc 9 | mapped-file.cc 10 | properties.cc 11 | symbol-table.cc 12 | symbol-table-ops.cc 13 | util.cc 14 | weight.cc 15 | ${HEADER_FILES} 16 | ) 17 | set_target_properties(fst PROPERTIES 18 | SOVERSION "${SOVERSION}" 19 | ) 20 | 21 | 22 | 23 | install(TARGETS fst 24 | LIBRARY DESTINATION lib 25 | ARCHIVE DESTINATION lib 26 | RUNTIME DESTINATION lib) 27 | -------------------------------------------------------------------------------- /taskcluster/scriptworker-task-jcenter.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: simple-task.tyml 3 | dependencies: 4 | # Make sure builds are ready 5 | - "android-java-opt" 6 | allowed: 7 | - "tag" 8 | ref_match: "refs/tags/" 9 | upload_targets: 10 | - "jcenter" 11 | artifacts_deps: 12 | python: [] 13 | cpp: [] 14 | javascript: [] 15 | java_aar: 16 | - "android-java-opt" 17 | nuget: [] 18 | metadata: 19 | name: "DeepSpeech Android lib Packages" 20 | description: "Trigger Uploading of DeepSpeech Android lib to JCenter registry" 21 | -------------------------------------------------------------------------------- /taskcluster/test-cpp_16k-raspbian-rpi3-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-raspbian-opt-base.tyml 3 | dependencies: 4 | - "linux-rpi3-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-cpp_tflite-ds-tests.sh 16k" 9 | metadata: 10 | name: "DeepSpeech Raspbian RPi3/ARMv7 CPU C++ tests (16kHz)" 11 | description: "Testing DeepSpeech C++ for Raspbian RPi3/ARMv7, CPU only, optimized version (16kHz)" 12 | -------------------------------------------------------------------------------- /taskcluster/test-netframework-win-tflite-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-tflite-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-netframework-ds-tests.sh 16k --tflite" 9 | metadata: 10 | name: "DeepSpeech Windows AMD64 TFLite .Net Framework tests" 11 | description: "Testing DeepSpeech .Net Framework for Windows/AMD64, TFLite, optimized version" 12 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstcompose.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_string(compose_filter, "auto", 7 | "Composition filter, one of: \"alt_sequence\", \"auto\", " 8 | "\"match\", \"null\", \"sequence\", \"trivial\""); 9 | DEFINE_bool(connect, true, "Trim output"); 10 | 11 | int fstcompose_main(int argc, char **argv); 12 | 13 | int main(int argc, char **argv) { return fstcompose_main(argc, argv); } 14 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/const/const8-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> ConstFst_StdArc_uint8_registerer; 10 | static FstRegisterer> ConstFst_LogArc_uint8_registerer; 11 | static FstRegisterer> 12 | ConstFst_Log64Arc_uint8_registerer; 13 | 14 | } // namespace fst 15 | -------------------------------------------------------------------------------- /native_client/dotnet/DeepSpeechWPF/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using CommonServiceLocator; 2 | using DeepSpeech.WPF.ViewModels; 3 | using System.Windows; 4 | 5 | namespace DeepSpeechWPF 6 | { 7 | /// 8 | /// Interaction logic for MainWindow.xaml 9 | /// 10 | public partial class MainWindow : Window 11 | { 12 | public MainWindow() => InitializeComponent(); 13 | 14 | private void Window_Loaded(object sender, RoutedEventArgs e) => 15 | DataContext = ServiceLocator.Current.GetInstance(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /taskcluster/examples-electronjs.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "node:12" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | system_setup: 7 | > 8 | apt-get -qq update && apt-get -qq -y install ${electronjs.packages_xenial.apt} 9 | args: 10 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/electron/test.sh" 11 | workerType: "${docker.dsTests}" 12 | metadata: 13 | name: "DeepSpeech examples: ElectronJS/React on NodeJS v12.x" 14 | description: "DeepSpeech examples: ElectronJS/React on NodeJS v12.x" 15 | -------------------------------------------------------------------------------- /taskcluster/kenlm_win-amd64-cpu-opt.yml.DISABLED: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: generic_tc_caching-win-opt-base.tyml 3 | cache: 4 | artifact_url: ${system.kenlm.win_amd64_cpu.url} 5 | artifact_namespace: ${system.kenlm.win_amd64_cpu.namespace} 6 | scripts: 7 | setup: "taskcluster/kenlm_tc-setup.sh --windows-amd64" 8 | build: "taskcluster/kenlm_tc-build.sh --windows-amd64" 9 | package: "taskcluster/kenlm_tc-package.sh" 10 | metadata: 11 | name: "KenLM Windows AMD64 CPU" 12 | description: "Building KenLM for Windows/AMD64, CPU only, optimized version" 13 | -------------------------------------------------------------------------------- /taskcluster/test-cpp_8k-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | - "test-training_8k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_8k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-cpp-ds-tests.sh 8k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 CPU C++ tests (8kHz)" 12 | description: "Testing DeepSpeech C++ for Linux/AMD64, CPU only, optimized version (8kHz)" 13 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstintersect.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_string(compose_filter, "auto", 7 | "Composition filter, one of: \"alt_sequence\", \"auto\", " 8 | "\"match\", \"null\", \"sequence\", \"trivial\""); 9 | DEFINE_bool(connect, true, "Trim output"); 10 | 11 | int fstintersect_main(int argc, char **argv); 12 | 13 | int main(int argc, char **argv) { return fstintersect_main(argc, argv); } 14 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstprune.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta"); 9 | DEFINE_int64(nstate, fst::kNoStateId, "State number threshold"); 10 | DEFINE_string(weight, "", "Weight threshold"); 11 | 12 | int fstprune_main(int argc, char **argv); 13 | 14 | int main(int argc, char **argv) { return fstprune_main(argc, argv); } 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstcompose.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_string(compose_filter, "auto", 7 | "Composition filter, one of: \"alt_sequence\", \"auto\", " 8 | "\"match\", \"null\", \"sequence\", \"trivial\""); 9 | DEFINE_bool(connect, true, "Trim output"); 10 | 11 | int fstcompose_main(int argc, char **argv); 12 | 13 | int main(int argc, char **argv) { return fstcompose_main(argc, argv); } 14 | -------------------------------------------------------------------------------- /taskcluster/gradle-cache.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: generic_tc_caching-linux-opt-base.tyml 3 | cache: 4 | artifact_url: ${system.gradle_cache.url} 5 | artifact_namespace: ${system.gradle_cache.namespace} 6 | system_setup: 7 | > 8 | ${java.packages_xenial.apt} 9 | scripts: 10 | setup: "taskcluster/tc-true.sh" 11 | build: "taskcluster/gradle-build.sh" 12 | package: "taskcluster/gradle-package.sh" 13 | workerType: "${docker.smallTask}" 14 | metadata: 15 | name: "Builds Gradle cache" 16 | description: "Setup a Gradle cache for Android" 17 | -------------------------------------------------------------------------------- /taskcluster/test-cpp_16k-armbian-arm64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-armbian-opt-base.tyml 3 | dependencies: 4 | - "linux-arm64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-cpp_tflite-ds-tests.sh 16k" 9 | metadata: 10 | name: "DeepSpeech ARMbian ARM64 Cortex-A53 CPU C++ tests (16kHz)" 11 | description: "Testing DeepSpeech C++ for ARMbian ARM64 Cortex-A53, CPU only, optimized version (16kHz)" 12 | -------------------------------------------------------------------------------- /taskcluster/test-cpp_16k-darwin-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-darwin-opt-base.tyml 3 | dependencies: 4 | - "darwin-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | - "homebrew_tests-darwin-amd64" 7 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 8 | args: 9 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-cpp-ds-tests.sh 16k" 10 | metadata: 11 | name: "DeepSpeech OSX AMD64 CPU C++ tests (16kHz)" 12 | description: "Testing DeepSpeech C++ for OSX/AMD64, CPU only, optimized version (16kHz)" 13 | -------------------------------------------------------------------------------- /taskcluster/test-cpp_16k-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-cpp-ds-tests.sh 16k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 CPU C++ tests (16kHz)" 12 | description: "Testing DeepSpeech C++ for Linux/AMD64, CPU only, optimized version (16kHz)" 13 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstdifference.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_string(compose_filter, "auto", 7 | "Composition filter, one of: \"alt_sequence\", \"auto\", " 8 | "\"match\", \"null\", \"sequence\", \"trivial\""); 9 | DEFINE_bool(connect, true, "Trim output"); 10 | 11 | int fstdifference_main(int argc, char **argv); 12 | 13 | int main(int argc, char **argv) { return fstdifference_main(argc, argv); } 14 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/bin/fstencode.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_bool(encode_labels, false, "Encode output labels"); 7 | DEFINE_bool(encode_weights, false, "Encode weights"); 8 | DEFINE_bool(encode_reuse, false, "Re-use existing codex"); 9 | DEFINE_bool(decode, false, "Decode labels and/or weights"); 10 | 11 | int fstencode_main(int argc, char **argv); 12 | 13 | int main(int argc, char **argv) { return fstencode_main(argc, argv); } 14 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstintersect.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_string(compose_filter, "auto", 7 | "Composition filter, one of: \"alt_sequence\", \"auto\", " 8 | "\"match\", \"null\", \"sequence\", \"trivial\""); 9 | DEFINE_bool(connect, true, "Trim output"); 10 | 11 | int fstintersect_main(int argc, char **argv); 12 | 13 | int main(int argc, char **argv) { return fstintersect_main(argc, argv); } 14 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstprune.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta"); 9 | DEFINE_int64(nstate, fst::kNoStateId, "State number threshold"); 10 | DEFINE_string(weight, "", "Weight threshold"); 11 | 12 | int fstprune_main(int argc, char **argv); 13 | 14 | int main(int argc, char **argv) { return fstprune_main(argc, argv); } 15 | -------------------------------------------------------------------------------- /native_client/dotnet/DeepSpeechWPF/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ci_scripts/cppwin_tflite-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/all-vars.sh 6 | source $(dirname "$0")/all-utils.sh 7 | source $(dirname "$0")/asserts.sh 8 | 9 | bitrate=$1 10 | set_ldc_sample_filename "${bitrate}" 11 | 12 | model_source=${DEEPSPEECH_TEST_MODEL//.pb/.tflite} 13 | model_name=$(basename "${model_source}") 14 | model_name_mmap=$(basename "${model_source}") 15 | export DATA_TMP_DIR=${CI_TMP_DIR} 16 | 17 | download_material "${CI_TMP_DIR}/ds" 18 | 19 | export PATH=${CI_TMP_DIR}/ds/:$PATH 20 | 21 | check_versions 22 | 23 | run_basic_inference_tests 24 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstdifference.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_string(compose_filter, "auto", 7 | "Composition filter, one of: \"alt_sequence\", \"auto\", " 8 | "\"match\", \"null\", \"sequence\", \"trivial\""); 9 | DEFINE_bool(connect, true, "Trim output"); 10 | 11 | int fstdifference_main(int argc, char **argv); 12 | 13 | int main(int argc, char **argv) { return fstdifference_main(argc, argv); } 14 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/bin/fstencode.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | DEFINE_bool(encode_labels, false, "Encode output labels"); 7 | DEFINE_bool(encode_weights, false, "Encode weights"); 8 | DEFINE_bool(encode_reuse, false, "Re-use existing codex"); 9 | DEFINE_bool(decode, false, "Decode labels and/or weights"); 10 | 11 | int fstencode_main(int argc, char **argv); 12 | 13 | int main(int argc, char **argv) { return fstencode_main(argc, argv); } 14 | -------------------------------------------------------------------------------- /native_client/dotnet/DeepSpeechClient/Structs/Metadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace DeepSpeechClient.Structs 5 | { 6 | [StructLayout(LayoutKind.Sequential)] 7 | internal unsafe struct Metadata 8 | { 9 | /// 10 | /// Native list of candidate transcripts. 11 | /// 12 | internal unsafe IntPtr transcripts; 13 | /// 14 | /// Count of transcripts from the native side. 15 | /// 16 | internal unsafe int num_transcripts; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /taskcluster/examples-mic_vad_streaming-py39.yml.DISABLED_UNTIL_SCIPY_PY39: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: examples-base.tyml 3 | docker_image: "python:3.9" 4 | dependencies: 5 | - "linux-amd64-cpu-opt" 6 | system_setup: 7 | > 8 | apt-get -qq -y install portaudio19-dev pulseaudio 9 | args: 10 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/examples/mic_vad_streaming/test.sh 3.9.0:" 11 | workerType: "${docker.dsTests}" 12 | metadata: 13 | name: "DeepSpeech examples: mic VAD streaming Py3.9" 14 | description: "DeepSpeech examples: mic VAD streaming Python 3.9" 15 | -------------------------------------------------------------------------------- /taskcluster/scriptworker-task-readthedocs.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: simple-task.tyml 3 | dependencies: 4 | # Make sure everything else is ready 5 | - "scriptworker-task-github" 6 | allowed: 7 | - "tag" 8 | ref_match: "refs/tags/" 9 | upload_targets: 10 | - "readthedocs" 11 | artifacts_deps: 12 | python: [] 13 | cpp: [] 14 | java_aar: [] 15 | javascript: [] 16 | nuget: [] 17 | metadata: 18 | name: "DeepSpeech ReadTheDocs build & version update" 19 | description: "Trigger building of new version on ReadTheDocs and update default version" 20 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact8_weighted_string-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer< 10 | CompactWeightedStringFst> 11 | CompactWeightedStringFst_StdArc_uint8_registerer; 12 | static FstRegisterer< 13 | CompactWeightedStringFst> 14 | CompactWeightedStringFst_LogArc_uint8_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/const/const16-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | ConstFst_StdArc_uint16_registerer; 11 | static FstRegisterer> 12 | ConstFst_LogArc_uint16_registerer; 13 | static FstRegisterer> 14 | ConstFst_Log64Arc_uint16_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/const/const64-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | ConstFst_StdArc_uint64_registerer; 11 | static FstRegisterer> 12 | ConstFst_LogArc_uint64_registerer; 13 | static FstRegisterer> 14 | ConstFst_Log64Arc_uint64_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /native_client/kenlm/BUILDING: -------------------------------------------------------------------------------- 1 | KenLM has switched to cmake 2 | cmake . 3 | make -j 4 4 | But they recommend building out of tree 5 | mkdir -p build && cd build 6 | cmake .. 7 | make -j 4 8 | 9 | If you only want the query code and do not care about compression (.gz, .bz2, and .xz): 10 | ./compile_query_only.sh 11 | 12 | Windows: 13 | The windows directory has visual studio files. Note that you need to compile 14 | the kenlm project before build_binary and ngram_query projects. 15 | 16 | OSX: 17 | Missing dependencies can be remedied with brew. 18 | brew install cmake boost eigen 19 | -------------------------------------------------------------------------------- /taskcluster/test-python_35-darwin-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-darwin-opt-base.tyml 3 | dependencies: 4 | - "darwin-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | - "homebrew_tests-darwin-amd64" 7 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 8 | args: 9 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.5.8:m 16k" 10 | metadata: 11 | name: "DeepSpeech OSX AMD64 CPU Python v3.5 tests" 12 | description: "Testing DeepSpeech for OSX/AMD64 on Python v3.5, CPU only, optimized version" 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_37-darwin-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-darwin-opt-base.tyml 3 | dependencies: 4 | - "darwin-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | - "homebrew_tests-darwin-amd64" 7 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 8 | args: 9 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.7.6:m 16k" 10 | metadata: 11 | name: "DeepSpeech OSX AMD64 CPU Python v3.7 tests" 12 | description: "Testing DeepSpeech for OSX/AMD64 on Python v3.7.6:m, CPU only, optimized version" 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_38-darwin-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-darwin-opt-base.tyml 3 | dependencies: 4 | - "darwin-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | - "homebrew_tests-darwin-amd64" 7 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 8 | args: 9 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.8.1: 16k" 10 | metadata: 11 | name: "DeepSpeech OSX AMD64 CPU Python v3.8 tests" 12 | description: "Testing DeepSpeech for OSX/AMD64 on Python v3.8.1:m, CPU only, optimized version" 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_39-darwin-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-darwin-opt-base.tyml 3 | dependencies: 4 | - "darwin-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | - "homebrew_tests-darwin-amd64" 7 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 8 | args: 9 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.9.0: 16k" 10 | metadata: 11 | name: "DeepSpeech OSX AMD64 CPU Python v3.9 tests" 12 | description: "Testing DeepSpeech for OSX/AMD64 on Python v3.9.0:m, CPU only, optimized version" 13 | -------------------------------------------------------------------------------- /bin/README.rst: -------------------------------------------------------------------------------- 1 | Utility scripts 2 | =============== 3 | 4 | This folder contains scripts that can be used to do training on the various included importers from the command line. This is useful to be able to run training without a browser open, or unattended on a remote machine. They should be run from the base directory of the repository. Note that the default settings assume a very well-specified machine. In the situation that out-of-memory errors occur, you may find decreasing the values of ``--train_batch_size``\ , ``--dev_batch_size`` and ``--test_batch_size`` will allow you to continue, at the expense of speed. 5 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact64_weighted_string-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer< 10 | CompactWeightedStringFst> 11 | CompactWeightedStringFst_StdArc_uint64_registerer; 12 | static FstRegisterer< 13 | CompactWeightedStringFst> 14 | CompactWeightedStringFst_LogArc_uint64_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact8_weighted_string-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer< 10 | CompactWeightedStringFst> 11 | CompactWeightedStringFst_StdArc_uint8_registerer; 12 | static FstRegisterer< 13 | CompactWeightedStringFst> 14 | CompactWeightedStringFst_LogArc_uint8_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/const/const16-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | ConstFst_StdArc_uint16_registerer; 11 | static FstRegisterer> 12 | ConstFst_LogArc_uint16_registerer; 13 | static FstRegisterer> 14 | ConstFst_Log64Arc_uint16_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/const/const64-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer> 10 | ConstFst_StdArc_uint64_registerer; 11 | static FstRegisterer> 12 | ConstFst_LogArc_uint64_registerer; 13 | static FstRegisterer> 14 | ConstFst_Log64Arc_uint64_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /taskcluster/test-cpp_8k_tflite-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-tflite-opt" 5 | - "test-training_8k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_8k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-cpp_tflite_basic-ds-tests.sh 8k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 TFLite C++ tests (8kHz)" 12 | description: "Testing DeepSpeech C++ for Linux/AMD64, TFLite, optimized version (8kHz)" 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_36-darwin-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-darwin-opt-base.tyml 3 | dependencies: 4 | - "darwin-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | - "homebrew_tests-darwin-amd64" 7 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 8 | args: 9 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.6.10:m 16k" 10 | metadata: 11 | name: "DeepSpeech OSX AMD64 CPU Python v3.6 tests" 12 | description: "Testing DeepSpeech for OSX/AMD64 on Python v3.6.10:m, CPU only, optimized version" 13 | -------------------------------------------------------------------------------- /taskcluster/tf_ios-arm64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: generic_tc_caching-darwin-opt-base.tyml 3 | cache: 4 | artifact_url: ${system.tensorflow.ios_arm64.url} 5 | artifact_namespace: ${system.tensorflow.ios_arm64.namespace} 6 | workerType: ${macOS.tfBuild} 7 | scripts: 8 | setup: "taskcluster/tf_tc-setup.sh" 9 | build: "taskcluster/tf_tc-build.sh --ios-arm64" 10 | package: "taskcluster/tf_tc-package.sh" 11 | maxRunTime: 28800 12 | metadata: 13 | name: "TensorFlow iOS ARM64 TFLite" 14 | description: "Building TensorFlow for iOS ARM64, TFLite, optimized version" 15 | -------------------------------------------------------------------------------- /bin/graphdef_binary_to_text.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import sys 5 | 6 | import tensorflow.compat.v1 as tfv1 7 | from google.protobuf import text_format 8 | 9 | 10 | def main(): 11 | # Load and export as string 12 | with tfv1.gfile.FastGFile(sys.argv[1], "rb") as fin: 13 | graph_def = tfv1.GraphDef() 14 | graph_def.ParseFromString(fin.read()) 15 | 16 | with tfv1.gfile.FastGFile(sys.argv[1] + "txt", "w") as fout: 17 | fout.write(text_format.MessageToString(graph_def)) 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact16_weighted_string-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer< 10 | CompactWeightedStringFst> 11 | CompactWeightedStringFst_StdArc_uint16_registerer; 12 | 13 | static FstRegisterer< 14 | CompactWeightedStringFst> 15 | CompactWeightedStringFst_LogArc_uint16_registerer; 16 | 17 | } // namespace fst 18 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact64_weighted_string-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer< 10 | CompactWeightedStringFst> 11 | CompactWeightedStringFst_StdArc_uint64_registerer; 12 | static FstRegisterer< 13 | CompactWeightedStringFst> 14 | CompactWeightedStringFst_LogArc_uint64_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /taskcluster/kenlm_darwin-amd64-cpu-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: generic_tc_caching-darwin-opt-base.tyml 3 | cache: 4 | artifact_url: ${system.kenlm.darwin_amd64_cpu.url} 5 | artifact_namespace: ${system.kenlm.darwin_amd64_cpu.namespace} 6 | scripts: 7 | setup: "taskcluster/kenlm_tc-setup.sh --macos-amd64" 8 | build: "taskcluster/kenlm_tc-build.sh --macos-amd64" 9 | package: "taskcluster/kenlm_tc-package.sh" 10 | workerType: ${macOS.dsBuild} 11 | metadata: 12 | name: "KenLM macOS AMD64 CPU" 13 | description: "Building KenLM for macOS/AMD64, CPU only, optimized version" 14 | -------------------------------------------------------------------------------- /taskcluster/test-cpp_16k_tflite-darwin-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-darwin-opt-base.tyml 3 | dependencies: 4 | - "darwin-amd64-tflite-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | - "homebrew_tests-darwin-amd64" 7 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 8 | args: 9 | tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/taskcluster/tc-cpp_tflite_basic-ds-tests.sh 16k" 10 | metadata: 11 | name: "DeepSpeech OSX AMD64 TFlite C++ tests (16kHz)" 12 | description: "Testing DeepSpeech C++ for OSX/AMD64, TFLite, optimized version (16kHz)" 13 | -------------------------------------------------------------------------------- /taskcluster/test-cpp_16k_tflite-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-tflite-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-cpp_tflite_basic-ds-tests.sh 16k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 TFLite C++ tests (16kHz)" 12 | description: "Testing DeepSpeech C++ for Linux/AMD64, TFLite, optimized version (16kHz)" 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_38_8k-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | - "test-training_8k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_8k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.8.1: 8k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 CPU Python v3.8 tests (8kHz)" 12 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.8, CPU only, optimized version (8kHz)" 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_39_8k-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | - "test-training_8k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_8k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.9.0: 8k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 CPU Python v3.9 tests (8kHz)" 12 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.9, CPU only, optimized version (8kHz)" 13 | -------------------------------------------------------------------------------- /taskcluster/tf_darwin-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: generic_tc_caching-darwin-opt-base.tyml 3 | cache: 4 | artifact_url: ${system.tensorflow.darwin_amd64.url} 5 | artifact_namespace: ${system.tensorflow.darwin_amd64.namespace} 6 | workerType: ${macOS.tfBuild} 7 | scripts: 8 | setup: "taskcluster/tf_tc-setup.sh" 9 | build: "taskcluster/tf_tc-build.sh --darwin-cpu" 10 | package: "taskcluster/tf_tc-package.sh" 11 | maxRunTime: 28800 12 | metadata: 13 | name: "TensorFlow OSX AMD64 CPU" 14 | description: "Building TensorFlow for OSX AMD64, CPU only, optimized version" 15 | -------------------------------------------------------------------------------- /taskcluster/tf_ios-x86_64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: generic_tc_caching-darwin-opt-base.tyml 3 | cache: 4 | artifact_url: ${system.tensorflow.ios_x86_64.url} 5 | artifact_namespace: ${system.tensorflow.ios_x86_64.namespace} 6 | workerType: ${macOS.tfBuild} 7 | scripts: 8 | setup: "taskcluster/tf_tc-setup.sh" 9 | build: "taskcluster/tf_tc-build.sh --ios-x86_64" 10 | package: "taskcluster/tf_tc-package.sh" 11 | maxRunTime: 28800 12 | metadata: 13 | name: "TensorFlow iOS x86_64 TFLite" 14 | description: "Building TensorFlow for iOS x86_64, TFLite, optimized version" 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact16_weighted_string-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer< 10 | CompactWeightedStringFst> 11 | CompactWeightedStringFst_StdArc_uint16_registerer; 12 | 13 | static FstRegisterer< 14 | CompactWeightedStringFst> 15 | CompactWeightedStringFst_LogArc_uint16_registerer; 16 | 17 | } // namespace fst 18 | -------------------------------------------------------------------------------- /taskcluster/test-python_35-win-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | system_setup: 8 | > 9 | ${system.sox_win} 10 | args: 11 | tests_cmdline: "${system.homedir.win}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.5.4:m 16k" 12 | metadata: 13 | name: "DeepSpeech Windows AMD64 CPU Python v3.5 tests" 14 | description: "Testing DeepSpeech for Windows/AMD64 on Python v3.5, CPU only, optimized version" 15 | -------------------------------------------------------------------------------- /taskcluster/test-python_35_8k-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | - "test-training_8k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_8k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.5.8:m 8k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 CPU Python v3.5 tests (8kHz)" 12 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.5, CPU only, optimized version (8kHz)" 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_36-win-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | system_setup: 8 | > 9 | ${system.sox_win} 10 | args: 11 | tests_cmdline: "${system.homedir.win}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.6.8:m 16k" 12 | metadata: 13 | name: "DeepSpeech Windows AMD64 CPU Python v3.6 tests" 14 | description: "Testing DeepSpeech for Windows/AMD64 on Python v3.6, CPU only, optimized version" 15 | -------------------------------------------------------------------------------- /taskcluster/test-python_36_8k-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | - "test-training_8k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_8k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.6.10:m 8k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 CPU Python v3.6 tests (8kHz)" 12 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.6, CPU only, optimized version (8kHz)" 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_37-win-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | system_setup: 8 | > 9 | ${system.sox_win} 10 | args: 11 | tests_cmdline: "${system.homedir.win}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.7.6:m 16k" 12 | metadata: 13 | name: "DeepSpeech Windows AMD64 CPU Python v3.7 tests" 14 | description: "Testing DeepSpeech for Windows/AMD64 on Python v3.7, CPU only, optimized version" 15 | -------------------------------------------------------------------------------- /taskcluster/test-python_37_8k-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | - "test-training_8k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_8k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.7.6:m 8k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 CPU Python v3.7 tests (8kHz)" 12 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.7, CPU only, optimized version (8kHz)" 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_38-win-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | system_setup: 8 | > 9 | ${system.sox_win} 10 | args: 11 | tests_cmdline: "${system.homedir.win}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.8.1: 16k" 12 | metadata: 13 | name: "DeepSpeech Windows AMD64 CPU Python v3.8 tests" 14 | description: "Testing DeepSpeech for Windows/AMD64 on Python v3.8, CPU only, optimized version" 15 | -------------------------------------------------------------------------------- /taskcluster/test-python_39-win-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | system_setup: 8 | > 9 | ${system.sox_win} 10 | args: 11 | tests_cmdline: "${system.homedir.win}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.9.0: 16k" 12 | metadata: 13 | name: "DeepSpeech Windows AMD64 CPU Python v3.9 tests" 14 | description: "Testing DeepSpeech for Windows/AMD64 on Python v3.9, CPU only, optimized version" 15 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact8_unweighted_acceptor-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer< 10 | CompactUnweightedAcceptorFst> 11 | CompactUnweightedAcceptorFst_StdArc_uint8_registerer; 12 | static FstRegisterer< 13 | CompactUnweightedAcceptorFst> 14 | CompactUnweightedAcceptorFst_LogArc_uint8_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/far/stlist.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | namespace fst { 10 | 11 | bool IsSTList(const string &filename) { 12 | std::ifstream strm(filename, std::ios_base::in | std::ios_base::binary); 13 | if (!strm) return false; 14 | int32 magic_number = 0; 15 | ReadType(strm, &magic_number); 16 | return magic_number == kSTListMagicNumber; 17 | } 18 | 19 | } // namespace fst 20 | -------------------------------------------------------------------------------- /taskcluster/host-build-dbg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | runtime=$1 6 | 7 | source $(dirname "$0")/tc-tests-utils.sh 8 | 9 | source $(dirname "$0")/tf_tc-vars.sh 10 | 11 | BAZEL_TARGETS=" 12 | //native_client:libdeepspeech.so 13 | " 14 | 15 | if [ "${runtime}" = "tflite" ]; then 16 | BAZEL_BUILD_TFLITE="--define=runtime=tflite" 17 | fi; 18 | 19 | BAZEL_BUILD_FLAGS="${BAZEL_BUILD_TFLITE} ${BAZEL_OPT_FLAGS} ${BAZEL_EXTRA_FLAGS}" 20 | 21 | BAZEL_ENV_FLAGS="TF_NEED_CUDA=0" 22 | SYSTEM_TARGET=host 23 | 24 | do_bazel_build "dbg" 25 | 26 | export EXTRA_LOCAL_CFLAGS="-ggdb" 27 | do_deepspeech_binary_build 28 | -------------------------------------------------------------------------------- /taskcluster/swig-darwin-amd64.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: generic_tc_caching-darwin-opt-base.tyml 3 | build_or_cache: 4 | repo: "${system.swig.repo}" 5 | sha: "${system.swig.sha1}" 6 | dir: "swig" 7 | cache: 8 | artifact_url: "${system.swig_build.osx.url}" 9 | artifact_namespace: "${system.swig_build.osx.namespace}" 10 | workerType: ${macOS.dsBuild} 11 | scripts: 12 | setup: "taskcluster/tc-true.sh" 13 | build: "taskcluster/build.sh" 14 | package: "taskcluster/package.sh" 15 | metadata: 16 | name: "SWIG macOS AMD64" 17 | description: "Building SWIG for macOS/AMD64" 18 | -------------------------------------------------------------------------------- /taskcluster/test-python_35_16k-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.5.8:m 16k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 CPU Python v3.5 tests (16kHz)" 12 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.5, CPU only, optimized version (16kHz)" 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_36_16k-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.6.10:m 16k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 CPU Python v3.6 tests (16kHz)" 12 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.6, CPU only, optimized version (16kHz)" 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_37_16k-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.7.6:m 16k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 CPU Python v3.7 tests (16kHz)" 12 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.7, CPU only, optimized version (16kHz)" 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_38-win-cuda-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-cuda-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-gpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | system_setup: 8 | > 9 | ${system.sox_win} 10 | args: 11 | tests_cmdline: "${system.homedir.win}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.8.1: 16k cuda" 12 | metadata: 13 | name: "DeepSpeech Windows AMD64 CUDA Python v3.8 tests" 14 | description: "Testing DeepSpeech for Windows/AMD64 on Python v3.8, CUDA, optimized version" 15 | -------------------------------------------------------------------------------- /taskcluster/test-python_38_16k-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.8.1: 16k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 CPU Python v3.8 tests (16kHz)" 12 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.8, CPU only, optimized version (16kHz)" 13 | -------------------------------------------------------------------------------- /taskcluster/test-python_39-win-cuda-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-cuda-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-gpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | system_setup: 8 | > 9 | ${system.sox_win} 10 | args: 11 | tests_cmdline: "${system.homedir.win}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.9.0: 16k cuda" 12 | metadata: 13 | name: "DeepSpeech Windows AMD64 CUDA Python v3.9 tests" 14 | description: "Testing DeepSpeech for Windows/AMD64 on Python v3.9, CUDA, optimized version" 15 | -------------------------------------------------------------------------------- /taskcluster/test-python_39_16k-linux-amd64-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-cpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | args: 8 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.9.0: 16k" 9 | workerType: "${docker.dsTests}" 10 | metadata: 11 | name: "DeepSpeech Linux AMD64 CPU Python v3.9 tests (16kHz)" 12 | description: "Testing DeepSpeech for Linux/AMD64 on Python v3.9, CPU only, optimized version (16kHz)" 13 | -------------------------------------------------------------------------------- /ci_scripts/cpp-tests-prod.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | source $(dirname "$0")/all-vars.sh 6 | source $(dirname "$0")/all-utils.sh 7 | source $(dirname "$0")/asserts.sh 8 | 9 | bitrate=$1 10 | set_ldc_sample_filename "${bitrate}" 11 | 12 | model_source=${DEEPSPEECH_PROD_MODEL} 13 | model_name=$(basename "${model_source}") 14 | 15 | model_source_mmap=${DEEPSPEECH_PROD_MODEL_MMAP} 16 | model_name_mmap=$(basename "${model_source_mmap}") 17 | 18 | download_model_prod 19 | 20 | download_material 21 | 22 | export PATH=${CI_TMP_DIR}/ds/:$PATH 23 | 24 | check_versions 25 | 26 | run_prod_inference_tests "${bitrate}" 27 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact16_unweighted_acceptor-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer< 10 | CompactUnweightedAcceptorFst> 11 | CompactUnweightedAcceptorFst_StdArc_uint16_registerer; 12 | static FstRegisterer< 13 | CompactUnweightedAcceptorFst> 14 | CompactUnweightedAcceptorFst_LogArc_uint16_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.7/src/extensions/compact/compact64_unweighted_acceptor-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer< 10 | CompactUnweightedAcceptorFst> 11 | CompactUnweightedAcceptorFst_StdArc_uint64_registerer; 12 | static FstRegisterer< 13 | CompactUnweightedAcceptorFst> 14 | CompactUnweightedAcceptorFst_LogArc_uint64_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #-DHAVE_CONFIG_H -I./../include -fno-exceptions -funsigned-char -std=c++11 -MT symbol-table.lo -MD -MP -MF .deps/symbol-table.Tpo -c symbol-table.cc -fno-common -DPIC -o .libs/symbol-table.o 3 | 4 | include_directories(./include/) 5 | install(DIRECTORY include/ DESTINATION include/ 6 | FILES_MATCHING PATTERN "*.h") 7 | 8 | add_subdirectory(lib) 9 | add_subdirectory(script) 10 | 11 | if(HAVE_BIN) 12 | add_subdirectory(bin) 13 | endif(HAVE_BIN) 14 | 15 | add_subdirectory(extensions) 16 | 17 | enable_testing() 18 | add_subdirectory(test) 19 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact8_unweighted_acceptor-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer< 10 | CompactUnweightedAcceptorFst> 11 | CompactUnweightedAcceptorFst_StdArc_uint8_registerer; 12 | static FstRegisterer< 13 | CompactUnweightedAcceptorFst> 14 | CompactUnweightedAcceptorFst_LogArc_uint8_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/far/stlist.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | namespace fst { 10 | 11 | bool IsSTList(const string &filename) { 12 | std::ifstream strm(filename, std::ios_base::in | std::ios_base::binary); 13 | if (!strm) return false; 14 | int32 magic_number = 0; 15 | ReadType(strm, &magic_number); 16 | return magic_number == kSTListMagicNumber; 17 | } 18 | 19 | } // namespace fst 20 | -------------------------------------------------------------------------------- /taskcluster/test-python_35-win-cuda-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-cuda-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-gpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | system_setup: 8 | > 9 | ${system.sox_win} 10 | args: 11 | tests_cmdline: "${system.homedir.win}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.5.4:m 16k cuda" 12 | metadata: 13 | name: "DeepSpeech Windows AMD64 CUDA Python v3.5 tests" 14 | description: "Testing DeepSpeech for Windows/AMD64 on Python v3.5, CUDA, optimized version" 15 | -------------------------------------------------------------------------------- /taskcluster/test-python_36-win-cuda-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-cuda-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-gpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | system_setup: 8 | > 9 | ${system.sox_win} 10 | args: 11 | tests_cmdline: "${system.homedir.win}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.6.8:m 16k cuda" 12 | metadata: 13 | name: "DeepSpeech Windows AMD64 CUDA Python v3.6 tests" 14 | description: "Testing DeepSpeech for Windows/AMD64 on Python v3.6, CUDA, optimized version" 15 | -------------------------------------------------------------------------------- /taskcluster/test-python_37-win-cuda-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-win-cuda-opt-base.tyml 3 | dependencies: 4 | - "win-amd64-gpu-opt" 5 | - "test-training_16k-linux-amd64-py36m-opt" 6 | test_model_task: "test-training_16k-linux-amd64-py36m-opt" 7 | system_setup: 8 | > 9 | ${system.sox_win} 10 | args: 11 | tests_cmdline: "${system.homedir.win}/DeepSpeech/ds/taskcluster/tc-python-tests.sh 3.7.6:m 16k cuda" 12 | metadata: 13 | name: "DeepSpeech Windows AMD64 CUDA Python v3.7 tests" 14 | description: "Testing DeepSpeech for Windows/AMD64 on Python v3.7, CUDA, optimized version" 15 | -------------------------------------------------------------------------------- /doc/Flags.rst: -------------------------------------------------------------------------------- 1 | .. _training-flags: 2 | 3 | Command-line flags for the training scripts 4 | =========================================== 5 | 6 | Below you can find the definition of all command-line flags supported by the training scripts. This includes ``DeepSpeech.py``, ``evaluate.py``, ``evaluate_tflite.py``, ``transcribe.py`` and ``lm_optimizer.py``. 7 | 8 | Flags 9 | ----- 10 | 11 | .. literalinclude:: ../training/deepspeech_training/util/flags.py 12 | :language: python 13 | :linenos: 14 | :lineno-match: 15 | :start-after: sphinx-doc: training_ref_flags_start 16 | :end-before: sphinx-doc: training_ref_flags_end 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact16_unweighted_acceptor-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer< 10 | CompactUnweightedAcceptorFst> 11 | CompactUnweightedAcceptorFst_StdArc_uint16_registerer; 12 | static FstRegisterer< 13 | CompactUnweightedAcceptorFst> 14 | CompactUnweightedAcceptorFst_LogArc_uint16_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /native_client/ctcdecode/third_party/openfst-1.6.9-win/src/extensions/compact/compact64_unweighted_acceptor-fst.cc: -------------------------------------------------------------------------------- 1 | // See www.openfst.org for extensive documentation on this weighted 2 | // finite-state transducer library. 3 | 4 | #include 5 | #include 6 | 7 | namespace fst { 8 | 9 | static FstRegisterer< 10 | CompactUnweightedAcceptorFst> 11 | CompactUnweightedAcceptorFst_StdArc_uint64_registerer; 12 | static FstRegisterer< 13 | CompactUnweightedAcceptorFst> 14 | CompactUnweightedAcceptorFst_LogArc_uint64_registerer; 15 | 16 | } // namespace fst 17 | -------------------------------------------------------------------------------- /native_client/kenlm/lm/interpolate/tune_matrix.hh: -------------------------------------------------------------------------------- 1 | #ifndef LM_INTERPOLATE_TUNE_MATRIX_H 2 | #define LM_INTERPOLATE_TUNE_MATRIX_H 3 | 4 | #pragma GCC diagnostic push 5 | #pragma GCC diagnostic ignored "-Wpragmas" // Older gcc doesn't have "-Wunused-local-typedefs" and complains. 6 | #pragma GCC diagnostic ignored "-Wunused-local-typedefs" 7 | #include 8 | #pragma GCC diagnostic pop 9 | 10 | namespace lm { namespace interpolate { 11 | 12 | typedef Eigen::MatrixXf Matrix; 13 | typedef Eigen::VectorXf Vector; 14 | 15 | typedef Matrix::Scalar Accum; 16 | 17 | }} // namespaces 18 | #endif // LM_INTERPOLATE_TUNE_MATRIX_H 19 | -------------------------------------------------------------------------------- /taskcluster/test-training_8k-linux-amd64-py37m-opt.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: test-linux-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-ctc-opt" 5 | system_setup: 6 | > 7 | apt-get -qq update && apt-get -qq -y install ${training.packages_xenial.apt} 8 | args: 9 | tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-tests.sh 3.7.6:m 8k" 10 | workerType: "${docker.dsTests}" 11 | metadata: 12 | name: "DeepSpeech Linux AMD64 CPU 8kHz basic training Py3.7" 13 | description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 8kHz Python 3.7, CPU only, optimized version" 14 | -------------------------------------------------------------------------------- /taskcluster/node-package-gpu.yml: -------------------------------------------------------------------------------- 1 | build: 2 | template_file: node-package-opt-base.tyml 3 | dependencies: 4 | - "linux-amd64-gpu-opt" 5 | - "win-amd64-gpu-opt" 6 | system_setup: 7 | > 8 | ${nodejs.packages_xenial.prep_12} && ${nodejs.packages_xenial.apt_pinning} 9 | && apt-get -qq update && apt-get -qq -y install nodejs python-yaml 10 | scripts: 11 | build: "taskcluster/node-build.sh --cuda" 12 | package: "taskcluster/node-package.sh" 13 | workerType: "${docker.smallTask}" 14 | metadata: 15 | name: "DeepSpeech NodeJS GPU package" 16 | description: "Packaging DeepSpeech GPU for registry" 17 | -------------------------------------------------------------------------------- /taskcluster/tc-android-ds-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | arm_flavor=$1 6 | api_level=$2 7 | 8 | source $(dirname "$0")/tc-tests-utils.sh 9 | 10 | bitrate=$3 11 | set_ldc_sample_filename "${bitrate}" 12 | 13 | model_source=${DEEPSPEECH_TEST_MODEL//.pb/.tflite} 14 | model_name=$(basename "${model_source}") 15 | export DATA_TMP_DIR=${ANDROID_TMP_DIR}/ds 16 | 17 | download_material "${TASKCLUSTER_TMP_DIR}/ds" 18 | 19 | android_start_emulator "${arm_flavor}" "${api_level}" 20 | 21 | android_setup_ndk_data 22 | 23 | run_tflite_basic_inference_tests 24 | 25 | run_android_hotword_tests 26 | 27 | android_stop_emulator 28 | -------------------------------------------------------------------------------- /taskcluster/tc-update-index.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Helper script because it is way too painful to deal with Windows' CMD.exe 3 | # ways of escaping things when pushing JSON 4 | 5 | set -xe 6 | 7 | TC_EXPIRE=$1 8 | TC_INSTANCE=$2 9 | TC_INDEX=$3 10 | 11 | source $(dirname "$0")/tc-tests-utils.sh 12 | 13 | if [ ! -z "${TC_EXPIRE}" -a ! -z "${TC_INSTANCE}" -a ! -z "${TC_INDEX}" ]; then 14 | curl -sSL --fail -X PUT \ 15 | -H "Content-Type: application/json" \ 16 | -d "{\"taskId\":\"$TASK_ID\",\"rank\":0,\"expires\":\"${TC_EXPIRE}\",\"data\":{}}" \ 17 | "http://${TC_INSTANCE}/index/v1/task/${TC_INDEX}" 18 | fi; 19 | --------------------------------------------------------------------------------