<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](ossaudiodev.xhtml "ossaudiodev --- Access to OSS-compatible audio devices") | - [上一頁](imghdr.xhtml "imghdr --- 推測圖像類型") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 標準庫](index.xhtml) ? - [多媒體服務](mm.xhtml) ? - $('.inline-search').show(0); | # [`sndhdr`](#module-sndhdr "sndhdr: Determine type of a sound file.") --- 推測聲音文件的類型 **源代碼** [Lib/sndhdr.py](https://github.com/python/cpython/tree/3.7/Lib/sndhdr.py) \[https://github.com/python/cpython/tree/3.7/Lib/sndhdr.py\] - - - - - - [`sndhdr`](#module-sndhdr "sndhdr: Determine type of a sound file.") 提供了企圖猜測文件中的聲音數據類型的功能函數。當這些函數可以推測出存儲在文件中的聲音數據的類型是,它們返回一個 [`collections.namedtuple()`](collections.xhtml#collections.namedtuple "collections.namedtuple"),包含了五種屬性:(`filetype`, `framerate`, `nchannels`, `nframes`, `sampwidth`)。這些 *type* 的值表示數據的類型,會是以下字符串之一: `'aifc'`, `'aiff'`, `'au'`, `'hcom'`, `'sndr'`, `'sndt'`, `'voc'`, `'wav'`, `'8svx'`, `'sb'`, `'ub'`, or `'ul'` 。 *sampling\_rate* 可能是實際值或者當未知或者難以解碼時的 `0`。類似的, *channels* 也會返回實際值或者在無法推測或者難以解碼時返回 `0`。 *frames* 則是實際值或 `-1`。 元組的最后一項, *bits\_per\_sample* 將會為比特表示的 sample 大小或者 A-LAW 時為 `'A'`, u-LAW 時為 `'U'`。 `sndhdr.``what`(*filename*)使用 [`whathdr()`](#sndhdr.whathdr "sndhdr.whathdr") 推測存儲在 *filename* 文件中的聲音數據的類型。如果成功,返回上述的命名元組,否則返回 `None`。 在 3.5 版更改: 將結果從元組改為命名元組。 `sndhdr.``whathdr`(*filename*)基于文件頭推測存儲在文件中的聲音數據類型。文件名由 *filename* 給出。這個函數在成功時返回上述命名元組,或者在失敗時返回 `None`。 在 3.5 版更改: 將結果從元組改為命名元組。 ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](ossaudiodev.xhtml "ossaudiodev --- Access to OSS-compatible audio devices") | - [上一頁](imghdr.xhtml "imghdr --- 推測圖像類型") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 標準庫](index.xhtml) ? - [多媒體服務](mm.xhtml) ? - $('.inline-search').show(0); | ? [版權所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 軟件基金會是一個非盈利組織。 [請捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [發現了問題](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 創建。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看