auto
     ˆÁÀƒh¹¿¾  +   ˆl–Ü4ý() v( õõÀ»q¡)‹FÿÁƒ­¿_‡I|¥ŠèªÁÀ      000000d0
 ß    :mod:`sndhdr` --- Determine type of sound file
==============================================

.. module:: sndhdr
   :synopsis: Determine type of a sound file.
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. Based on comments in the module source file.

.. index::
   single: A-LAW
   single: u-LAW

**Source code:** :source:`Lib/sndhdr.py`

--------------

The :mod:`sndhdr` provides utility functions which attempt to determine the type
of sound data which is in a file.  When these functions are able to determine
what type of sound data is stored in a file, they return a tuple ``(type,
sampling_rate, channels, frames, bits_per_sample)``.  The value for *type*
indicates the data type and will be one of the strings ``'aifc'``, ``'aiff'``,
``'au'``, ``'hcom'``, ``'sndr'``, ``'sndt'``, ``'voc'``, ``'wav'``, ``'8svx'``,
``'sb'``, ``'ub'``, or ``'ul'``.  The *sampling_rate* will be either the actual
value or ``0`` if unknown or difficult to decode.  Similarly, *channels* will be
either the number of channels or ``0`` if it cannot be determined or if the
value is difficult to decode.  The value for *frames* will be either the number
of frames or ``-1``.  The last item in the tuple, *bits_per_sample*, will either
be the sample size in bits or ``'A'`` for A-LAW or ``'U'`` for u-LAW.


.. function:: what(filename)

   Determines the type of sound data stored in the file *filename* using
   :func:`whathdr`.  If it succeeds, returns a tuple as described above, otherwise
   ``None`` is returned.


.. function:: whathdr(filename)

   Determines the type of sound data stored in a file based on the file  header.
   The name of the file is given by *filename*.  This function returns a tuple as
   described above on success, or ``None``.

  "   ˆl–Ãa¾”J_)â€À?pO©‹FÿÃƒh¹ÂÁ      DRIVER=processor
MODALIAS=cpu:type:x86,ven0000fam0006mod0055:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000B,000C,000D,000E,000F,0010,0011,0013,0017,0018,0019,001A,002B,0034,003A,003B,003D,0068,006F,0070,0072,0074,0075,0079,007F,0080,0081,0089,008C,008D,0091,0093,0094,0095,0096,0097,0098,0099,009A,009B,009C,009D,009E,009F,00C0,00C5,00C8,00E7,00EB,00EC,00ED,00F0,00F1,00F3,00F5,00F9,00FA,00FD,00FF,0114,0115,0120,0123,0124,0125,0127,0128,0129,012A,012B,012E,0130,0131,0132,0133,0134,0138,013C,013E,013F,0140,0141,0142,0165,024A,025A,025F,0282,02A1,02A4

     	ˆ¾Ãƒh¹ÂÁ      	DRIVER=processor
MODALIAS=cpu:type:x86,ven0000fam0006mod0055:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000B,000C,000D,000E,000F,0010,0011,0013,0017,0018,0019,001A,002B,0034,003A,003B,003D,0068,006F,0070,0072,0074,0075,0079,007F,0080,0081,0089,008C,008D,0091,0093,0094,0095,0096,0097,0098,0099,009A,009B,009C,009D,009E,009F,00C0,00C5,00C8,00E7,00EB,00EC,00ED,00F0,00F1,00F3,00F5,00F9,00FA,00FD,00FF,0114,0115,0120,0123,0124,0125,0127,0128,0129,012A,012B,012E,0130,0131,0132,0133,0134,0138,013C,013E,013F,0140,0141,0142,0165,024A,025A,025F,0282,02A1,02A4

  "   ˆl–Ãa¾”J_)â€Æ�q ©‹FÿÄƒh¹ÃÂ      1
     ˆ¿Äƒh¹ÃÂ      DRIVER=processor
MODALIAS=cpu:type:x86,ven0000fam0006mod0055:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000B,000C,000D,000E,000F,0010,0011,0013,0017,0018,0019,001A,002B,0034,003A,003B,003D,0068,006F,0070,0072,0074,0075,0079,007F,0080,0081,0089,008C,008D,0091,0093,0094,0095,0096,0097,0098,0099,009A,009B,009C,009D,009E,009F,00C0,00C5,00C8,00E7,00EB,00EC,00ED,00F0,00F1,00F3,00F5,00F9,00FA,00FD,00FF,0114,0115,0120,0123,0124,0125,0127,0128,0129,012A,012B,012E,0130,0131,0132,0133,0134,0138,013C,013E,013F,0140,0141,0142,0165,024A,025A,025F,0282,02A1,02A4

     ˆ¾Äƒh¹ÃÂ      DRIVER=processor
MODALIAS=cpu:type:x86,ven0000fam0006mod0055:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000B,000C,000D,000E,000F,0010,0011,0013,0017,0018,0019,001A,002B,0034,003A,003B,003D,0068,006F,0070,0072,0074,0075,0079,007F,0080,0081,0089,008C,008D,0091,0093,0094,0095,0096,0097,0098,0099,009A,009B,009C,00