changeset 437:2644f997b6e0

Update documentation
author Amine Sehili <amine.sehili@gmail.com>
date Wed, 30 Oct 2024 23:05:32 +0100
parents 4b74e44900d2
children 3a4a57e87996
files auditok/util.py doc/command_line_usage.rst doc/conf.py doc/index.rst
diffstat 4 files changed, 12 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/auditok/util.py	Wed Oct 30 22:00:59 2024 +0100
+++ b/auditok/util.py	Wed Oct 30 23:05:32 2024 +0100
@@ -324,7 +324,7 @@
     """
     A :class:`DataSource` implementation that reads from a string buffer.
 
-    Each call to :mrth:`read` returns one character from the buffer and advances
+    Each call to :meth:`read` returns one character from the buffer and advances
     by one position. When the end of the buffer is reached, :meth:`read` returns
     None.
 
--- a/doc/command_line_usage.rst	Wed Oct 30 22:00:59 2024 +0100
+++ b/doc/command_line_usage.rst	Wed Oct 30 23:05:32 2024 +0100
@@ -160,8 +160,8 @@
     auditok -o "{id}_{start:.3f}_{end:.3f}.wav"
 
 
-Save whole audio stream
------------------------
+Record the full audio stream
+----------------------------
 
 When reading audio data from the microphone, you may want to save it to disk.
 To do this, use the ``-O`` or ``--save-stream`` option:
@@ -173,14 +173,14 @@
 Note that this will work even if you read data from a file on disk.
 
 
-Join detected audio events with a silence of a given duration
--------------------------------------------------------------
+Join detected audio events, inserting a silence between them
+------------------------------------------------------------
 
 Sometimes, you may want to detect audio events while also
 creating a file that contains the same events with modified
 pause durations.
 
-To do this, use the ``-j`` or ``--join-detections`` option together
+To achieve this, use the ``-j`` or ``--join-detections`` option together
 with the ``-O`` / ``--save-stream`` option. In the example below, we
 read data from `input.wav` and save audio events to `output.wav`, adding
 1-second pauses between them:
--- a/doc/conf.py	Wed Oct 30 22:00:59 2024 +0100
+++ b/doc/conf.py	Wed Oct 30 23:05:32 2024 +0100
@@ -13,9 +13,9 @@
 # serve to show the default.
 
 import ast
-import os
 import re
 import sys
+from datetime import datetime
 
 # 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
@@ -63,7 +63,7 @@
 
 # General information about the project.
 project = "auditok"
-copyright = "2015-2024, Amine Sehili"
+copyright = f"2015-{datetime.now().year}, Amine Sehili"
 author = "Amine Sehili"
 
 # The version info for the project you're documenting, acts as replacement for
@@ -80,7 +80,7 @@
 #
 # This is also used if you do content translation via gettext catalogs.
 # Usually you set "language" from the command line for these cases.
-language = None
+language = "en"
 
 # There are two options for replacing |today|: either, you set today to some
 # non-false value, then it is used:
@@ -108,7 +108,7 @@
 # show_authors = False
 
 # The name of the Pygments (syntax highlighting) style to use.
-pygments_style = "sphinx"
+pygments_style = "native"
 
 # A list of ignored prefixes for module index sorting.
 # modindex_common_prefix = []
@@ -124,16 +124,9 @@
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
-# html_theme = 'sphinxdoc'
+html_theme = "sphinx_rtd_theme"
 
 
-# on_rtd is whether we are on readthedocs.org
-on_rtd = os.environ.get("READTHEDOCS", None) == "True"
-if not on_rtd:  # only import and set the theme if we're building docs locally
-    import sphinx_rtd_theme
-
-    html_theme = "sphinx_rtd_theme"
-    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
 html_theme_options = {
     "logo_only": True,
     "style_nav_header_background": "#000000",
--- a/doc/index.rst	Wed Oct 30 22:00:59 2024 +0100
+++ b/doc/index.rst	Wed Oct 30 23:05:32 2024 +0100
@@ -11,7 +11,7 @@
 
 
 
-```auditok`` is an **Audio Activity Detection** tool that processes online data
+``auditok`` is an **Audio Activity Detection** tool that processes online data
 (from an audio device or standard input) and audio files. It can be used via the command line or through its API.
 
 Full documentation is available on `Read the Docs <https://auditok.readthedocs.io/en/latest/>`_.