{
    "content": [
        {
            "type": "text",
            "text": "# sndhdr (pydoc)\n\n**Summary:** sndhdr - Routines to help recognizing sound files.\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **MODULE REFERENCE** (8 lines)\n- **DESCRIPTION** (20 lines) — 1 subsections\n  - what (5 lines)\n- **FUNCTIONS** (1 lines) — 2 subsections\n  - what (2 lines)\n  - whathdr (2 lines)\n- **DATA** (2 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\nsndhdr - Routines to help recognizing sound files.\n\n### MODULE REFERENCE\n\nhttps://docs.python.org/3.10/library/sndhdr.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### DESCRIPTION\n\nFunction whathdr() recognizes various types of sound file headers.\nIt understands almost all headers that SOX can decode.\n\nThe return tuple contains the following items, in this order:\n- file type (as SOX understands it)\n- sampling rate (0 if unknown or hard to decode)\n- number of channels (0 if unknown or hard to decode)\n- number of frames in the file (-1 if unknown or hard to decode)\n- number of bits/sample, or 'U' for U-LAW, or 'A' for A-LAW\n\nIf the file doesn't have a recognizable type, it returns None.\nIf the file can't be opened, OSError is raised.\n\nTo compute the total time, divide the number of frames by the\nsampling rate (a frame contains a sample for each channel).\n\nFunction what() calls whathdr().  (It used to also use some\nheuristics for raw data, but this doesn't work very well.)\n\nFinally, the function test() is a simple main program that calls\n\n#### what\n\narguments it calls what() for all files in that directory.  Default\nargument is \".\" (testing all files in the current directory).  The\noption -r tells it to recurse down directories found inside\nexplicitly given directories.\n\n### FUNCTIONS\n\n#### what\n\nGuess the type of a sound file.\n\n#### whathdr\n\nRecognize sound headers.\n\n### DATA\n\nall = ['what', 'whathdr']\n\n### FILE\n\n/usr/lib/python3.10/sndhdr.py\n\n"
        }
    ],
    "structuredContent": {
        "command": "sndhdr",
        "section": "",
        "mode": "pydoc",
        "summary": "sndhdr - Routines to help recognizing sound files.",
        "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": "DESCRIPTION",
                "lines": 20,
                "subsections": [
                    {
                        "name": "what",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "FUNCTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "what",
                        "lines": 2
                    },
                    {
                        "name": "whathdr",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "DATA",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}