Commit ef1ba56f authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Adopt :autosummary: to multiple modules (#2664)

Summary:
Adopt `:autosummary:` to various modules

    * torchaudio.compliance.kaldi
    * torchaudio.sox_effects
    * torchaudio.utils

Pull Request resolved: https://github.com/pytorch/audio/pull/2664

Reviewed By: nateanl

Differential Revision: D39841873

Pulled By: mthrok

fbshipit-source-id: ff4fa6976324fca5f35b737b715f976e2a722bac
parent 6db69ef9
..
autogenerated from source/_templates/autosummary/utils.rst
.. py:module:: {{ fullname }}
{{ name | underline }}
.. automodule:: {{fullname}}
:noindex:
.. currentmodule:: {{ fullname }}
{%- for func in functions %}
{{ func | underline("-") }}
.. autofunction:: {{ func }}
{%- endfor %}
...@@ -12,8 +12,8 @@ Overview ...@@ -12,8 +12,8 @@ Overview
There are currently four implementations available. There are currently four implementations available.
* :ref:`"sox_io" <sox_io_backend>` (default on Linux/macOS) * :py:mod:`"sox_io" <torchaudio.backends.sox_io_backend>` (default on Linux/macOS)
* :ref:`"soundfile" <soundfile_backend>` (default on Windows) * :py:mod:`"soundfile" <torchaudio.backends.soundfile_backend>` (default on Windows)
.. note:: .. note::
Instead of calling functions in ``torchaudio.backend`` directly, please use ``torchaudio.info``, ``torchaudio.load``, and ``torchaudio.save`` with proper backend set with :func:`torchaudio.set_audio_backend`. Instead of calling functions in ``torchaudio.backend`` directly, please use ``torchaudio.info``, ``torchaudio.load``, and ``torchaudio.save`` with proper backend set with :func:`torchaudio.set_audio_backend`.
...@@ -35,7 +35,7 @@ AudioMetaData ...@@ -35,7 +35,7 @@ AudioMetaData
.. autoclass:: torchaudio.backend.common.AudioMetaData .. autoclass:: torchaudio.backend.common.AudioMetaData
.. _sox_io_backend: .. py:module:: torchaudio.backend.sox_io_backend
Sox IO Backend Sox IO Backend
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
...@@ -65,7 +65,7 @@ save ...@@ -65,7 +65,7 @@ save
.. autofunction:: torchaudio.backend.sox_io_backend.save .. autofunction:: torchaudio.backend.sox_io_backend.save
.. _soundfile_backend: .. py:module:: torchaudio.backend.soundfile_backend
Soundfile Backend Soundfile Backend
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
......
.. role:: hidden .. py:module:: torchaudio.compliance.kaldi
:class: hidden-section
torchaudio.compliance.kaldi torchaudio.compliance.kaldi
============================ ===========================
.. currentmodule:: torchaudio.compliance.kaldi .. currentmodule:: torchaudio.compliance.kaldi
.. py:module:: torchaudio.compliance.kaldi
The useful processing operations of kaldi_ can be performed with torchaudio. The useful processing operations of kaldi_ can be performed with torchaudio.
Various functions with identical parameters are given so that torchaudio can Various functions with identical parameters are given so that torchaudio can
produce similar outputs. produce similar outputs.
.. _kaldi: https://github.com/kaldi-asr/kaldi .. _kaldi: https://github.com/kaldi-asr/kaldi
Functions .. autosummary::
--------- :toctree: generated
:nosignatures:
:hidden:`spectrogram`
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: spectrogram
:hidden:`fbank`
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: fbank
:hidden:`mfcc`
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: mfcc spectrogram
fbank
mfcc
.. _sox_effects: .. py:module:: torchaudio.sox_effects
torchaudio.sox_effects torchaudio.sox_effects
====================== ======================
.. py:module:: torchaudio.sox_effects
.. currentmodule:: torchaudio.sox_effects .. currentmodule:: torchaudio.sox_effects
Resource initialization / shutdown
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: init_sox_effects
.. autofunction:: shutdown_sox_effects
Listing supported effects
~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: effect_names
Applying effects Applying effects
~~~~~~~~~~~~~~~~ ----------------
Apply SoX effects chain on torch.Tensor or on file and load as torch.Tensor. Apply SoX effects chain on torch.Tensor or on file and load as torch.Tensor.
Applying effects on Tensor .. autosummary::
-------------------------- :toctree: generated
:nosignatures:
apply_effects_tensor
apply_effects_file
.. autofunction:: apply_effects_tensor .. minigallery:: torchaudio.sox_effects.apply_effects_tensor
Utilities
---------
Applying effects on file .. autosummary::
------------------------ :toctree: generated
:nosignatures:
.. autofunction:: apply_effects_file init_sox_effects
shutdown_sox_effects
effect_names
torchaudio.utils
================
.. py:module:: torchaudio.utils .. py:module:: torchaudio.utils
torchaudio.utils.sox_utils torchaudio.utils
~~~~~~~~~~~~~~~~~~~~~~~~~~ ================
Utility module to configure libsox.
This affects functionalities in :ref:`Sox IO backend<sox_io_backend>` and :ref:`Sox Effects<sox_effects>`.
.. automodule:: torchaudio.utils.sox_utils ``torchaudio.utils`` module contains utility functions to configure the global state of third party libraries.
:members:
torchaudio.utils.ffmpeg_utils .. currentmodule:: torchaudio.utils
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utility module to configure FFmpeg libraries. .. autosummary::
:toctree: generated
:nosignatures:
:template: autosummary/utils.rst
.. automodule:: torchaudio.utils.ffmpeg_utils sox_utils
:members: ffmpeg_utils
class AudioMetaData: class AudioMetaData:
"""Return type of ``torchaudio.info`` function. """Return type of ``torchaudio.info`` function.
This class is used by :ref:`"sox_io" backend<sox_io_backend>` and This class is used by :py:mod:`"sox_io" backend<torchaudio.backends.sox_io_backend>` and
:ref:`"soundfile" backend with the new interface<soundfile_backend>`. :py:mod:`"soundfile" backend<torchaudio.backends.soundfile_backend>`.
:ivar int sample_rate: Sample rate :ivar int sample_rate: Sample rate
:ivar int num_frames: The number of frames :ivar int num_frames: The number of frames
......
"""Module to change the configuration of FFmpeg libraries (such as libavformat).
It affects functionalities in :py:mod:`torchaudio.io` (and indirectly :py:func:`torchaudio.load`).
"""
from typing import Dict, Tuple from typing import Dict, Tuple
import torch import torch
......
"""Module to change the configuration of libsox, which is used by I/O functions like
:py:mod:`~torchaudio.backend.sox_io_backend` and :py:mod:`~torchaudio.sox_effects`.
"""
from typing import Dict, List from typing import Dict, List
import torch import torch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment