{
    "content": [
        {
            "type": "text",
            "text": "# audioop (pydoc)\n\n**Summary:** audioop\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **MODULE REFERENCE** (8 lines)\n- **CLASSES** (3 lines) — 1 subsections\n  - class error (67 lines)\n- **FUNCTIONS** (1 lines) — 26 subsections\n  - add (2 lines)\n  - adpcm2lin (2 lines)\n  - alaw2lin (2 lines)\n  - avg (2 lines)\n  - avgpp (2 lines)\n  - bias (2 lines)\n  - byteswap (2 lines)\n  - cross (2 lines)\n  - findfactor (2 lines)\n  - findfit (2 lines)\n  - findmax (2 lines)\n  - getsample (2 lines)\n  - lin2adpcm (2 lines)\n  - lin2alaw (2 lines)\n  - lin2lin (2 lines)\n  - lin2ulaw (2 lines)\n  - max (2 lines)\n  - maxpp (2 lines)\n  - minmax (2 lines)\n  - mul (2 lines)\n  - ratecv (2 lines)\n  - reverse (2 lines)\n  - rms (2 lines)\n  - tomono (2 lines)\n  - tostereo (2 lines)\n  - ulaw2lin (2 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\naudioop\n\n### MODULE REFERENCE\n\nhttps://docs.python.org/3.10/library/audioop.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n\n### CLASSES\n\nbuiltins.Exception(builtins.BaseException)\nerror\n\n#### class error\n\n|  Method resolution order:\n|      error\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\n### FUNCTIONS\n\n#### add\n\nReturn a fragment which is the addition of the two samples passed as parameters.\n\n#### adpcm2lin\n\nDecode an Intel/DVI ADPCM coded fragment to a linear fragment.\n\n#### alaw2lin\n\nConvert sound fragments in a-LAW encoding to linearly encoded sound fragments.\n\n#### avg\n\nReturn the average over all samples in the fragment.\n\n#### avgpp\n\nReturn the average peak-peak value over all samples in the fragment.\n\n#### bias\n\nReturn a fragment that is the original fragment with a bias added to each sample.\n\n#### byteswap\n\nConvert big-endian samples to little-endian and vice versa.\n\n#### cross\n\nReturn the number of zero crossings in the fragment passed as an argument.\n\n#### findfactor\n\nReturn a factor F such that rms(add(fragment, mul(reference, -F))) is minimal.\n\n#### findfit\n\nTry to match reference as well as possible to a portion of fragment.\n\n#### findmax\n\nSearch fragment for a slice of specified number of samples with maximum energy.\n\n#### getsample\n\nReturn the value of sample index from the fragment.\n\n#### lin2adpcm\n\nConvert samples to 4 bit Intel/DVI ADPCM encoding.\n\n#### lin2alaw\n\nConvert samples in the audio fragment to a-LAW encoding.\n\n#### lin2lin\n\nConvert samples between 1-, 2-, 3- and 4-byte formats.\n\n#### lin2ulaw\n\nConvert samples in the audio fragment to u-LAW encoding.\n\n#### max\n\nReturn the maximum of the absolute value of all samples in a fragment.\n\n#### maxpp\n\nReturn the maximum peak-peak value in the sound fragment.\n\n#### minmax\n\nReturn the minimum and maximum values of all samples in the sound fragment.\n\n#### mul\n\nReturn a fragment that has all samples in the original fragment multiplied by the floating-point value factor.\n\n#### ratecv\n\nConvert the frame rate of the input fragment.\n\n#### reverse\n\nReverse the samples in a fragment and returns the modified fragment.\n\n#### rms\n\nReturn the root-mean-square of the fragment, i.e. sqrt(sum(Si^2)/n).\n\n#### tomono\n\nConvert a stereo fragment to a mono fragment.\n\n#### tostereo\n\nGenerate a stereo fragment from a mono fragment.\n\n#### ulaw2lin\n\nConvert sound fragments in u-LAW encoding to linearly encoded sound fragments.\n\n### FILE\n\n/usr/lib/python3.10/lib-dynload/audioop.cpython-310-x8664-linux-gnu.so\n\n"
        }
    ],
    "structuredContent": {
        "command": "audioop",
        "section": "",
        "mode": "pydoc",
        "summary": "audioop",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "MODULE REFERENCE",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "CLASSES",
                "lines": 3,
                "subsections": [
                    {
                        "name": "class error",
                        "lines": 67
                    }
                ]
            },
            {
                "name": "FUNCTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "add",
                        "lines": 2
                    },
                    {
                        "name": "adpcm2lin",
                        "lines": 2
                    },
                    {
                        "name": "alaw2lin",
                        "lines": 2
                    },
                    {
                        "name": "avg",
                        "lines": 2
                    },
                    {
                        "name": "avgpp",
                        "lines": 2
                    },
                    {
                        "name": "bias",
                        "lines": 2
                    },
                    {
                        "name": "byteswap",
                        "lines": 2
                    },
                    {
                        "name": "cross",
                        "lines": 2
                    },
                    {
                        "name": "findfactor",
                        "lines": 2
                    },
                    {
                        "name": "findfit",
                        "lines": 2
                    },
                    {
                        "name": "findmax",
                        "lines": 2
                    },
                    {
                        "name": "getsample",
                        "lines": 2
                    },
                    {
                        "name": "lin2adpcm",
                        "lines": 2
                    },
                    {
                        "name": "lin2alaw",
                        "lines": 2
                    },
                    {
                        "name": "lin2lin",
                        "lines": 2
                    },
                    {
                        "name": "lin2ulaw",
                        "lines": 2
                    },
                    {
                        "name": "max",
                        "lines": 2
                    },
                    {
                        "name": "maxpp",
                        "lines": 2
                    },
                    {
                        "name": "minmax",
                        "lines": 2
                    },
                    {
                        "name": "mul",
                        "lines": 2
                    },
                    {
                        "name": "ratecv",
                        "lines": 2
                    },
                    {
                        "name": "reverse",
                        "lines": 2
                    },
                    {
                        "name": "rms",
                        "lines": 2
                    },
                    {
                        "name": "tomono",
                        "lines": 2
                    },
                    {
                        "name": "tostereo",
                        "lines": 2
                    },
                    {
                        "name": "ulaw2lin",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}