This repository has been archived by the owner on Feb 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ioformats.html
297 lines (276 loc) · 26.6 KB
/
ioformats.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Advanced I/O Use Cases — librosa 0.9.1 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/plot_directive.css" type="text/css" />
<link rel="stylesheet" href="_static/sg_gallery.css" type="text/css" />
<link rel="stylesheet" href="_static/sg_gallery-binder.css" type="text/css" />
<link rel="stylesheet" href="_static/sg_gallery-dataframe.css" type="text/css" />
<link rel="stylesheet" href="_static/sg_gallery-rendered-html.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Advanced examples" href="advanced.html" />
<link rel="prev" title="Caching" href="cache.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: white" >
<a href="index.html">
<img src="_static/librosa_logo_text.svg" class="logo" alt="Logo"/>
</a>
<div class="version">
0.9.1
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Getting started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation instructions</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">API documentation</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="core.html">Core IO and DSP</a></li>
<li class="toctree-l1"><a class="reference internal" href="display.html">Display</a></li>
<li class="toctree-l1"><a class="reference internal" href="feature.html">Feature extraction</a></li>
<li class="toctree-l1"><a class="reference internal" href="onset.html">Onset detection</a></li>
<li class="toctree-l1"><a class="reference internal" href="beat.html">Beat and tempo</a></li>
<li class="toctree-l1"><a class="reference internal" href="decompose.html">Spectrogram decomposition</a></li>
<li class="toctree-l1"><a class="reference internal" href="effects.html">Effects</a></li>
<li class="toctree-l1"><a class="reference internal" href="segment.html">Temporal segmentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="sequence.html">Sequential modeling</a></li>
<li class="toctree-l1"><a class="reference internal" href="util.html">Utilities</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Advanced topics</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="multichannel.html">Multi-channel</a></li>
<li class="toctree-l1"><a class="reference internal" href="filters.html">Filters</a></li>
<li class="toctree-l1"><a class="reference internal" href="cache.html">Caching</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Advanced I/O Use Cases</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#read-specific-formats">Read specific formats</a></li>
<li class="toctree-l2"><a class="reference internal" href="#blockwise-reading">Blockwise Reading</a></li>
<li class="toctree-l2"><a class="reference internal" href="#read-file-like-objects">Read file-like objects</a></li>
<li class="toctree-l2"><a class="reference internal" href="#write-out-audio-files">Write out audio files</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="advanced.html">Advanced examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="recordings.html">Example files</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a></li>
<li class="toctree-l1"><a class="reference internal" href="genindex.html">Index</a></li>
<li class="toctree-l1"><a class="reference internal" href="glossary.html">Glossary</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" style="background: white" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">librosa</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> »</li>
<li>Advanced I/O Use Cases</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/ioformats.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="advanced-i-o-use-cases">
<span id="ioformats"></span><h1>Advanced I/O Use Cases<a class="headerlink" href="#advanced-i-o-use-cases" title="Permalink to this headline">¶</a></h1>
<p>This section covers advanced use cases for input and output which go beyond the I/O
functionality currently provided by <em>librosa</em>.</p>
<section id="read-specific-formats">
<h2>Read specific formats<a class="headerlink" href="#read-specific-formats" title="Permalink to this headline">¶</a></h2>
<p><em>librosa</em> uses <a class="reference external" href="https://github.com/bastibe/PySoundFile">soundfile</a> and <a class="reference external" href="https://github.com/sampsyo/audioread">audioread</a> for reading audio.
As of v0.7, librosa uses <a class="reference external" href="https://pysoundfile.readthedocs.io/en/latest/index.html#module-soundfile" title="(in PySoundFile)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">soundfile</span></code></a> by default, and falls back on <code class="xref py py-obj docutils literal notranslate"><span class="pre">audioread</span></code> only when dealing with codecs unsupported by <a class="reference external" href="https://pysoundfile.readthedocs.io/en/latest/index.html#module-soundfile" title="(in PySoundFile)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">soundfile</span></code></a> (notably, MP3, and some variants of WAV).
For a list of codecs supported by <a class="reference external" href="https://pysoundfile.readthedocs.io/en/latest/index.html#module-soundfile" title="(in PySoundFile)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">soundfile</span></code></a>, see the <em>libsndfile</em> <a class="reference external" href="http://www.mega-nerd.com/libsndfile/">documentation</a>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>See installation instruction for PySoundFile <a class="reference external" href="http://pysoundfile.readthedocs.io">here</a>.</p>
</div>
<p>Librosa’s load function is meant for the common case where you want to load an entire (fragment of a) recording into memory, but some applications require more flexibility.
In these cases, we recommend using <a class="reference external" href="https://pysoundfile.readthedocs.io/en/latest/index.html#module-soundfile" title="(in PySoundFile)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">soundfile</span></code></a> directly.
Reading audio files using <a class="reference external" href="https://pysoundfile.readthedocs.io/en/latest/index.html#module-soundfile" title="(in PySoundFile)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">soundfile</span></code></a> is similar to the method in <em>librosa</em>. One important difference is that the read data is of shape <em class="xref py py-obj">(nb_samples, nb_channels)</em> compared to <em class="xref py py-obj">(nb_channels, nb_samples)</em> in <code class="xref py py-func docutils literal notranslate"><span class="pre">librosa.core.load</span></code>. Also the signal is not resampled to 22050 Hz by default, hence it would need be transposed and resampled for further processing in <em>librosa</em>. The following example is equivalent to <em class="xref py py-obj">librosa.load(librosa.util.ex(‘trumpet’))</em>:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="kn">import</span> <span class="nn">librosa</span>
<span class="linenos">2</span><span class="kn">import</span> <span class="nn">soundfile</span> <span class="k">as</span> <span class="nn">sf</span>
<span class="linenos">3</span>
<span class="linenos">4</span><span class="c1"># Get example audio file</span>
<span class="linenos">5</span><span class="n">filename</span> <span class="o">=</span> <span class="n">librosa</span><span class="o">.</span><span class="n">ex</span><span class="p">(</span><span class="s1">'trumpet'</span><span class="p">)</span>
<span class="linenos">6</span>
<span class="linenos">7</span><span class="n">data</span><span class="p">,</span> <span class="n">samplerate</span> <span class="o">=</span> <span class="n">sf</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="s1">'float32'</span><span class="p">)</span>
<span class="linenos">8</span><span class="n">data</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">T</span>
<span class="linenos">9</span><span class="n">data_22k</span> <span class="o">=</span> <span class="n">librosa</span><span class="o">.</span><span class="n">resample</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">samplerate</span><span class="p">,</span> <span class="mi">22050</span><span class="p">)</span>
</pre></div>
</div>
</section>
<section id="blockwise-reading">
<h2>Blockwise Reading<a class="headerlink" href="#blockwise-reading" title="Permalink to this headline">¶</a></h2>
<p>For large audio signals it could be beneficial to not load the whole audio file
into memory. Librosa 0.7 introduced a streaming interface, which can be used to
work on short fragments of audio sequentially. <a class="reference internal" href="generated/librosa.stream.html#librosa.stream" title="librosa.stream"><code class="xref py py-func docutils literal notranslate"><span class="pre">librosa.stream</span></code></a> cuts an input
file into <em>blocks</em> of audio, which correspond to a given number of <em>frames</em>,
which can be iterated over as in the following example:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="kn">import</span> <span class="nn">librosa</span>
<span class="linenos"> 2</span>
<span class="linenos"> 3</span><span class="n">sr</span> <span class="o">=</span> <span class="n">librosa</span><span class="o">.</span><span class="n">get_samplerate</span><span class="p">(</span><span class="s1">'/path/to/file.wav'</span><span class="p">)</span>
<span class="linenos"> 4</span>
<span class="linenos"> 5</span><span class="c1"># Set the frame parameters to be equivalent to the librosa defaults</span>
<span class="linenos"> 6</span><span class="c1"># in the file's native sampling rate</span>
<span class="linenos"> 7</span><span class="n">frame_length</span> <span class="o">=</span> <span class="p">(</span><span class="mi">2048</span> <span class="o">*</span> <span class="n">sr</span><span class="p">)</span> <span class="o">//</span> <span class="mi">22050</span>
<span class="linenos"> 8</span><span class="n">hop_length</span> <span class="o">=</span> <span class="p">(</span><span class="mi">512</span> <span class="o">*</span> <span class="n">sr</span><span class="p">)</span> <span class="o">//</span> <span class="mi">22050</span>
<span class="linenos"> 9</span>
<span class="linenos">10</span><span class="c1"># Stream the data, working on 128 frames at a time</span>
<span class="linenos">11</span><span class="n">stream</span> <span class="o">=</span> <span class="n">librosa</span><span class="o">.</span><span class="n">stream</span><span class="p">(</span><span class="s1">'path/to/file.wav'</span><span class="p">,</span>
<span class="linenos">12</span> <span class="n">block_length</span><span class="o">=</span><span class="mi">128</span><span class="p">,</span>
<span class="linenos">13</span> <span class="n">frame_length</span><span class="o">=</span><span class="n">frame_length</span><span class="p">,</span>
<span class="linenos">14</span> <span class="n">hop_length</span><span class="o">=</span><span class="n">hop_length</span><span class="p">)</span>
<span class="linenos">15</span>
<span class="linenos">16</span><span class="n">chromas</span> <span class="o">=</span> <span class="p">[]</span>
<span class="linenos">17</span><span class="k">for</span> <span class="n">y</span> <span class="ow">in</span> <span class="n">stream</span><span class="p">:</span>
<span class="linenos">18</span> <span class="n">chroma_block</span> <span class="o">=</span> <span class="n">librosa</span><span class="o">.</span><span class="n">feature</span><span class="o">.</span><span class="n">chroma_stft</span><span class="p">(</span><span class="n">y</span><span class="o">=</span><span class="n">y</span><span class="p">,</span> <span class="n">sr</span><span class="o">=</span><span class="n">sr</span><span class="p">,</span>
<span class="linenos">19</span> <span class="n">n_fft</span><span class="o">=</span><span class="n">frame_length</span><span class="p">,</span>
<span class="linenos">20</span> <span class="n">hop_length</span><span class="o">=</span><span class="n">hop_length</span><span class="p">,</span>
<span class="linenos">21</span> <span class="n">center</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="linenos">22</span> <span class="n">chromas</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">chromas</span><span class="p">)</span>
</pre></div>
</div>
<p>In this example, each audio fragment <code class="docutils literal notranslate"><span class="pre">y</span></code> will consist of 128 frames worth of samples,
or more specifically, <code class="docutils literal notranslate"><span class="pre">len(y)</span> <span class="pre">==</span> <span class="pre">frame_length</span> <span class="pre">+</span> <span class="pre">(block_length</span> <span class="pre">-</span> <span class="pre">1)</span> <span class="pre">*</span> <span class="pre">hop_length</span></code>.
Each fragment <code class="docutils literal notranslate"><span class="pre">y</span></code> will overlap with the subsequent fragment by <code class="docutils literal notranslate"><span class="pre">frame_length</span> <span class="pre">-</span> <span class="pre">hop_length</span></code>
samples, which ensures that stream processing will provide equivalent results to if the entire
sequence was processed in one step (assuming padding / centering is disabled).</p>
<p>For more details about the streaming interface, refer to <a class="reference internal" href="generated/librosa.stream.html#librosa.stream" title="librosa.stream"><code class="xref py py-func docutils literal notranslate"><span class="pre">librosa.stream</span></code></a>.</p>
</section>
<section id="read-file-like-objects">
<h2>Read file-like objects<a class="headerlink" href="#read-file-like-objects" title="Permalink to this headline">¶</a></h2>
<p>If you want to read audio from file-like objects (also called <em>virtual files</em>)
you can use <a class="reference external" href="https://pysoundfile.readthedocs.io/en/latest/index.html#module-soundfile" title="(in PySoundFile)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">soundfile</span></code></a> as well. (This will also work with <a class="reference internal" href="generated/librosa.load.html#librosa.load" title="librosa.load"><code class="xref py py-func docutils literal notranslate"><span class="pre">librosa.load</span></code></a> and <a class="reference internal" href="generated/librosa.stream.html#librosa.stream" title="librosa.stream"><code class="xref py py-func docutils literal notranslate"><span class="pre">librosa.stream</span></code></a>, provided
that the underlying codec is supported by <a class="reference external" href="https://pysoundfile.readthedocs.io/en/latest/index.html#module-soundfile" title="(in PySoundFile)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">soundfile</span></code></a>.)</p>
<p>E.g.: read files from zip compressed archives:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="kn">import</span> <span class="nn">zipfile</span> <span class="k">as</span> <span class="nn">zf</span>
<span class="linenos">2</span><span class="kn">import</span> <span class="nn">soundfile</span> <span class="k">as</span> <span class="nn">sf</span>
<span class="linenos">3</span><span class="kn">import</span> <span class="nn">io</span>
<span class="linenos">4</span>
<span class="linenos">5</span><span class="k">with</span> <span class="n">zf</span><span class="o">.</span><span class="n">ZipFile</span><span class="p">(</span><span class="s1">'test.zip'</span><span class="p">)</span> <span class="k">as</span> <span class="n">myzip</span><span class="p">:</span>
<span class="linenos">6</span> <span class="k">with</span> <span class="n">myzip</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">'stereo_file.wav'</span><span class="p">)</span> <span class="k">as</span> <span class="n">myfile</span><span class="p">:</span>
<span class="linenos">7</span> <span class="n">tmp</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">BytesIO</span><span class="p">(</span><span class="n">myfile</span><span class="o">.</span><span class="n">read</span><span class="p">())</span>
<span class="linenos">8</span> <span class="n">data</span><span class="p">,</span> <span class="n">samplerate</span> <span class="o">=</span> <span class="n">sf</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="n">tmp</span><span class="p">)</span>
</pre></div>
</div>
<p>Download and read from URL:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="kn">import</span> <span class="nn">soundfile</span> <span class="k">as</span> <span class="nn">sf</span>
<span class="linenos">2</span><span class="kn">import</span> <span class="nn">io</span>
<span class="linenos">3</span>
<span class="linenos">4</span><span class="kn">from</span> <span class="nn">six.moves.urllib.request</span> <span class="kn">import</span> <span class="n">urlopen</span>
<span class="linenos">5</span>
<span class="linenos">6</span><span class="n">url</span> <span class="o">=</span> <span class="s2">"https://raw.githubusercontent.com/librosa/librosa/master/tests/data/test1_44100.wav"</span>
<span class="linenos">7</span>
<span class="linenos">8</span><span class="n">data</span><span class="p">,</span> <span class="n">samplerate</span> <span class="o">=</span> <span class="n">sf</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="n">io</span><span class="o">.</span><span class="n">BytesIO</span><span class="p">(</span><span class="n">urlopen</span><span class="p">(</span><span class="n">url</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">()))</span>
</pre></div>
</div>
</section>
<section id="write-out-audio-files">
<h2>Write out audio files<a class="headerlink" href="#write-out-audio-files" title="Permalink to this headline">¶</a></h2>
<p><a class="reference external" href="https://pysoundfile.readthedocs.io/en/latest/">PySoundFile</a> provides output functionality that can be used directly with numpy array audio buffers:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="linenos"> 2</span><span class="kn">import</span> <span class="nn">soundfile</span> <span class="k">as</span> <span class="nn">sf</span>
<span class="linenos"> 3</span>
<span class="linenos"> 4</span><span class="n">rate</span> <span class="o">=</span> <span class="mi">44100</span>
<span class="linenos"> 5</span><span class="n">data</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="p">(</span><span class="n">rate</span> <span class="o">*</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">2</span><span class="p">))</span>
<span class="linenos"> 6</span>
<span class="linenos"> 7</span><span class="c1"># Write out audio as 24bit PCM WAV</span>
<span class="linenos"> 8</span><span class="n">sf</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">'stereo_file.wav'</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">samplerate</span><span class="p">,</span> <span class="n">subtype</span><span class="o">=</span><span class="s1">'PCM_24'</span><span class="p">)</span>
<span class="linenos"> 9</span>
<span class="linenos">10</span><span class="c1"># Write out audio as 24bit Flac</span>
<span class="linenos">11</span><span class="n">sf</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">'stereo_file.flac'</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">samplerate</span><span class="p">,</span> <span class="nb">format</span><span class="o">=</span><span class="s1">'flac'</span><span class="p">,</span> <span class="n">subtype</span><span class="o">=</span><span class="s1">'PCM_24'</span><span class="p">)</span>
<span class="linenos">12</span>
<span class="linenos">13</span><span class="c1"># Write out audio as 16bit OGG</span>
<span class="linenos">14</span><span class="n">sf</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">'stereo_file.ogg'</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">samplerate</span><span class="p">,</span> <span class="nb">format</span><span class="o">=</span><span class="s1">'ogg'</span><span class="p">,</span> <span class="n">subtype</span><span class="o">=</span><span class="s1">'vorbis'</span><span class="p">)</span>
</pre></div>
</div>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="cache.html" class="btn btn-neutral float-left" title="Caching" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="advanced.html" class="btn btn-neutral float-right" title="Advanced examples" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright 2013--2022, librosa development team.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Other Versions</span>
v: 0.9.1
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>Releases</dt>
<dd><a href="../0.7.2/ioformats.html">0.7.2</a></dd>
<dd><a href="../0.8.1/ioformats.html">0.8.1</a></dd>
<dd><a href="../0.9.0/ioformats.html">0.9.0</a></dd>
<dd><a href="ioformats.html">0.9.1</a></dd>
</dl>
<dl>
<dt>Development versions</dt>
<dd><a href="../main/ioformats.html">main</a></dd>
</dl>
</div>
</div><script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<!-- Theme Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-171031946-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-171031946-1', {
'anonymize_ip': false,
});
</script>
</body>
</html>