diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..fc8a954f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "doc/examples"] + path = doc/examples + url = https://github.com/mozilla/DeepSpeech-examples.git + branch = master diff --git a/doc/DotNet-contrib-examples.rst b/doc/DotNet-contrib-examples.rst index 67e6c8f3..60d9d163 100644 --- a/doc/DotNet-contrib-examples.rst +++ b/doc/DotNet-contrib-examples.rst @@ -7,8 +7,8 @@ DeepSpeechWPF This examples demonstrates using the .Net Framework DeepSpeech NuGet to build a graphical Windows application using DeepSpeech -.. literalinclude:: ../examples/net_framework/DeepSpeechWPF/MainWindow.xaml.cs +.. literalinclude:: examples/net_framework/DeepSpeechWPF/MainWindow.xaml.cs :language: csharp :linenos: -Full source code available under `examples/net_framework/DeepSpeechWPF/`. +Full source code available on `https://github.com/mozilla/DeepSpeech-examples `_. diff --git a/doc/Makefile b/doc/Makefile index b74ad7a1..47c0fdcd 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -31,11 +31,15 @@ pip3: npm: npm install jsdoc@3.6.3 -dist: html - cd $(BUILDDIR)/html/ && zip -r9 ../../html.zip * +submodule: + git submodule update --init --remote + +# Add submodule update dependency to Sphinx's "html" target +html: Makefile submodule pip3 npm doxygen-c doxygen-java doxygen-dotnet + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) dist: html - @cd $(BUILDDIR)/html/ && zip -r9 ../../html.zip * + cd $(BUILDDIR)/html/ && zip -r9 ../../html.zip * # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). diff --git a/doc/NodeJS-contrib-Examples.rst b/doc/NodeJS-contrib-Examples.rst index f3c1d97c..c8cf25cc 100644 --- a/doc/NodeJS-contrib-Examples.rst +++ b/doc/NodeJS-contrib-Examples.rst @@ -6,11 +6,11 @@ NodeJS WAV This example demonstrates a very basic usage of the NodeJS API -.. literalinclude:: ../examples/nodejs_wav/index.js +.. literalinclude:: examples/nodejs_wav/index.js :language: javascript :linenos: -Full source code available under `../examples/nodejs_wav/`. +Full source code available on `https://github.com/mozilla/DeepSpeech-examples `_. FFMPEG VAD Streaming -------------------- @@ -18,8 +18,8 @@ FFMPEG VAD Streaming This example demonstrates using the Streaming API with ffmpeg to perform some Voice-Activity-Detection. -.. literalinclude:: ../examples/ffmpeg_vad_streaming/index.js +.. literalinclude:: examples/ffmpeg_vad_streaming/index.js :language: javascript :linenos: -Full source code available under `../examples/ffmpeg_vad_streaming/`. +Full source code available on `https://github.com/mozilla/DeepSpeech-examples `_. diff --git a/doc/Python-contrib-Examples.rst b/doc/Python-contrib-Examples.rst index 7c8adfd6..2b4f5e33 100644 --- a/doc/Python-contrib-Examples.rst +++ b/doc/Python-contrib-Examples.rst @@ -7,11 +7,11 @@ Mic VAD Streaming This example demonstrates getting audio from microphone, running Voice-Activity-Detection and then outputting text. -.. literalinclude:: ../examples/mic_vad_streaming/mic_vad_streaming.py +.. literalinclude:: examples/mic_vad_streaming/mic_vad_streaming.py :language: python :linenos: -Full source code available under `../examples/mic_vad_streaming/`. +Full source code available on `https://github.com/mozilla/DeepSpeech-examples `_. VAD Transcriber --------------- @@ -19,8 +19,8 @@ VAD Transcriber This example demonstrates VAD-based transcription with both console and graphical interface. -.. literalinclude:: ../examples/vad_transcriber/wavTranscriber.py +.. literalinclude:: examples/vad_transcriber/wavTranscriber.py :language: python :linenos: -Full source code available under `../examples/vad_transcriber/wavTranscriber.py`. +Full source code available on `https://github.com/mozilla/DeepSpeech-examples `_. diff --git a/doc/examples b/doc/examples new file mode 160000 index 00000000..3beecad7 --- /dev/null +++ b/doc/examples @@ -0,0 +1 @@ +Subproject commit 3beecad75c6dbe92d0604690014a3dba9fb9c926 diff --git a/taskcluster/docs-build.sh b/taskcluster/docs-build.sh index c6331f0f..27d207c9 100644 --- a/taskcluster/docs-build.sh +++ b/taskcluster/docs-build.sh @@ -6,5 +6,5 @@ THIS=$(dirname "$0") pushd ${THIS}/../ export PATH=$HOME/.local/bin:${THIS}/../doc/node_modules/.bin/:$PATH - make -C doc/ html dist + make -C doc/ dist popd