Use submodule for building contrib examples into docs

This commit is contained in:
Reuben Morais 2019-12-06 16:33:15 +01:00
parent bce5544595
commit 808b154ef9
7 changed files with 23 additions and 14 deletions

4
.gitmodules vendored Normal file
View File

@ -0,0 +1,4 @@
[submodule "doc/examples"]
path = doc/examples
url = https://github.com/mozilla/DeepSpeech-examples.git
branch = master

View File

@ -7,8 +7,8 @@ DeepSpeechWPF
This examples demonstrates using the .Net Framework DeepSpeech NuGet to build This examples demonstrates using the .Net Framework DeepSpeech NuGet to build
a graphical Windows application using DeepSpeech a graphical Windows application using DeepSpeech
.. literalinclude:: ../examples/net_framework/DeepSpeechWPF/MainWindow.xaml.cs .. literalinclude:: examples/net_framework/DeepSpeechWPF/MainWindow.xaml.cs
:language: csharp :language: csharp
:linenos: :linenos:
Full source code available under `examples/net_framework/DeepSpeechWPF/`. Full source code available on `https://github.com/mozilla/DeepSpeech-examples <https://github.com/mozilla/DeepSpeech-examples>`_.

View File

@ -31,11 +31,15 @@ pip3:
npm: npm:
npm install jsdoc@3.6.3 npm install jsdoc@3.6.3
dist: html submodule:
cd $(BUILDDIR)/html/ && zip -r9 ../../html.zip * 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 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 # Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).

View File

@ -6,11 +6,11 @@ NodeJS WAV
This example demonstrates a very basic usage of the NodeJS API 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 :language: javascript
:linenos: :linenos:
Full source code available under `../examples/nodejs_wav/`. Full source code available on `https://github.com/mozilla/DeepSpeech-examples <https://github.com/mozilla/DeepSpeech-examples>`_.
FFMPEG VAD Streaming FFMPEG VAD Streaming
-------------------- --------------------
@ -18,8 +18,8 @@ FFMPEG VAD Streaming
This example demonstrates using the Streaming API with ffmpeg to perform some This example demonstrates using the Streaming API with ffmpeg to perform some
Voice-Activity-Detection. Voice-Activity-Detection.
.. literalinclude:: ../examples/ffmpeg_vad_streaming/index.js .. literalinclude:: examples/ffmpeg_vad_streaming/index.js
:language: javascript :language: javascript
:linenos: :linenos:
Full source code available under `../examples/ffmpeg_vad_streaming/`. Full source code available on `https://github.com/mozilla/DeepSpeech-examples <https://github.com/mozilla/DeepSpeech-examples>`_.

View File

@ -7,11 +7,11 @@ Mic VAD Streaming
This example demonstrates getting audio from microphone, running This example demonstrates getting audio from microphone, running
Voice-Activity-Detection and then outputting text. 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 :language: python
:linenos: :linenos:
Full source code available under `../examples/mic_vad_streaming/`. Full source code available on `https://github.com/mozilla/DeepSpeech-examples <https://github.com/mozilla/DeepSpeech-examples>`_.
VAD Transcriber VAD Transcriber
--------------- ---------------
@ -19,8 +19,8 @@ VAD Transcriber
This example demonstrates VAD-based transcription with both console and This example demonstrates VAD-based transcription with both console and
graphical interface. graphical interface.
.. literalinclude:: ../examples/vad_transcriber/wavTranscriber.py .. literalinclude:: examples/vad_transcriber/wavTranscriber.py
:language: python :language: python
:linenos: :linenos:
Full source code available under `../examples/vad_transcriber/wavTranscriber.py`. Full source code available on `https://github.com/mozilla/DeepSpeech-examples <https://github.com/mozilla/DeepSpeech-examples>`_.

1
doc/examples Submodule

@ -0,0 +1 @@
Subproject commit 3beecad75c6dbe92d0604690014a3dba9fb9c926

View File

@ -6,5 +6,5 @@ THIS=$(dirname "$0")
pushd ${THIS}/../ pushd ${THIS}/../
export PATH=$HOME/.local/bin:${THIS}/../doc/node_modules/.bin/:$PATH export PATH=$HOME/.local/bin:${THIS}/../doc/node_modules/.bin/:$PATH
make -C doc/ html dist make -C doc/ dist
popd popd