diff --git a/README.md b/README.md index f8986977..e48079f6 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ## Features - See [feature list](docs/src/feature_list.md) for more information. + See [feature list](docs/source/feature_list.md) for more information. ## Setup @@ -18,20 +18,20 @@ All tested under: * python>=3.7 * paddlepaddle==2.1.2 -Please see [install](docs/src/install.md). +Please see [install](docs/source/install.md). ## Getting Started -Please see [Getting Started](docs/src/getting_started.md) and [tiny egs](examples/tiny/s0/README.md). +Please see [Getting Started](docs/source/getting_started.md) and [tiny egs](examples/tiny/s0/README.md). ## More Information -* [Data Prepration](docs/src/data_preparation.md) -* [Data Augmentation](docs/src/augmentation.md) -* [Ngram LM](docs/src/ngram_lm.md) -* [Benchmark](docs/src/benchmark.md) -* [Relased Model](docs/src/released_model.md) +* [Data Prepration](docs/source/data_preparation.md) +* [Data Augmentation](docs/source/augmentation.md) +* [Ngram LM](docs/source/ngram_lm.md) +* [Benchmark](docs/source/benchmark.md) +* [Relased Model](docs/source/released_model.md) ## Questions and Help @@ -45,4 +45,4 @@ DeepSpeech is provided under the [Apache-2.0 License](./LICENSE). ## Acknowledgement -We depends on many open source repos. See [References](docs/src/reference.md) for more information. +We depends on many open source repos. See [References](docs/source/reference.md) for more information. diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..d0c3cbf1 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 00000000..6247f7e2 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..218470ec --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,7 @@ +myst_parser +numpydoc +recommonmark>=0.5.0 +sphinx +sphinx-autobuild +sphinx-markdown-tables +sphinx_rtd_theme diff --git a/docs/src/augmentation.md b/docs/source/augmentation.md similarity index 100% rename from docs/src/augmentation.md rename to docs/source/augmentation.md diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 00000000..e5790de2 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,81 @@ +# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html +# -- Path setup -------------------------------------------------------------- +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +import recommonmark.parser +import sphinx_rtd_theme + +# -- Project information ----------------------------------------------------- + +project = 'paddle deepspeech' +copyright = '2021, Deepspeech-developers' +author = 'Deepspeech-developers' + +# The full version, including alpha/beta/rc tags +release = '2.1' + +# -- General configuration --------------------------------------------------- +source_parsers = { + '.md': recommonmark.parser.CommonMarkParser, +} +source_suffix = ['.rst', '.md'] + +master_doc = 'index' +pygments_style = 'sphinx' +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.viewcode', + 'sphinx_rtd_theme', + 'sphinx.ext.mathjax', + 'sphinx.ext.autosummary', + 'numpydoc', + 'myst_parser', +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [ + '_build', +] +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# + +html_theme = 'sphinx_rtd_theme' +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +smartquotes = False + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# -- Extension configuration ------------------------------------------------- +# numpydoc_show_class_members = False diff --git a/docs/src/data_preparation.md b/docs/source/data_preparation.md similarity index 100% rename from docs/src/data_preparation.md rename to docs/source/data_preparation.md diff --git a/docs/src/deepspeech_architecture.md b/docs/source/deepspeech_architecture.md similarity index 100% rename from docs/src/deepspeech_architecture.md rename to docs/source/deepspeech_architecture.md diff --git a/docs/src/feature_list.md b/docs/source/feature_list.md similarity index 100% rename from docs/src/feature_list.md rename to docs/source/feature_list.md diff --git a/docs/src/getting_started.md b/docs/source/getting_started.md similarity index 100% rename from docs/src/getting_started.md rename to docs/source/getting_started.md diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 00000000..53d07f87 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,47 @@ +Welcome to paddle Deepspeech documentation ! +============================================== + +**Deepspeech** is a ASR library implemented by paddlepaddle. + + +Contents +-------- + +.. toctree:: + :maxdepth: 1 + :caption: Introduction + + deepspeech_architecture + + +.. toctree:: + :maxdepth: 1 + :caption: Getting_started + + install + getting_started + + +.. toctree:: + :maxdepth: 1 + :caption: More Information + + data_preparation + augmentation + feature_list + ngram_lm + + +.. toctree:: + :maxdepth: 1 + :caption: Released_model + + released_model + + +.. toctree:: + :maxdepth: 1 + :caption: Acknowledgement + + reference + diff --git a/docs/src/install.md b/docs/source/install.md similarity index 100% rename from docs/src/install.md rename to docs/source/install.md diff --git a/docs/src/ngram_lm.md b/docs/source/ngram_lm.md similarity index 100% rename from docs/src/ngram_lm.md rename to docs/source/ngram_lm.md diff --git a/docs/src/reference.md b/docs/source/reference.md similarity index 100% rename from docs/src/reference.md rename to docs/source/reference.md diff --git a/docs/src/released_model.md b/docs/source/released_model.md similarity index 100% rename from docs/src/released_model.md rename to docs/source/released_model.md