Use submodule for building contrib examples into docs

This commit is contained in:
Reuben Morais 2019-12-06 16:33:15 +01:00
Родитель bce5544595
Коммит 808b154ef9
7 изменённых файлов: 23 добавлений и 14 удалений

4
.gitmodules поставляемый Normal file
Просмотреть файл

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

Просмотреть файл

@ -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 <https://github.com/mozilla/DeepSpeech-examples>`_.

Просмотреть файл

@ -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).

Просмотреть файл

@ -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 <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 <https://github.com/mozilla/DeepSpeech-examples>`_.

Просмотреть файл

@ -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 <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 <https://github.com/mozilla/DeepSpeech-examples>`_.

1
doc/examples Submodule

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

Просмотреть файл

@ -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