├── COPYING
├── README
├── README-codecs.txt
├── README-file-lists.txt
├── README-impulse-responses.txt
├── README-noise-db.txt
├── degrade-audio-list-safe-random.py
├── degrade-audio-safe-random.py
├── download-noise-db.py
├── freesound.py
├── impulse-responses-original
├── devices
│ ├── aaron-brown
│ │ ├── Behritone_ir_Recording.wav
│ │ ├── iPad_ir_Recording.wav
│ │ ├── iPhone_ir_Recording.wav
│ │ └── license.txt
│ ├── adventure-kid
│ │ ├── ak-spkrs
│ │ │ ├── 80sUk
│ │ │ │ ├── AK-SPKRS_80sUk_001.wav
│ │ │ │ └── AK-SPKRS_80sUk_002.wav
│ │ │ ├── 80sUs
│ │ │ │ ├── AK-SPKRS_80sUs_001.wav
│ │ │ │ └── AK-SPKRS_80sUs_002.wav
│ │ │ ├── AK-SPKRS_001.wav
│ │ │ ├── AK-SPKRS_002.wav
│ │ │ ├── AK-SPKRS_003.wav
│ │ │ ├── AK-SPKRS_004.wav
│ │ │ ├── AK-SPKRS_005.wav
│ │ │ ├── AK-SPKRS_006.wav
│ │ │ ├── AK-SPKRS_007.wav
│ │ │ ├── AK-SPKRS_008.wav
│ │ │ ├── AK-SPKRS_009.wav
│ │ │ ├── AK-SPKRS_010.wav
│ │ │ ├── AK-SPKRS_011.wav
│ │ │ ├── AK-SPKRS_012.wav
│ │ │ ├── AK-SPKRS_013.wav
│ │ │ ├── AK-SPKRS_014.wav
│ │ │ ├── AK-SPKRS_015.wav
│ │ │ ├── AK-SPKRS_016.wav
│ │ │ ├── AK-SPKRS_017.wav
│ │ │ ├── AK-SPKRS_018.wav
│ │ │ ├── AK-SPKRS_019.wav
│ │ │ ├── ModernUk
│ │ │ │ ├── AK-SPKRS_ModUk_001.wav
│ │ │ │ └── AK-SPKRS_ModUk_002.wav
│ │ │ ├── ModernUs
│ │ │ │ ├── AK-SPKRS_ModUs_001.wav
│ │ │ │ ├── AK-SPKRS_ModUs_002.wav
│ │ │ │ ├── AK-SPKRS_ModUs_003.wav
│ │ │ │ └── AK-SPKRS_ModUs_004.wav
│ │ │ ├── Radio
│ │ │ │ └── AK-SPKRS_Radio_001.wav
│ │ │ ├── Speaker
│ │ │ │ ├── AK-SPKRS_Speaker_001.wav
│ │ │ │ └── AK-SPKRS_Speaker_002.wav
│ │ │ ├── VintageUk
│ │ │ │ ├── AK-SPKRS_VinUk_001.wav
│ │ │ │ └── AK-SPKRS_VinUk_002.wav
│ │ │ └── VintageUs
│ │ │ │ ├── AK-SPKRS_VinUs_001.wav
│ │ │ │ └── AK-SPKRS_VinUs_002.wav
│ │ └── license.txt
│ ├── microphones
│ │ ├── Doremi_.wav
│ │ ├── Oktava_ML19.wav
│ │ ├── RCA_PB90.wav
│ │ ├── Reslo_RB250.wav
│ │ ├── Reslo_RB_RedLabel.wav
│ │ ├── Reslo_SR1.wav
│ │ ├── Sony_C37Fet.wav
│ │ └── license.txt
│ └── voxengo
│ │ └── IMreverbs4
│ │ ├── Direct Cabinet N1.wav
│ │ ├── Direct Cabinet N2.wav
│ │ ├── Direct Cabinet N3.wav
│ │ ├── Direct Cabinet N4.wav
│ │ └── license.txt
└── spaces
│ ├── large
│ ├── cksde
│ │ ├── belle hall 1.wav
│ │ ├── big room 1.wav
│ │ ├── bright lead vocal1.wav
│ │ ├── clear fluter hall 1.wav
│ │ ├── clear plate 1.wav
│ │ ├── densely plate 1.wav
│ │ ├── license.txt
│ │ ├── plate gated 1.wav
│ │ ├── plate medium 1.wav
│ │ └── smooth plate 1.wav
│ └── voxengo
│ │ ├── Conic Long Echo Hall.wav
│ │ ├── Deep Space.wav
│ │ ├── Derlon Sanctuary.wav
│ │ ├── Five Columns Long.wav
│ │ ├── Five Columns.wav
│ │ ├── Going Home.wav
│ │ ├── Greek 7 Echo Hall.wav
│ │ ├── Highly Damped Large Room.wav
│ │ ├── Large Bottle Hall.wav
│ │ ├── Large Long Echo Hall.wav
│ │ ├── Large Wide Echo Hall.wav
│ │ ├── Musikvereinsaal.wav
│ │ ├── Parking Garage.wav
│ │ ├── Rays.wav
│ │ ├── Right Glass Triangle.wav
│ │ ├── Scala Milan Opera Hall.wav
│ │ ├── St Nicolaes Church.wav
│ │ ├── Vocal Duo.wav
│ │ └── license.txt
│ ├── medium
│ ├── cksde
│ │ ├── brit. small 1.wav
│ │ ├── clean hall 1.wav
│ │ ├── license.txt
│ │ ├── slapy plate 1.wav
│ │ └── small bright plate 1.wav
│ └── voxengo
│ │ ├── French 18th Century Salon.wav
│ │ ├── In The Silo Revised.wav
│ │ ├── Masonic Lodge.wav
│ │ ├── Narrow Bumpy Space.wav
│ │ ├── Ruby Room.wav
│ │ └── license.txt
│ └── small
│ ├── adventure-kid
│ ├── ak-srooms
│ │ ├── AK-SROOMS_001.wav
│ │ ├── AK-SROOMS_006.wav
│ │ ├── AK-SROOMS_007.wav
│ │ └── AK-SROOMS_016.wav
│ └── license.txt
│ ├── cksde
│ ├── clear room 1.wav
│ ├── license.txt
│ ├── small place 6.wav
│ └── small room 3.wav
│ └── voxengo
│ ├── Block Inside.wav
│ ├── Bottle Hall.wav
│ ├── Cement Blocks 1.wav
│ ├── Cement Blocks 2.wav
│ ├── Nice Drum Room.wav
│ ├── Small Drum Room.wav
│ ├── Small Prehistoric Cave.wav
│ ├── Trig Room.wav
│ └── license.txt
├── noise-db.txt
├── prepare-impulse-responses.py
├── random
├── split-dev-train-test.py
├── test.list
└── train.list
/COPYING:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | This package provides scripts used to degrade audio files and download/install the required data and code.
2 |
3 | ===========
4 | CONTENTS
5 | ===========
6 |
7 | The contents of this package are
8 |
9 | - README : This file
10 |
11 | - README-noise-db.txt : Instructions to download and install noise database
12 |
13 | - README-impulse-responses.txt : Instructions to download and install impulse response database
14 |
15 | - README-codecs.txt : Instructions to download and install audio codecs
16 |
17 | - README-file-lists.txt : Instructions on how to generate dev, train and test data sets for the evaluation of speaker recognition systems on degraded speech. This data set requires access to the NIST Speaker Recognition Evaluation (SRE) 2010 data set.
18 |
19 | - download-noise-db.py : Script for downloading the noise database (see README-noise-db.txt)
20 |
21 | - noise-db.txt : List of noise file ids, tag and license for the noise database
22 |
23 | - freesound.py : Python API to the freesound.org service (online audio repository)
24 |
25 | - prepare-impulse-responses.py : Prepare and normalize impulse the packaged and downloaded impulses
26 |
27 | - impulse-responses-original : Directory containing distributable impulse responses
28 |
29 | - degrade-audio-list-safe-random.py : Degrades an audio file
30 |
31 | - degrade-audio-safe-random.py : Degrades a list of audio files under pre-specified degradation conditions (landline, cellular, satellite, interview, playback) along with noisy variants
32 |
33 | - split-dev-train-test.py : Script to split the generated noise file list into dev, train and test data sets
34 |
35 | - train.list : List of ID, file name and gender for the training data set (taken from the NIST SRE 2010 data)
36 |
37 | - test.list : List of ID, file name and gender for the test data set (taken from the NIST SRE 2010 data)
38 |
39 | - random : List of integer random numbers used to generate random numbers in a reproducible way across machines
40 |
41 | =============
42 | DESCRIPTION
43 | =============
44 |
45 | This acoustic simulator allows you to degrade clean audio recordings using a variety of algorithms and data. The simulator offers three main types of degradations:
46 |
47 | - Additive noise from a large collection of open-source real noise recordings of around 60 hours. The noise recordings have been manually assigned one out of the following categories: announcement, bable, crowd, impulsive, music, nature, outdoors, private, public, signaling, sport, transportation. The database must be downloaded from the www.freesound.org website using an API. Check the file README-noise-db.txt for details on how to download the data.
48 |
49 | - Open-source impulse responses sampled from real audio devices, loudspeakers, cabinets and smartphones on one side and rooms on the other side. 74 and 54 impulse responses are provided for devices and rooms respectively. The impulse responses are stored in .wav PCM format and have been manually categorized into directories under impulse-response-original. For the simulator to use these impulse responses they must be normalized and downsampled to 8kHz and 16kHz. Check README-impulse-responses.txt to generate these files as well as download missing files that could not be distributed as part of this package.
50 |
51 | - Speech and audio codecs, a total of 14 codecs for cellular and satellite telephony, voice over IP, and audio recorders. For licensing issues, the code for these codecs is not provided in this package, but download URLs together with code changes and compile instruccions are provided in README-codecs.txt . These should be stored the src directory. The supported codecs are ITU G.711, ITU G.726, ITU G.722, ITU G.728, ITU G.729a, ETSI AMR-NB, ETSI AMR-WB, ETSI GSM-FR, CVSD, Codec2, Skype SILK, Skype SILK-WB, Fraunhofer MP3, Fraunhofer AAC. Telephony band-pass filters G.712, P341, IRS and MIRS can be used in combination with narrow band codecs as well.
52 |
53 | - Noise reduction based on Wiener filtering (Qualcomm-ICSI-OGI) and amplitude normalization is also supported
54 |
55 | This package also includes a data set based on the NIST SRE 2010 data (not included) for the evaluation of speaker verification systems. Please read README-file-lists.txt for more information about how to corrupt these audio files so that results are comparable across research labs.
56 |
57 | =============
58 | BUG FIXES
59 | =============
60 |
61 | v0.2:
62 |
63 | - Fixed random number generator to choose from all elements in a list
64 |
65 | - Removed medium sized room impulse responses from interview condition. Only small room IR are now used.
66 |
67 |
68 | =============
69 | CONTACT
70 | =============
71 |
72 | Please report any issues to marc.ferras@idiap.ch .
73 |
--------------------------------------------------------------------------------
/README-codecs.txt:
--------------------------------------------------------------------------------
1 | Create and go to source directory
2 |
3 | mkdir src
4 | cd src
5 |
6 | 1. Download ITU Software Tools (STL2009)
7 |
8 | - Open a web browser and download/save this file (accept the untrusted certificate if asked)
9 |
10 | https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-G.191-201003-I!!SOFT-ZST-E&type=items
11 |
12 | - Decompress the downloaded file T-REC-G.191-201003-I!!SOFT-ZST-E.zip
13 |
14 | unzip ~/Downloads/T-REC-G.191-201003-I\!\!SOFT-ZST-E.zip
15 |
16 | This is going to create the Software/stl2009 directory.
17 |
18 | - Compilation
19 |
20 | - G.722 (sub-band ADPCM, VoIP)
21 |
22 | cd Software/stl2009/g722
23 | make -f makefile.unx
24 |
25 | - G.728 (low-delay CELP, videoconferencing)
26 |
27 | cd ../g728/g728fixed
28 | make -f makefile.unx
29 |
30 | - G.726 (mu/A-law + ADPCM)
31 |
32 | cd ../../g726
33 | make -f makefile.unx
34 |
35 | - G.711 (mu/A-law)
36 |
37 | cd ../g711
38 | make -f makefile.unx
39 |
40 | - Go back to src root dir
41 |
42 | cd ../../../
43 |
44 | 2. Download G.729 (low-delay CS-ACELP, satellite)
45 |
46 | - Open a web browser and download this file (accept the untrusted
47 | certificate if asked)
48 |
49 | http://www.itu.int/rec/T-REC-G.729-201206-I/en
50 |
51 | - Decompress the downloaded file T-REC-G.729-201206-I\!\!SOFT-ZST-E.zip
52 |
53 | unzip ~/Downloads/T-REC-G.729-201206-I\!\!SOFT-ZST-E.zip
54 |
55 | This is going to create the Software/G729_Release3 directory
56 |
57 | - Compilation
58 |
59 | cd Software/G729_Release3/g729AnnexA/c_code
60 |
61 | - Rename all files to lowercase
62 |
63 | for i in `ls` ; do mv -f "$i" `echo "$i" | tr A-Z a-z` ; done
64 |
65 | - Create Makefile and make both coder and decoder
66 |
67 | make -f coder.mak
68 | make -f decoder.mak
69 |
70 | - Go back to src root dir
71 |
72 | cd ../../../../
73 |
74 | 3. Filter and Add Noise tool (FaNT)
75 |
76 | - Download the package
77 |
78 | wget http://dnt.kr.hsnr.de/aurora/download/fant.tar.gz
79 |
80 | - Make dir, decompress and compile
81 |
82 | mkdir fant
83 | cd fant
84 | tar xzvf ../fant.tar.gz
85 | make -f filter_add_noise.make
86 |
87 | - Go back to src root dir
88 |
89 | cd ../
90 |
91 | 4. OPUS library (silk codec used by Skype)
92 |
93 | - Download the package
94 |
95 | wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz
96 |
97 | - Compile
98 |
99 | tar xzvf opus-1.1.tar.gz
100 | cd opus-1.1
101 | make -f Makefile.unix
102 |
103 | - Go back to src root dir
104 |
105 | cd ../
106 |
107 | 5. SOX (version 14.4.2, older versions might fail in some operations)
108 |
109 | - Download SOX package
110 |
111 | http://sourceforge.net/projects/sox/
112 |
113 | Click Download green button and wait for some seconds
114 |
115 | - Decompress the downloaded file sox-14.4.2.tar.bz2
116 |
117 | tar -xvjf ~/Downloads/sox-14.4.2.tar.bz2
118 |
119 | - Compilation
120 |
121 | cd sox-14.4.2
122 | ./configure --enable-static --disable-shared
123 | make
124 |
125 | - Go back to src root dir
126 |
127 | cd ../
128 |
129 | 6. FFMPEG (with MP3 and AAC support)
130 |
131 | - Download MMPEG package
132 |
133 | http://www.ffmpeg.org/download.html
134 |
135 | Click on green button.
136 |
137 | - Decompress the downloaded file ffmpeg-2.6.2.tar.bz2
138 |
139 | tar -xvjf ~/Downloads/ffmpeg-2.6.2.tar.bz2
140 |
141 | - Download LAME library for FFMPEG MP3 support
142 |
143 | http://sourceforge.net/projects/lame/files/lame/3.99/
144 |
145 | click on file lame-3.99.5.tar.gz and wait for a few seconds
146 |
147 | - Compile LAME library
148 |
149 | tar xzvf ~/Downloads/lame-3.99.5.tar.gz
150 | cd lame-3.99.5
151 | ./configure
152 | make
153 | sudo make install
154 | cd ../
155 |
156 | - Download aacplus library for FFMPEG AAC support
157 |
158 | wget http://tipok.org.ua/downloads/media/aacplus/libaacplus/libaacplus-2.0.2.tar.gz
159 |
160 | - Compile AAC library
161 |
162 | sudo apt-get install libtool
163 | tar xzvf libaacplus-2.0.2.tar.gz
164 | cd libaacplus-2.0.2
165 | ./autogen.sh --enable-shared --enable-static
166 | make
167 | sudo make install
168 | cd ../
169 |
170 | - Compile FFMPEG
171 |
172 | cd ffmpeg-2.6.2
173 | ./configure --enable-gpl --enable-libmp3lame --enable-nonfree --enable-libaacplus --disable-yasm
174 | make
175 | sudo make install
176 | cd ../
177 |
178 | 7. AMR-NB
179 |
180 | - Download AMR-NB package
181 |
182 | wget http://www.etsi.org/deliver/etsi_ts/126000_126099/126073/03.03.00_60/ts_126073v030300p0.zip
183 |
184 | - Decompress AMR-NB
185 |
186 | mkdir amr-nb
187 | cd amr-nb
188 | unzip ../ts_126073v030300p0.zip
189 |
190 | - Compile
191 |
192 | Change architecture. Add lines
193 |
194 | #define linux 1
195 | #define i386 1
196 |
197 | at the top of file typedefs.h .
198 |
199 | make -f makefile
200 |
201 |
202 | - Go back to src root dir
203 |
204 | cd ../
205 |
206 | 8. AMR-WB
207 |
208 | - Download AMR-WB package from
209 |
210 | http://www.itu.int/rec/T-REC-G.722.2-200811-I!AnnC
211 |
212 | - Decompress codec
213 |
214 | unzip ~/Downloads/T-REC-G.722.2-200811-I\!AnnC\!SOFT-ZST-E.zip
215 | cd G722-2AnxC-v.7.1.0/c-code-v.7.1.0
216 |
217 | Change architecture. Add lines
218 |
219 | #define linux 1
220 | #define i386 1
221 |
222 | at the top of file typedefs.h.
223 |
224 | make -f makefile.gcc
225 |
226 | cd ../../
227 |
228 | 8. Convert SPHERE files to wav
229 |
230 | - Download sph2pipe
231 |
232 | wget https://www.ldc.upenn.edu/sites/www.ldc.upenn.edu/files/ctools/sph2pipe_v2.5.tar.gz
233 |
234 | - Compile code
235 |
236 | tar xzvf sph2pipe_v2.5.tar.gz
237 | cd sph2pipe_v2.5
238 | gcc -o sph2pipe shorten_x.c file_headers.c sph2pipe.c -lm
239 |
240 | cd ../
241 |
242 | 9. Qualcomm-ICSI-OGI noise reduction
243 |
244 | - Download
245 |
246 | wget http://www.icsi.berkeley.edu/Speech/papers/qio/qio.zip
247 |
248 | - Decompress
249 |
250 | unzip qio.zip
251 | cd aurora-front-end/qio/src
252 | make
253 |
254 | cd ../../../
255 |
256 | 10. Codec2 (very low bit-rate coding)
257 |
258 | - Download
259 |
260 | svn co https://svn.code.sf.net/p/freetel/code/codec2 codec2
261 | cd codec2
262 | mkdir build_linux
263 | cd build_linux
264 | cmake ../
265 | make
266 | cd ../../
267 |
--------------------------------------------------------------------------------
/README-file-lists.txt:
--------------------------------------------------------------------------------
1 | ======================
2 | CLEAN SPEECH FILES
3 | ======================
4 |
5 | For reproducible evaluation of speaker recognition systems, we provide a list
6 | of clean files chosen from the NIST SRE 2010 data set. This data set:
7 |
8 | - 16ksps PCM format
9 | - 3-to-15 minute long interviews
10 | - Clean recordings using lavalier microphones
11 | - 361 speakers for each of the train and test sets
12 | - Each train file has at least one test case
13 |
14 | - train.list is a list of enrollment files, speaker ids and genders (m: male, f:
15 | female)
16 |
17 | - test.list is a list of test cases (2nd column), their speaker ids (1st column)
18 | and gender (3rd column)
19 |
20 | Note that filenames have a letter 'A' appended to them, indicating only the
21 | first audio channel needs to be extracted from the files.
22 |
23 | From these lists, you should prepare the corresponding lists of train and test files with
24 | absolute pathnames, i.e. pointing to the NIST SRE2010 audio files in your
25 | system. These file lists will be degraded under diverse acoustic conditions using
26 | the provided simulator.
27 |
28 | =========================================
29 | DEVELOPMENT, TRAIN AND TEST DATA SETS
30 | =========================================
31 | This package targets both the evaluation and development of robust speaker
32 | recognition systems. System development can be sensitive to the acoustic
33 | conditions included in the development set, that are also present in the
34 | train and test sets. We address this issue in two ways:
35 |
36 | - A large noise (~2000 files, 80h), impulse response (~120 device and space
37 | impulse responses) and codec (~12 speech and audio codecs) database. The
38 | rationale here is to be able to reproduce a very large number of
39 | combined degradation processes to promote good generalization of machine
40 | learning algorithms.
41 |
42 | - Split noise data into dev, train and test sets, to prevent overfitting
43 | of noise data. Still, we consider codecs and impulse responses as
44 | processes rather than data and, given the small number of them, we decided
45 | them to be shared across dev, train and test data sets.
46 |
47 | To build the degradation dev, train and test sets we first assign train noise
48 | files (361), then test files (644), keeping the rest for the development set
49 | (1016). To do so just run:
50 |
51 | ./split-dev-train-test.py noise-file-list.txt train.list test.list
52 |
53 | This will generate three files:
54 |
55 | noise-file-list-trn.txt
56 | noise-file-list-tst.txt
57 | noise-file-list-dev.txt
58 |
59 | These noise file lists will be used when degrading a list of clean speech
60 | files using the command
61 |
62 | ./degrade-audio-list-safe-random.py \
63 | -N noise-file-list-XXX.txt \
64 | -D ir-device-file-list.txt \
65 | -P ir-space-file-list.txt
66 | condition \
67 | file-list.txt \
68 | output-dir-XXX
69 |
70 | XXX: either 'trn','tst' or 'dev'
71 | condition:
72 | [landline|cellular|satellite|voip|playback|interview].[|noisy08|noisy15]
73 | file-list.txt: list of clean files to degrade (with absolute path)
74 | output-dir-XXX: output directory for the degraded audio files
75 |
76 | Note that 'safe-random' in the script name refers to reproducible random number generation across
77 | machines. This is simply implemented as a list of pregenerated integer random
78 | numbers in the file random. Please do not change the file 'random'.
79 |
--------------------------------------------------------------------------------
/README-impulse-responses.txt:
--------------------------------------------------------------------------------
1 | A collection of open-source impulse responses is available under
2 | impulse-reponses-original directory. Due to license details, these are
3 | provided in its original form. You can find a number of interesting device and
4 | space impulse responses on Fokke van Saane's page
5 |
6 | http://fokkie.home.xs4all.nl/IR.htm
7 |
8 | Due to licensing issues, we cannot redistribute them in this package, but here are
9 | the commands to be run to install those that we use in this package:
10 |
11 | # install fokke van saane's device IR
12 | cd impulse-responses-original/devices
13 | mkdir fokkevansaane
14 | cd fokkevansaane
15 | wget http://fokkie.home.xs4all.nl/Files/Speakers%20and%20telephones.zip
16 | unzip Speakers\ and\ telephones.zip
17 | cd ../../../
18 |
19 | # install fokke van saane's space IR
20 | cd impulse-responses-original/spaces/medium
21 | mkdir fokkevansaane
22 | cd fokkevansaane
23 | wget http://fokkie.home.xs4all.nl/Files/Church%20Schellingwoude.zip
24 | unzip Church\ Schellingwoude.zip
25 | cd ../../large
26 | mkdir fokkevansaane
27 | cd fokkevansaane
28 | wget http://fokkie.home.xs4all.nl/Files/Factory%20Hall.zip
29 | unzip Factory\ Hall.zip
30 | cd ../../../../
31 |
32 | It is only left to process the provided and downloaded IRs into the directory
33 | impulse-responses. This involves, format conversion, 8ksps/16ksps resampling
34 | and normalization. It also normalizes directory and file names
35 |
36 | You will need python installed and the following two packages
37 |
38 | scikits.audiolab
39 | scikits.samplerate
40 |
41 | Then, just run
42 |
43 | ./prepare-impulse-responses.py
44 |
45 | This is going to create a directory called 'impulse-responses' with the IRs
46 | ready to be processed by the script degrade-audio-safe-random.py
47 |
--------------------------------------------------------------------------------
/README-noise-db.txt:
--------------------------------------------------------------------------------
1 | The noise database consists of around 2000 noise files of 1 to 8 minutes long available online on the freesound.org website. The audio files are downloaded from the website via an API (freesound.py) and the whole process is automated by calling the script
2 |
3 | ./download-noise-db.py noise-db.txt
4 |
5 | noise-db.txt is a file consisting of the 2000 file ids together with a
6 | manually-tagged noise category and the license type. To run the script above
7 | you need to obtain a valid API key from
8 |
9 | http://www.freesound.org/apiv2/apply
10 |
11 | and replace the line
12 |
13 | apiKey=""
14 |
15 | by
16 |
17 | apiKey="YOUR_API_KEY"
18 |
19 | in line 13 of 'download-noise-db.py'
20 |
21 | Please note that download is limited to 2000 requests per day and you might
22 | need to run it twice to complete the 2021 noise files.
23 |
24 | This command will generate
25 |
26 | - noise-file-list.txt : list of 16ksps down-sampled files downloaded from
27 | freesound.org
28 | - noise-samples: directory where noise files were downloaded
29 |
--------------------------------------------------------------------------------
/degrade-audio-list-safe-random.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | #Copyright (c) 2015 Idiap Research Institute, http://www.idiap.ch/
4 | #Written by Marc Ferras ,
5 | #
6 | #This file is part of AcSim.
7 | #
8 | #AcSim is free software: you can redistribute it and/or modify
9 | #it under the terms of the GNU General Public License version 3 as
10 | #published by the Free Software Foundation.
11 | #
12 | #Foobar is distributed in the hope that it will be useful,
13 | #but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | #GNU General Public License for more details.
16 | #
17 | #You should have received a copy of the GNU General Public License
18 | #along with AcSim. If not, see .
19 |
20 |
21 | import random
22 | import sys
23 | import os
24 | import re
25 | import glob
26 | import argparse
27 | from argparse import RawTextHelpFormatter
28 | import signal
29 | from functools import partial
30 | #import random
31 |
32 |
33 | def initRandom (file, seed):
34 |
35 | global rnd
36 | global rndidx
37 |
38 | rndidx = 0
39 | rnd=[]
40 | with open(file,'r') as f:
41 | for l in f.readlines():
42 | rnd.append(l.strip())
43 |
44 | if seed == '' or seed =='0':
45 | rndidx=0
46 | else:
47 | rndidx=int(seed)
48 | if rndidx >= len(rnd):
49 | rndidx = rndidx % len(rnd)
50 |
51 | return (rnd)
52 |
53 | def getRandom(nvalues):
54 |
55 | global rndidx
56 | global rnd
57 |
58 | maxint=9223372036854775807
59 |
60 | out = int ( float(nvalues)*float(rnd[rndidx]) /float(maxint) )
61 |
62 | rndidx = rndidx + 1
63 | if rndidx==len(rnd):
64 | rndidx=0
65 |
66 | return out
67 |
68 | def listShuffle(l):
69 |
70 | global rnd
71 | global rndidx
72 |
73 | idx = range(0,len(l))
74 | idxp = list(idx)
75 | for i in idx:
76 | ri1 = getRandom(len(l))
77 | itmp = idxp[i]
78 | idxp[i] = idxp[ri1]
79 | idxp[ri1] = itmp
80 |
81 | l2 = [ l[i] for i in idxp ]
82 | return (l2)
83 |
84 | def randomChoice(l):
85 |
86 | global rnd
87 | global rndidx
88 |
89 | ri = getRandom(len(l))
90 | return l[ri]
91 |
92 | def sigint_handler (signum, frame):
93 | print 'captured!'
94 | sys.exit(1)
95 |
96 | def buildFileName (fileName,codecs):
97 |
98 | s = os.path.splitext(fileName)
99 | fileNoExt = s[0]
100 | ext=s[1]
101 |
102 | print ' '.join(codecs)
103 | codecs2=[]
104 | for c in codecs:
105 | if 'noise' in c:
106 | m=re.search(r'snr=([0-9]+)',c)
107 | if m:
108 | snr=m.group(1)
109 | c = 'noisy.snr' + snr
110 | else:
111 | c='noisy'
112 |
113 | codecs2.append(c)
114 |
115 | codecstr = '-'.join(codecs2)
116 | codecstr = re.sub('\|', '', codecstr)
117 | codecstr = re.sub('\\\\', '', codecstr)
118 | codecstr = re.sub('[\]=]', '', codecstr)
119 | codecstr = re.sub('[\[,]', '.', codecstr)
120 | codecstr = re.sub('/', '', codecstr)
121 |
122 | if len(codecs)>0:
123 | fileName = fileNoExt + '-' + codecstr + ext
124 | else:
125 | fileName = fileNoExt + ext
126 | return (fileName)
127 |
128 | def fileEmpty (fileName):
129 | if os.path.exists(fileName):
130 | if (os.path.getsize(fileName))<=2:
131 | return True
132 | else:
133 | return False
134 | else:
135 | return True
136 |
137 | parser = argparse.ArgumentParser(formatter_class=RawTextHelpFormatter)
138 | parser.add_argument("-s", dest="seed", default='0', help="Seed to initialize the random number generator")
139 | parser.add_argument('condition',nargs='?', help="Acoustic condition ([nocodec|landline|cellular|satellite|voip|interview|playback].[clean|noisy08|noisy15]")
140 | parser.add_argument("-D", dest="deviceirlist", default='ir-device-file-list.txt', help="Device impulse response file list")
141 | parser.add_argument("-P", dest="spaceirlist", default='ir-space-file-list.txt', help="Space impulse response file list")
142 | parser.add_argument("-N", dest="noiselist", default='noise-file-list.txt', help="Noise file list")
143 | parser.add_argument('filelist',nargs='?',help="File list to process")
144 | parser.add_argument('outdir',nargs='?')
145 | options = parser.parse_args()
146 |
147 | # initialize reproducible random number generator
148 | initRandom('random', options.seed)
149 |
150 |
151 | argcond=options.condition
152 | if argcond=='-':
153 | argcond='all'
154 | fileList=options.filelist
155 | outDir=options.outdir
156 |
157 |
158 | cmdFile='./degrade-audio-safe-random.py -D ' + options.deviceirlist + ' -P ' + options.spaceirlist + ' -N ' + options.noiselist
159 | #cmdFile=''
160 |
161 | signal.signal (signal.SIGINT,partial(sigint_handler))
162 |
163 |
164 | #if len(sys.argv)!=4:
165 | # print 'Syntax: create-degraded-speech-feats.py cond audio-file-list outdir'
166 | # exit()
167 |
168 | #argcond=sys.argv[1]
169 | #if argcond=='-':
170 | # argcond='all'
171 | #fileList = sys.argv[2]
172 | #outDir = sys.argv[3]
173 |
174 |
175 | noiseConditions = ['clean','ambience-babble', 'ambience-private', 'ambience-music', 'ambience-nature', 'ambience-transportation', 'ambience-outdoors', 'ambience-public', 'ambience-impulsive']
176 | codecConditions=['nocodec','landline','cellular','satellite','voip','interview','playback']
177 | #levels = [-26, -29, -32, -35] # dbFS
178 | #snrs = [25,20,15,10,5]
179 | #snrsHVAC=[25,20,15]
180 | levels = [-26, -29, -32, -35] # dbFS
181 | #snrs = [25,20,15,10]
182 | #snrsHVAC=[25,20,15]
183 | noiseTypes = ['ambience-babble', 'ambience-private', 'ambience-music', 'ambience-transportation', 'ambience-outdoors', 'ambience-public', 'ambience-impulsive']
184 |
185 | codecsLandline = ['g711','g726']
186 | codecsCellular = ['amr','amrwb','gsmfr']
187 | codecsSatellite = ['g728','c2','cvsd']
188 | codecsVoIP = ['silk','silkwb','g729a','g722']
189 | codecsInterview = ['mp3','aac']
190 | codecsPlayback = ['mp3','aac']
191 | codecsBPFilter = ['g711','g726','amr','gsmfr', 'g728']
192 |
193 | amrParms = ['amr[br=4k75]','amr[br=5k15]', 'amr[br=5k9]', 'amr[br=6k7]', \
194 | 'amr[br=7k4]', 'amr[br=7k95]', 'amr[br=10k2]', 'amr[br=12k2]', \
195 | 'amr[br=4k75,nodtx]','amr[br=5k9,nodtx]', 'amr[br=5k9,nodtx]', \
196 | 'amr[br=6k7,nodtx]', 'amr[br=7k4,nodtx]', 'amr[br=7k95,nodtx]', \
197 | 'amr[br=10k2,nodtx]']
198 | amrwbParms = ['amrwb[br=6k6]','amrwb[br=12k65]', 'amrwb[br=15k85]', 'amrwb[br=23k05]', \
199 | 'amrwb[br=6k6,nodtx]','amrwb[br=12k65,nodtx]', 'amrwb[br=15k85,nodtx]', 'amrwb[br=23k05,nodtx]']
200 |
201 | g711Parms = ['g711[law=u]', 'g711[law=a]']
202 | g726Parms = ['g726[law=u,br=16k]', 'g726[law=u,br=24k]', 'g726[law=u,br=32k]','g726[law=u,40k]',\
203 | 'g726[law=a,br=16k]', 'g726[law=a,br=24k]', 'g726[law=a,br=32k]','g726[law=a,br=40k]']
204 | g729aParms = ['g729a']
205 | g728Parms = ['g728']
206 | g722Parms = ['g722[br=64k]', 'g722[br=56k]', 'g722[br=48k]']
207 | gsmfrParms = [ 'gsmfr']
208 | silkParms = ['silk[br=5k]','silk[br=10k]','silk[br=15k]','silk[br=20k]', \
209 | 'silk[br=5k,loss=5]','silk[br=10k,loss=5]','silk[br=15k,loss=5]','silk[br=20k,loss=5]',\
210 | 'silk[br=5k,loss=10]','silk[br=10k,loss=10]','silk[br=15k,loss=10]','silk[br=20k,loss=10]']
211 | silkwbParms = ['silkwb[br=10k]','silkwb[br=20k]','silkwb[br=30k]', \
212 | 'silkwb[br=10k,loss=5]','silkwb[br=20k,loss=5]','silkwb[br=30k,loss=5]',\
213 | 'silkwb[br=10k,loss=10]','silkwb[br=20k,loss=10]','silkwb[br=30k,loss=10]']
214 | bpParms = ['bp[ft=g712]','bp[ft=p341]','bp[ft=irs]','bp[ft=mirs]']
215 | mp3Parms = ['mp3[8k]','mp3[16k]','mp3[32k]']
216 | aacParms = ['aac[8k]','aac[16k]','aac[32k]']
217 | c2Parms = ['c2[br=3k2]', 'c2[br=2k4]']
218 | cvsdParms = ['cvsd[br=8k]', 'cvsd[br=16k]', 'cvsd[br=24k]', 'cvsd[br=32k]']
219 |
220 | # read files to process
221 | try:
222 | with open(fileList) as f:
223 | files = f.read().splitlines()
224 | # files = sorted(set(files))
225 | except:
226 | print 'could not read file ' + fileList
227 | exit()
228 |
229 | cond=''
230 | ncond=''
231 | ncondsnr=''
232 | s=argcond.split('.')
233 | if len(s)>0:
234 | cond=s[0]
235 | if len(s)>1:
236 | if s[1]=='clean' or s[1]=='':
237 | ncond=''
238 | elif s[1]=='noisy08' or s[1]=='noisy15' or s[1]=='noisy25':
239 | ncond=s[1][:-2]
240 | ncondsnr=s[1][-2:]
241 | else:
242 | print 'the noisy condition should be either noisy08 or noisy15'
243 | sys.exit(0)
244 |
245 |
246 | if cond!='' and ncond=='':
247 | print 'doing condition ' + cond + '(no noise condition)'
248 | outDirCond = outDir + '/' + cond
249 | elif cond!='' and ncond!='':
250 | print 'doing condition ' + cond + '.' + ncond
251 | outDirCond = outDir + '/' + cond + '.' + ncond + ncondsnr
252 |
253 | try:
254 | os.makedirs(outDirCond)
255 | except:
256 | pass
257 |
258 | fscp = open (outDirCond + '.scp','w')
259 |
260 | if cond=='landline':
261 | for nf,f in enumerate(files):
262 |
263 | level = randomChoice(levels)
264 | codecList=['norm[rms='+ str(level) + ']']
265 |
266 | # additive noise
267 | if ncond != '':
268 | opt='noise[filter=ambience-public\|ambience-private\|ambience-outdoors\|ambience-babble\|ambience-transportation\|ambience-music,snr='+str(ncondsnr)+']'
269 | codecList.append(opt)
270 |
271 | # apply random landline codec
272 | codecList2 = []
273 | codec = randomChoice(codecsLandline)
274 | # apply band-pass filter first if needed
275 | if codec in codecsBPFilter:
276 | opt = randomChoice(bpParms)
277 | codecList2.append(opt)
278 | # apply codec
279 | parms=eval(codec+'Parms')
280 | opt=randomChoice(parms)
281 | codecList2.append(opt)
282 |
283 | codecs = codecList + codecList2
284 | outputFile = outDirCond+'/'+buildFileName(os.path.basename(f), codecs)
285 | outputFile = os.path.splitext(outputFile)[0] + '.wav'
286 | if fileEmpty(outputFile):
287 | if options.seed == '':
288 | cmd = cmdFile + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
289 | else:
290 | cmd = cmdFile + ' -s ' + str(rndidx) + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
291 | print cmd
292 | os.system(cmd)
293 | fscp.write (outputFile + '\n')
294 | fscp.flush()
295 | print ''
296 | print ''
297 | fscp.close()
298 |
299 | elif cond=='cellular':
300 | for nf,f in enumerate(files):
301 | level = randomChoice(levels)
302 | codecList=['norm[rms='+ str(level) + ']']
303 | # additive noise
304 | if ncond != '':
305 | opt='noise[filter=ambience-public\|ambience-private\|ambience-outdoors\|ambience-babble\|ambience-transportation\|ambience-music,snr='+str(ncondsnr)+']'
306 | codecList.append(opt)
307 |
308 | # apply random landline codec
309 | codecList2 = []
310 | codec = randomChoice(codecsCellular)
311 | # apply band-pass filter first if needed
312 | if codec in codecsBPFilter:
313 | opt = randomChoice(bpParms)
314 | codecList2.append(opt)
315 | # apply codec
316 | parms=eval(codec+'Parms')
317 | opt=randomChoice(parms)
318 | codecList2.append(opt)
319 |
320 | codecs = codecList + codecList2
321 | outputFile = outDirCond+'/'+buildFileName(os.path.basename(f), codecs)
322 | outputFile = os.path.splitext(outputFile)[0] + '.wav'
323 | if fileEmpty(outputFile):
324 | if options.seed == '':
325 | cmd = cmdFile + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
326 | else:
327 | cmd = cmdFile + ' -s ' + str(rndidx) + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
328 | print cmd
329 | os.system(cmd)
330 | fscp.write (outputFile + '\n')
331 | fscp.flush()
332 | print ''
333 | print ''
334 | fscp.close()
335 |
336 | elif cond=='satellite':
337 | for nf,f in enumerate(files):
338 | level = randomChoice(levels)
339 | codecList=['norm[rms='+ str(level) + ']']
340 | # additive noise
341 | if ncond != '':
342 | opt='noise[filter=ambience-public\|ambience-private\|ambience-outdoors\|ambience-babble\|ambience-transportation\|ambience-music,snr='+str(ncondsnr)+']'
343 | codecList.append(opt)
344 |
345 | # apply random landline codec
346 | codecList2 = []
347 | codec = randomChoice(codecsSatellite)
348 | # apply band-pass filter first if needed
349 | if codec in codecsBPFilter:
350 | opt = randomChoice(bpParms)
351 | codecList2.append(opt)
352 | # apply codec
353 | parms=eval(codec+'Parms')
354 | opt=randomChoice(parms)
355 | codecList2.append(opt)
356 |
357 | codecs = codecList + codecList2
358 | outputFile = outDirCond+'/'+buildFileName(os.path.basename(f), codecs)
359 | outputFile = os.path.splitext(outputFile)[0] + '.wav'
360 | if fileEmpty(outputFile):
361 | if options.seed == '':
362 | cmd = cmdFile + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
363 | else:
364 | cmd = cmdFile + ' -s ' + str(rndidx) + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
365 | print cmd
366 | os.system(cmd)
367 | print ''
368 | print ''
369 | fscp.write (outputFile + '\n')
370 | fscp.flush()
371 | fscp.close()
372 |
373 | elif cond=='voip':
374 | for nf,f in enumerate(files):
375 | level = randomChoice(levels)
376 | codecList=['norm[rms='+ str(level) + ']']
377 | # additive noise
378 | if ncond != '':
379 | opt='noise[filter=ambience-public\|ambience-private\|ambience-outdoors\|ambience-babble\|ambience-transportation\|ambience-music,snr='+str(ncondsnr)+']'
380 | codecList.append(opt)
381 |
382 | # apply random landline codec
383 | codecList2 = []
384 | codec = randomChoice(codecsVoIP)
385 | # apply band-pass filter first if needed
386 | if codec in codecsBPFilter:
387 | opt = randomChoice(bpParms)
388 | codecList2.append(opt)
389 | # apply codec
390 | parms=eval(codec+'Parms')
391 | opt=randomChoice(parms)
392 | codecList2.append(opt)
393 |
394 | codecs = codecList + codecList2
395 | outputFile = outDirCond+'/'+buildFileName(os.path.basename(f), codecs)
396 | outputFile = os.path.splitext(outputFile)[0] + '.wav'
397 | if fileEmpty(outputFile):
398 | if options.seed == '':
399 | cmd = cmdFile + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
400 | else:
401 | cmd = cmdFile + ' -s ' + str(rndidx) + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
402 | print cmd
403 | os.system(cmd)
404 | print ''
405 | print ''
406 | fscp.write (outputFile + '\n')
407 | fscp.flush()
408 | fscp.close()
409 |
410 |
411 | elif cond=='playback':
412 |
413 | for f in files:
414 | level = randomChoice(levels)
415 | codecList=['norm[rms='+ str(level) + ']']
416 | # additive noise
417 | if ncond != '':
418 | opt='noise[filter=ambience-public\|ambience-private\|ambience-outdoors\|ambience-babble\|ambience-transportation\|ambience-music,snr='+str(ncondsnr)+']'
419 | codecList.append(opt)
420 |
421 | # apply landline|cellular|voip codec + device impulse response + audio codec (mp3 or aac)
422 | codecList2 = []
423 | tmp = sum ([codecsLandline, codecsCellular, codecsVoIP],[])
424 | codec = randomChoice(tmp)
425 | if codec in codecsBPFilter:
426 | opt = randomChoice(bpParms)
427 | codecList2.append(opt)
428 | # apply codec
429 | parms=eval(codec+'Parms')
430 | opt=randomChoice(parms)
431 | codecList2.append(opt)
432 |
433 | opt='irdevice'
434 | codecList2.append(opt)
435 | codecAudio=randomChoice(codecsPlayback)
436 | parms=eval(codecAudio+'Parms')
437 | opt=randomChoice(parms)
438 | codecList2.append(opt)
439 |
440 | codecs = codecList + codecList2
441 | outputFile = outDirCond+'/'+buildFileName(os.path.basename(f), codecs)
442 | outputFile = os.path.splitext(outputFile)[0] + '.wav'
443 | if fileEmpty(outputFile):
444 | if options.seed == '':
445 | cmd = cmdFile + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
446 | else:
447 | cmd = cmdFile + ' -s ' + str(rndidx) + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
448 | print cmd
449 | os.system(cmd)
450 | print ''
451 | print ''
452 | fscp.write (outputFile + '\n')
453 | fscp.flush()
454 |
455 | print ''
456 | fscp.close()
457 |
458 | elif cond=='interview':
459 |
460 | for f in files:
461 | level = randomChoice(levels)
462 | codecList=['norm[rms='+ str(level) + ']']
463 |
464 | if ncond != '':
465 | # snr = randomChoice(snrsHVAC)
466 | opt='noise[filter=hvac,snr='+str(ncondsnr)+']'
467 | codecList.append(opt)
468 |
469 | # apply small room impulse response + audio codec (mp3 or aac)
470 | # opt='irspace[filter=small\|medium]'
471 | opt='irspace[filter=small/]'
472 | codecList.append(opt)
473 |
474 | codec=randomChoice(codecsInterview)
475 | parms=eval(codec+'Parms')
476 | opt=randomChoice(parms)
477 | codecList.append(opt)
478 |
479 | codecs = codecList
480 | outputFile = outDirCond+'/'+buildFileName(os.path.basename(f), codecs)
481 | outputFile = os.path.splitext(outputFile)[0] + '.wav'
482 | if fileEmpty(outputFile):
483 | if options.seed == '':
484 | cmd = cmdFile + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
485 | else:
486 | cmd = cmdFile + ' -s ' + str(rndidx) + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
487 | print cmd
488 | os.system(cmd)
489 | print ''
490 | print ''
491 | fscp.write (outputFile + '\n')
492 | fscp.flush()
493 |
494 | fscp.close()
495 |
496 | elif cond=='nocodec':
497 | # additive noise
498 | level = randomChoice(levels)
499 | codecList=['norm[rms='+ str(level) + ']']
500 | if ncond != '':
501 | opt='noise[filter=ambience-public\|ambience-private\|ambience-outdoors\|ambience-babble\|ambience-transportation\|ambience-music,snr='+str(ncondsnr)+']'
502 | codecList.append(opt)
503 |
504 | codecs = codecList
505 |
506 | for nf,f in enumerate(files):
507 | outputFile = outDirCond+'/'+buildFileName(os.path.basename(f), [])
508 | outputFile = os.path.splitext(outputFile)[0] + '.wav'
509 | if fileEmpty(outputFile):
510 | if options.seed == '':
511 | cmd = cmdFile + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
512 | else:
513 | cmd = cmdFile + ' -s ' + str(rndidx) + ' -r 8000 -c ' + ':'.join(codecs) + ' ' + f + ' ' + outputFile
514 | print cmd
515 | os.system(cmd)
516 | print ''
517 | print ''
518 | fscp.write (outputFile + '\n')
519 | fscp.flush()
520 |
521 | fscp.close()
522 |
--------------------------------------------------------------------------------
/degrade-audio-safe-random.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | #Copyright (c) 2015 Idiap Research Institute, http://www.idiap.ch/
4 | #Written by Marc Ferras ,
5 | #
6 | #This file is part of AcSim.
7 | #
8 | #AcSim is free software: you can redistribute it and/or modify
9 | #it under the terms of the GNU General Public License version 3 as
10 | #published by the Free Software Foundation.
11 | #
12 | #Foobar is distributed in the hope that it will be useful,
13 | #but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | #GNU General Public License for more details.
16 | #
17 | #You should have received a copy of the GNU General Public License
18 | #along with AcSim. If not, see .
19 |
20 | import argparse
21 | from argparse import RawTextHelpFormatter
22 | import os,sys,subprocess
23 | import re
24 | import random
25 | from math import ceil
26 | import inspect
27 | import math
28 | import string
29 |
30 | scriptDir=os.path.dirname(os.path.abspath (inspect.stack()[0][1]))
31 |
32 | srcDir='.'
33 |
34 | qioDir=srcDir+'/'+'src/aurora-front-end/qio/src'
35 | qioBin=qioDir + '/nr'
36 | fantBin=srcDir+'/'+'src/fant/filter_add_noise'
37 | g711bin=srcDir+'/'+'src/Software/stl2009/g711/g711demo'
38 | g726bin=srcDir+'/'+'src/Software/stl2009/g726/g726demo'
39 | g722bin=srcDir+'/'+'src/Software/stl2009/g722/g722demo'
40 | g728bin=srcDir+'/'+'src/Software/stl2009/g728/g728fixed/g728fp'
41 | g729aEncBin=srcDir+'/'+'src/Software/G729_Release3/g729AnnexA/c_code/coder'
42 | g729aDecBin=srcDir+'/'+'src/Software/G729_Release3/g729AnnexA/c_code/decoder'
43 | amrNBEncBin=srcDir+'/'+'src/amr-nb/encoder'
44 | amrNBDecBin=srcDir+'/'+'src/amr-nb/decoder'
45 | amrWBEncBin=srcDir+'/'+'src/G722-2AnxC-v.7.1.0/c-code-v.7.1.0/coder'
46 | amrWBDecBin=srcDir+'/'+'src/G722-2AnxC-v.7.1.0/c-code-v.7.1.0/decoder'
47 | silkBin=srcDir+'/'+'src/opus-1.1/opus_demo'
48 | #ffmpegBin=srcDir+'/'+'src/ffmpeg-2.6.2/ffmpeg'
49 | ffmpegBin='/usr/bin/ffmpeg'
50 | soxBin=srcDir+'/'+'src/sox-14.4.2/src/sox -V1'
51 | sph2pipeBin=srcDir+'/'+'src/sph2pipe_v2.5/sph2pipe'
52 | c2EncBin=srcDir+'/'+'src/codec2/build_linux/src/c2enc'
53 | c2DecBin=srcDir+'/'+'src/codec2/build_linux/src/c2dec'
54 |
55 | codecStr='\n \
56 | \n\'noise[opts]\': Add noise (opts: filter=keyword, snr=snr(dB), irspace=keyword, wet=(0-100))\n \
57 | \n\'norm[opts]\': RMS power normalization (opts: rms=power(dBFS)\n \
58 | \n\'nr[opts]\': Qualcomm-ICSI-OGI noise reduction (opts: type=fft|mel)\'\n \
59 | \n\'bp[opts]\': Telephone band-pass filter (opts: ft=g712|p341|irs|mirs)\n \
60 | \n\'irdevice[opts]\': Apply device impulse response (opts: filter=keyword)\n \
61 | \n\'irspace[opts]\': Apply room impulse response (opts: wet=(0-100), filter=keyword)\n \
62 | \n\'g711[opts]\': mu/A-law, 300-3400Hz, 64kbps, POTS (opts: law=u|a (mu-law|A-law)\n \
63 | \n\'g726[opts]\': mu/A-law+ADPCM, 300-3400Hz, 32kbps, Phone Network, DECT (opts: law=u|a (mu-law|A-law), br=40k|32k|24k|16k)\n \
64 | \n\'g722[opts]\': Wideband SB-ADPCM, 50-7000Hz, VoIP (opts: br=64k|56k|48k)\n \
65 | \n\'g728[opts]\': Low-Delay CELP, 16kbps, Satellite (opts: lloss=(ms of packet loss))\n \
66 | \n\'g729a\': CS-ACELP, 8kbps, low complexity, VoIP\n \
67 | \n\'c2\': Codec2, low bit-rate radio & satellite (opts: br=3k2|2k4|1k4|1k3|1k2)\n \
68 | \n\'cvsd[opts]\': Continuous Variable Slope Delta, Satellite radio, Bluetooth (opts: br=8k-64k)\n \
69 | \n\'amr[opts]\': Adaptive Multirate, Cellular (opts: nodtx,br=4k75|5k15|5k9|6k7|7k4|7k95|10k2|12k2)\n \
70 | \n\'amrwb[opts]\': Adaptive Multirate Wideband, Cellular (opts: nodtx,br=6k6|8k85|12k65|14k25|15k85|18k25|19k85|23k05|23k85)\n \
71 | \n\'gsmfr\': Full-rate GSM, Cellular\n \
72 | \n\'silk[opts]\': Narrow Band VoIP, Skype (opts: nodtx, br=5k-20k, loss=0-100)\n \
73 | \n\'silkwb[opts]\': Wide Band VoIP, Skype (opts: nodtx, br=8k-30k, loss=0-100)\n \
74 | \n\'mp3[opts]\': MPEG Layer 3, Audio (opts: br=8k-128k)\n \
75 | \n\'aac[opts]\': Advanced Audio Codec, Audio(opts: br=8k-128k)'
76 |
77 | #codecsWithBP=[ 'g726', 'g711']
78 | codecsWithBP=[]
79 |
80 | amrOptions = ['nodtx','4k75','5k9','6k7','7k4','7k95','10k2','12k2','4750','5900','6700','7400','7950','10200','12200']
81 | gsmhrOptions = ['nodtx']
82 | gsmEFROptions = ['nodtx']
83 | silkOptions = ['nodtx']
84 | silkWBOptions = ['nodtx']
85 | amrWBOptions = ['nodtx','6k6','8k85','12k65','14k25','15k85','18k25','19k85','23k05','23k85','6600','8850','12650','14250','15850','18250','19850','23050','23850']
86 | evrcOptions = ['nodtx']
87 | g711Options = ['u','a']
88 | g726Options = ['40k','32k','24k','16k','40000','32000','24000','16000']
89 | g722Options = ['64k','56k','48k','64000','56000','48000']
90 | c2Options = ['3k2','2k4','1k4','1k3','1k2']
91 | bpOptions = ['g712','p341','irs','mirs']
92 | nrOptions = ['fft','mel']
93 |
94 |
95 | def initRandom (file, seed):
96 |
97 | global rnd
98 | global rndidx
99 |
100 |
101 |
102 | rndidx = 0
103 | rnd=[]
104 | with open(file,'r') as f:
105 | for l in f.readlines():
106 | rnd.append(l.strip())
107 |
108 |
109 | if seed == '' or seed =='0':
110 | rndidx=0
111 | else:
112 | rndidx=int(seed)
113 | if rndidx >= len(rnd):
114 | rndidx = rndidx % len(rnd)
115 |
116 | return (rnd)
117 |
118 | def getRandom(nvalues):
119 |
120 | global rndidx
121 | global rnd
122 |
123 | maxint=9223372036854775807
124 |
125 | out = int ( float(nvalues)*float(rnd[rndidx]) /float(maxint) )
126 |
127 | rndidx = rndidx + 1
128 | if rndidx==len(rnd):
129 | rndidx=0
130 |
131 | return out
132 |
133 | def listShuffle(l):
134 |
135 | global rnd
136 | global rndidx
137 |
138 | idx = range(0,len(l))
139 | idxp = list(idx)
140 | for i in idx:
141 | ri1 = getRandom(len(l))
142 | itmp = idxp[i]
143 | idxp[i] = idxp[ri1]
144 | idxp[ri1] = itmp
145 |
146 | l2 = [ l[i] for i in idxp ]
147 | return (l2)
148 |
149 |
150 | def br2int(s):
151 | if 'k' in s:
152 | l = s.split('k')
153 | if len(l)==1:
154 | br = int(l[0])*1000
155 | elif len(l)==2:
156 | if len(l[1])==0:
157 | br2 = 0
158 | elif len(l[1])==1:
159 | br2 = int(l[1]) * 100
160 | elif len(l[1])==2:
161 | br2 = int(l[1]) * 10
162 | elif len(l[1])==3:
163 | br2 = int(l[1])
164 | else:
165 | print 'cannot read bit-rate ' + s
166 | exit()
167 | br = int(l[0])*1000 + br2
168 | else:
169 | br = int(s)
170 | return (br)
171 |
172 | def isBitRate (s):
173 | if ('k' in s) or s.isdigit():
174 | return True
175 | else:
176 | return False
177 |
178 | def isNumber (s):
179 | if s.isdigit():
180 | return True
181 | else:
182 | return False
183 |
184 | def isFloat (s):
185 | try:
186 | float(s)
187 | return True
188 | except ValueError:
189 | return False
190 |
191 | def isNarrowBand(codec, opts):
192 | c = {'g711' : 1,
193 | 'g726' : 1,
194 | 'g722' : -1,
195 | 'g728' : 1,
196 | 'g729a' : 1,
197 | 'c2' : 1,
198 | 'cvsd' : 0,
199 | 'gsmhr': 1,
200 | 'gsmfr' : 1,
201 | 'gsmefr' : 1,
202 | 'amr' : 1,
203 | 'amrwb' : -1,
204 | 'evrc' : 1,
205 | 'evrcwb' : -1,
206 | 'silk' : 1,
207 | 'silkwb' : -1,
208 | 'mp3' : 0,
209 | 'aac' : 0,
210 | 'nr' : 0,
211 | 'bp' : 0,
212 | 'irdevice' : 0,
213 | 'irspace' : 0,
214 | 'noise' : 0,
215 | 'norm' : 0,
216 | '' : False,
217 | }
218 |
219 | try:
220 | return(c[codec])
221 | except:
222 | return(False)
223 |
224 |
225 |
226 | def codecParse(codecStr):
227 |
228 | s = codecStr.split('[')
229 | if len(s)>0:
230 | codec = s[0]
231 | if len(s)>1:
232 | s[1]=s[1][:-1]
233 | opts = s[1].split(',')
234 | else:
235 | opts = []
236 |
237 | return (codec, opts)
238 |
239 | def getCodecs(options):
240 | c = {'g711' : True,
241 | 'g726' : True,
242 | 'g722' : True,
243 | 'g728' : True,
244 | 'g729a' : True,
245 | 'c2' : True,
246 | 'cvsd' : True,
247 | 'gsmfr' : True,
248 | 'gsmefr' : False,
249 | 'amr' : False,
250 | 'amrwb' : False,
251 | 'evrc' : False,
252 | 'evrcwb' : False,
253 | 'silk' : True,
254 | 'silkwb' : True,
255 | 'mp3' : True,
256 | 'aac' : True,
257 | 'nr' : False,
258 | 'bp' : True,
259 | 'irdevice' : True,
260 | 'irspace' : True,
261 | 'noise' : True,
262 | 'norm' : True,
263 | }
264 |
265 | codecstr = options.codec.split(':')
266 | lcodecs = []
267 | lopts = []
268 | for codec in codecstr:
269 | (codec,opts) = codecParse(codec)
270 | try:
271 | c[codec]
272 | lcodecs.append(codec)
273 | except:
274 | if len(codec)>0:
275 | print 'codec ' + codec + ' not supported. Allowed codecs are: ' +codecStr+'.'
276 | exit()
277 | else:
278 | # no codec specified. go on
279 | return([],[])
280 |
281 | if codec=='norm':
282 | dopts= {'rms' : -26}
283 | for opt in opts:
284 | opt = opt.lower()
285 | if opt[:4]=='rms=':
286 | dopts ['rms'] = opt[4:]
287 | continue
288 | else:
289 | print 'option ' + opt + ' not recognized: skipping'
290 |
291 |
292 | # check options for amr
293 | if codec=='amr':
294 | dopts= {'bit-rate' : '10k2', 'dtx': True}
295 | for opt in opts:
296 | opt = opt.lower()
297 | if opt=='nodtx':
298 | dopts ['dtx'] = False
299 | continue
300 | elif opt[:3]=='br=':
301 | if isBitRate(opt[3:]) and (opt[3:] in amrOptions):
302 | dopts['bit-rate'] = opt[3:]
303 | continue
304 | else:
305 | print '[amr]: option ' + opt + ' not recognized: skipping'
306 |
307 | if codec=='silk':
308 | dopts= {'bit-rate' : '10k', 'dtx': True, 'loss': 0}
309 | for opt in opts:
310 | opt = opt.lower()
311 | if opt=='nodtx':
312 | dopts ['dtx'] = False
313 | continue
314 | elif opt[:5]=='loss=':
315 | dopts['loss'] = opt[5:]
316 | elif opt[:3]=='br=':
317 | if isBitRate(opt[3:]):
318 | br=br2int(opt[3:])
319 | if br<5000 or br>20000:
320 | print '[silk]: bit-rate must be in the range [5000,20000]'
321 | exit()
322 | dopts['bit-rate'] = opt[3:]
323 | continue
324 | else:
325 | print '[silk]: option ' + opt + ' not recognized: skipping'
326 |
327 | if codec=='mp3':
328 | dopts= {'bit-rate' : '32k'}
329 | for opt in opts:
330 | opt = opt.lower()
331 | if opt[:3]=='br=':
332 | if isBitRate(opt[3:]):
333 | br=br2int(opt[3:])
334 | if br<8000 or br>128000:
335 | print '[mp3]: bit-rate must be in the range [8000,128000]'
336 | exit()
337 | dopts['bit-rate'] = opt[3:]
338 | continue
339 | else:
340 | print '[mp3]: option ' + opt + ' not recognized: skipping'
341 |
342 | if codec=='aac':
343 | dopts= {'bit-rate' : '32k'}
344 | for opt in opts:
345 | opt = opt.lower()
346 | if opt[:3]=='br=':
347 | if isBitRate(opt[3:]):
348 | br=br2int(opt[3:])
349 | if br<8000 or br>128000:
350 | print '[aac]: bit-rate must be in the range [8000,128000]'
351 | exit()
352 | dopts['bit-rate'] = opt[3:]
353 | continue
354 | else:
355 | print '[aac]: option ' + opt + ' not recognized: skipping'
356 |
357 |
358 | if codec=='silkwb':
359 | dopts= {'bit-rate' : '20k', 'dtx': True, 'loss': 0}
360 | for opt in opts:
361 | opt = opt.lower()
362 | if opt=='nodtx':
363 | dopts ['dtx'] = False
364 | continue
365 | elif opt[:5]=='loss=':
366 | dopts['loss'] = opt[5:]
367 | elif opt[:3]=='br=':
368 | if isBitRate(opt[3:]):
369 | br=br2int(opt[3:])
370 | if br<8000 or br>30000:
371 | print '[silk]: bit-rate must be in the range [8000,30000]'
372 | exit()
373 | dopts['bit-rate'] = opt[3:]
374 | continue
375 | else:
376 | print '[silk]: option ' + opt + ' not recognized: skipping'
377 |
378 | if codec=='bp':
379 | dopts= {'bp-type' : 'g712'}
380 | for opt in opts:
381 | opt = opt.lower()
382 | if opt[:3]=='ft=':
383 | if opt[3:] in bpOptions:
384 | dopts ['bp-type'] = opt[3:]
385 | continue
386 | else:
387 | print 'option ' + opt + ' not recognized: skipping'
388 | else:
389 | print 'option ' + opt + ' not recognized: skipping'
390 |
391 | if codec=='nr':
392 | dopts= {'type' : 'fft'}
393 | for opt in opts:
394 | opt = opt.lower()
395 | if opt[:5]=='type=':
396 | if opt[5:] in nrOptions:
397 | dopts ['type'] = opt[5:]
398 | continue
399 | else:
400 | print 'option ' + opt + ' not recognized: skipping'
401 | else:
402 | print 'option ' + opt + ' not recognized: skipping'
403 |
404 | if codec=='cvsd':
405 | dopts= {'bit-rate' : '24k'}
406 | for opt in opts:
407 | if opt[:3]=='br=':
408 | if isBitRate(opt[3:]):
409 | br=br2int(opt[3:])
410 | if br<8000 or br>64000:
411 | print '[cvsd]: sampling frequency must be in the range [8000,64000]'
412 | exit()
413 | dopts['bit-rate'] = opt[3:]
414 | continue
415 | else:
416 | print '[cvsd]: option ' + opt + ' not recognized: skipping'
417 |
418 | if codec=='evrc':
419 | dopts= {'dtx': True, 'bit-rate': '10k'}
420 | for opt in opts:
421 | opt = opt.lower()
422 | if opt=='nodtx':
423 | dopts ['dtx'] = False
424 | continue
425 | elif opt[:3]=='br=':
426 | if isBitRate(opt[3:]):
427 | br=br2int(opt[3:])
428 | if br<5000 or br>20000:
429 | print '[evrc]: sampling frequency must be in the range [5000,20000]'
430 | exit()
431 | dopts['bit-rate'] = opt[3:]
432 | continue
433 | else:
434 | print 'option ' + opt + ' not recognized: skipping'
435 |
436 | if codec=='g729a':
437 | dopts= {}
438 |
439 | if codec=='gsmhr':
440 | dopts= {'dtx': True}
441 | for opt in opts:
442 | opt = opt.lower()
443 | if opt=='nodtx':
444 | dopts ['dtx'] = False
445 | continue
446 | else:
447 | print 'option ' + opt + ' not recognized: skipping'
448 |
449 | if codec=='gsmefr':
450 | dopts= {'dtx': True}
451 | for opt in opts:
452 | opt = opt.lower()
453 | if opt=='nodtx':
454 | dopts ['dtx'] = False
455 | continue
456 | else:
457 | print 'option ' + opt + ' not recognized: skipping'
458 |
459 | if codec=='gsmfr':
460 | dopts= {}
461 |
462 | if codec=='evrcwb':
463 | dopts= {'dtx': True, 'bit-rate': '20k'}
464 | for opt in opts:
465 | opt = opt.lower()
466 | if opt=='nodtx':
467 | dopts ['dtx'] = False
468 | continue
469 | elif opt[:3]=='br=':
470 | if isBitRate(opt[3:]):
471 | br=br2int(opt[3:])
472 | if br<8000 or br>30000:
473 | print '[evrcwb]: sampling frequency must be in the range [8000,30000]'
474 | exit()
475 | dopts['bit-rate'] = opt[3:]
476 | continue
477 | else:
478 | print 'option ' + opt + ' not recognized: skipping'
479 | else:
480 | print 'option ' + opt + ' not recognized: skipping'
481 |
482 | if codec=='amrwb':
483 | dopts= {'bit-rate' : '18k25', 'dtx': True}
484 | for opt in opts:
485 | opt = opt.lower()
486 | if opt=='nodtx':
487 | dopts ['dtx'] = False
488 | continue
489 | elif opt[:3]=='br=':
490 | if isBitRate(opt[3:]) and (opt[3:] in amrWBOptions):
491 | dopts['bit-rate'] = opt[3:]
492 | continue
493 | else:
494 | print '[amr]: option ' + opt + ' not recognized: skipping'
495 |
496 | # check options for g711
497 | if codec=='g711':
498 | dopts = {'law': 'u'}
499 | for opt in opts:
500 | opt = opt.lower()
501 | if opt[0:4]=='law=':
502 | if opt[4:] in g711Options:
503 | dopts['law'] = opt[4:]
504 | else:
505 | print '[g711]: option ' + opt + ' not recognized: skipping'
506 | else:
507 | print '[g711]: option ' + opt + ' not recognized: skipping'
508 |
509 | if codec=='g726':
510 | dopts={'law': 'u', 'bit-rate': '32k'}
511 | for opt in opts:
512 | opt = opt.lower()
513 | if opt[:4]=='law=':
514 | if opt[4:] in g711Options:
515 | dopts['law'] = opt[4:]
516 | continue
517 | else:
518 | print '[g726]: option ' + opt + ' not recognized: skipping'
519 | elif opt[:3]=='br=':
520 | if isBitRate(opt[3:]) and (opt[3:] in g726Options):
521 | dopts['bit-rate'] = opt[3:]
522 | continue
523 | else:
524 | print '[g726]: option ' + opt + ' not recognized: skipping'
525 |
526 | if codec=='g722':
527 | dopts={'bit-rate': '56k'}
528 | for opt in opts:
529 | opt = opt.lower()
530 | if opt[:3]=='br=':
531 | if isBitRate(opt[3:]) and (opt[3:] in g722Options):
532 | dopts['bit-rate'] = opt[3:]
533 | continue
534 | else:
535 | print '[g722]: option ' + opt + ' not recognized: skipping'
536 |
537 | if codec=='g728':
538 | dopts={'lloss': 0}
539 | for opt in opts:
540 | opt = opt.lower()
541 | if opt[:6]=='lloss=':
542 | if isFloat(opt[6:]):
543 | if float(opt[6:])>=2.5 and float(opt[6:])<=20:
544 | dopts['lloss'] = float(opt[6:])
545 | continue
546 | else:
547 | print 'packet loss length not in the range [2.5,20] ms: skipping'
548 | else:
549 | print '[g728]: option ' + opt + ' not recognized: skipping'
550 |
551 | if codec=='c2':
552 | dopts={'bit-rate': '3k2'}
553 | for opt in opts:
554 | opt = opt.lower()
555 | if opt[:3]=='br=':
556 | if isBitRate(opt[3:]) and (opt[3:] in c2Options):
557 | dopts['bit-rate'] = opt[3:]
558 | continue
559 | else:
560 | print '[c2]: option ' + opt + ' not recognized: skipping'
561 |
562 | if codec=='irdevice':
563 | dopts={'wet': 100, 'filter': ''}
564 | for opt in opts:
565 | optl = opt.lower()
566 | if optl[0:7]=='filter=':
567 | dopts ['filter'] = opt[7:]
568 | continue
569 | else:
570 | print '[irdevice]: option ' + opt + ' not recognized: skipping'
571 |
572 | if codec=='irspace':
573 | dopts={'wet': 100, 'filter': ''}
574 | for opt in opts:
575 | optl = opt.lower()
576 | if optl[:4]=='wet=':
577 | if int(optl[4:])<0 or int(optl[4:])>100:
578 | print '[irspace]: wet should be in the range [0,100]'
579 | exit()
580 | dopts['wet'] = optl[4:]
581 | elif optl[0:7]=='filter=':
582 | dopts ['filter'] = opt[7:]
583 | continue
584 | else:
585 | print '[irspace]: option ' + opt + ' not recognized: skipping'
586 |
587 | if codec=='noise':
588 | dopts= {'filter' : '', 'snr': -20, 'irspace': '', 'wet': 100}
589 | for opt in opts:
590 | optl = opt.lower()
591 | if optl=='space':
592 | dopts ['space'] = True
593 | continue
594 | elif optl[0:4]=='snr=':
595 | if float(optl[4:])<-100 or float(optl[4:])>100:
596 | print '[noise]: snr should be in the range [-100,100] dB'
597 | exit()
598 | dopts['snr'] = float(optl[4:])
599 | elif optl[0:7]=='filter=':
600 | dopts ['filter'] = opt[7:]
601 | continue
602 | elif optl[0:8]=='irspace=':
603 | dopts ['irspace'] = opt[8:]
604 | continue
605 | elif optl[:4]=='wet=':
606 | if int(optl[4:])<0 or int(optl[4:])>100:
607 | print '[noise]: irspace wet should be in the range [0,100]'
608 | exit()
609 | dopts['wet'] = optl[4:]
610 | else:
611 | print '[noise]: option ' + opt + ' not recognized: skipping'
612 |
613 |
614 | lopts.append(dopts)
615 |
616 | return (lcodecs,lopts)
617 |
618 | def readNoiseTypes(file):
619 | l=[]
620 | try:
621 | with open(file) as f:
622 | for ln in f:
623 | ln = ln.strip('\n')
624 | ln = re.sub (r'.*\/','',ln)
625 | l.append(ln)
626 | return(l)
627 | except:
628 | return(l)
629 |
630 | def readIRs(file):
631 | l=[]
632 | try:
633 | with open(file) as f:
634 | for ln in f:
635 | ln = ln.strip('\n')
636 | l.append(ln)
637 | return(l)
638 | except:
639 | return(l)
640 |
641 |
642 | def readNoiseFiles(file):
643 | l=[]
644 | try:
645 | with open(file) as f:
646 | for ln in f:
647 | ln = ln.strip('\n')
648 | l.append(ln)
649 | return(l)
650 | except:
651 | return(l)
652 |
653 | def filterPick(lines, regex):
654 | matches = map(re.compile(regex).match, lines)
655 | return [m.group(0) for m in matches if m]
656 |
657 | def getAudioStats(filename,soxopts=''):
658 | s=subprocess.check_output(soxBin+' ' + soxopts + ' ' + filename + ' -n stat 2>&1', shell=True)
659 | s=s.split('\n')
660 | for ln in s:
661 |
662 | m=re.search(r'Samples read:\s+([0-9]+)',ln)
663 | if m:
664 | nSamples=m.group(1)
665 | continue
666 |
667 | m=re.search(r'Length \(seconds\):\s+([0-9]+\.[0-9]+)',ln)
668 | if m:
669 | lengthSec=m.group(1)
670 | continue
671 |
672 | m=re.search(r'RMS\s+amplitude:\s+([0-9]+\.[0-9]+)',ln)
673 | if m:
674 | rmsAmplitude=m.group(1)
675 | continue
676 |
677 | return (int(nSamples),float(lengthSec), float(rmsAmplitude))
678 |
679 | def getSpeechRMSAmp(filename,soxopts=''):
680 | tmp=tmpDir +'/' + os.path.basename(filename) +'-getSpeechRMSAmp.raw'
681 | os.system(soxBin+' ' + soxopts + ' ' + filename + ' ' + tmp + ' vad ')
682 | if os.path.getsize(tmp)>0:
683 | s=subprocess.check_output(soxBin+' ' + soxopts + ' ' + tmp + ' -n stat 2>&1', shell=True)
684 | os.system('rm -f ' + tmp)
685 | s=s.split('\n')
686 | for ln in s:
687 |
688 | m=re.search(r'RMS\s+amplitude:\s+([0-9]+\.[0-9]+)',ln)
689 | if m:
690 | rmsAmplitude=m.group(1)
691 | continue
692 | else:
693 | # run without vad
694 | s=subprocess.check_output(soxBin+' ' + soxopts + ' ' + filename + ' -n stat 2>&1', shell=True)
695 | s=s.split('\n')
696 |
697 | for ln in s:
698 |
699 | m=re.search(r'RMS\s+amplitude:\s+([0-9]+\.[0-9]+)',ln)
700 | if m:
701 | rmsAmplitude=m.group(1)
702 | continue
703 |
704 | return float(rmsAmplitude)
705 |
706 |
707 |
708 |
709 | parser = argparse.ArgumentParser(formatter_class=RawTextHelpFormatter)
710 | parser.add_argument("-r", dest="samplerate", default='auto', help="Force output sample rate")
711 | parser.add_argument("-d", dest="showdeviceirs", default=False, action='store_true', help="Show list of devide impulse responses")
712 | parser.add_argument("-D", dest="usedeviceirlist", default=scriptDir+'/'+'ir-device-file-list.txt', help="Device impulse response file list")
713 | parser.add_argument("-p", dest="showspaceirs", default=False, action='store_true', help="Show list of space impulse responses")
714 | parser.add_argument("-P", dest="usespaceirlist", default=scriptDir+'/'+'ir-space-file-list.txt', help="Space impulse response file list")
715 | parser.add_argument("-s", dest="seed", default='0', help="Random seed")
716 | parser.add_argument("-n", dest="shownoises", default=False, action='store_true', help="Show list of noise files")
717 | parser.add_argument("-N", dest="usenoiselist", default=scriptDir+'/'+'noise-file-list.txt', help="Noise file list")
718 | parser.add_argument("-c", dest="codec", default='', help="Supported algorithms: "+ codecStr +".\n\nAlgorithms can be cascaded, e.g. \'nr:bp[irs]:amr[nodtx,4k75]:gsmefr:mp3[8k]\'")
719 | parser.add_argument("-g", dest="debug", default=False, action='store_true',help="Keep temporary files to help debug errors")
720 | parser.add_argument('inputFile',nargs='?')
721 | parser.add_argument('outputFile',nargs='?')
722 | options = parser.parse_args()
723 |
724 | # initialize reproducible random number generator
725 | initRandom('random', options.seed)
726 |
727 | noiseFiles=[]
728 | if options.shownoises:
729 | # noiseFiles = readNoiseFiles(scriptDir+'/'+'noise-file-list.txt')
730 | noiseFiles = readNoiseFiles(options.usenoiselist)
731 | print 'read ' + str(len(noiseFiles)) + ' noise files'
732 | print '\n'.join(noiseFiles)
733 | sys.exit(0)
734 |
735 |
736 | deviceIRs=[]
737 | if options.showdeviceirs:
738 | deviceIRs = readIRs(options.usedeviceirlist)
739 | # deviceIRs = readIRs(scriptDir+'/'+'ir-device-file-list.txt')
740 | print 'read ' + str(len(deviceIRs)) + ' device impulse reponses'
741 | print '\n'.join(deviceIRs)
742 | sys.exit(0)
743 |
744 | spaceIRs=[]
745 | if options.showspaceirs:
746 | spaceIRs = readIRs(options.usespaceirlist)
747 | # spaceIRs = readIRs(scriptDir+'/'+'ir-space-file-list.txt')
748 | print 'read ' + str(len(spaceIRs)) + ' space impulse reponses'
749 | print '\n'.join(spaceIRs)
750 | sys.exit(0)
751 |
752 | #if len(options.codec)==0:
753 | # exit()
754 | (lcodecs,lopts)=getCodecs(options)
755 |
756 | for codec in lcodecs:
757 | if codec=='noise' and len(noiseFiles)==0:
758 | noiseFiles = readNoiseFiles(options.usenoiselist)
759 | # noiseFiles = readNoiseFiles(scriptDir+'/'+'noise-file-list.txt')
760 | print 'read ' + str(len(noiseFiles)) + ' noise files'
761 | break
762 |
763 | for codec in lcodecs:
764 | if codec=='irdevice' or options.showdeviceirs:
765 | deviceIRs = readIRs(options.usedeviceirlist)
766 | # deviceIRs = readIRs(scriptDir+'/'+'ir-device-file-list.txt')
767 | print 'read ' + str(len(deviceIRs)) + ' device impulse reponses'
768 | if options.showdeviceirs:
769 | '\n'.join(decideIRs)
770 | break
771 |
772 | for codec in lcodecs:
773 | if codec=='irspace' or options.showspaceirs:
774 | spaceIRs = readIRs(options.usespaceirlist)
775 | # spaceIRs = readIRs(scriptDir+'/'+'ir-space-file-list.txt')
776 | print 'read ' + str(len(spaceIRs)) + ' space impulse reponses'
777 | if options.showspaceirs:
778 | '\n'.join(spaceIRs)
779 | break
780 |
781 | inputFile = options.inputFile
782 | outputFile = options.outputFile
783 | fileIn=inputFile
784 |
785 | if options.debug:
786 | print 'keeping all temporary files for debug'
787 | rmTmp=not options.debug
788 | tmpDir='tmp/' + ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(15))
789 |
790 | try:
791 | os.makedirs(tmpDir)
792 | except:
793 | pass
794 |
795 | stepNo=0
796 | if options.seed == '':
797 | random.seed()
798 | else:
799 | random.seed(int(options.seed))
800 |
801 |
802 | fext = os.path.splitext (fileIn)[1]
803 |
804 | fileInRaw=re.sub(fext,'.raw', tmpDir + '/' + os.path.basename(fileIn))
805 | fileInRawIni=fileInRaw
806 | fileOutRaw=''
807 | # upsample to 16ksps if needed
808 | if fext=='.sph':
809 | fileInWavTmp=re.sub('.raw','-tmp.wav', fileInRaw)
810 | os.system(sph2pipeBin+' -p -f rif -c 1 ' + fileIn + ' ' + fileInWavTmp + ' > /dev/null 2> /dev/null')
811 | os.system(soxBin+' ' + fileInWavTmp + ' -G -V0 -r 16000 -c 1 ' + fileInRaw + ' rate -h < /dev/null')
812 | os.system('rm -f ' + fileInWavTmp)
813 | else:
814 | os.system(soxBin+' ' + fileIn + ' -G -V0 -r 16000 -c 1 ' + fileInRaw + ' rate -h < /dev/null')
815 |
816 | # apply codecs
817 | fileInRate=16000
818 | for codec,opts in zip(lcodecs,lopts):
819 |
820 | print '\napplying ' + codec
821 | fileInRawCodec=re.sub('.raw','-'+str(stepNo)+'-tmp0-'+codec+'.raw',fileInRaw)
822 | if isNarrowBand(codec,opts)==1:
823 | if fileInRate==16000:
824 | # resample to 8ksps
825 | print ' narrow-band codec: resampling to 8ksps'
826 | # os.system(soxBin+' -t raw -e signed-integer -b 16 -r 16000 -c 1 ' + fileInRaw + ' -r 8000 ' + fileInRawCodec + ' < /dev/null')
827 | os.system(soxBin+' -t raw -e signed-integer -b 16 -r 16000 ' + fileInRaw + ' -G -r 8000 ' + fileInRawCodec + ' < /dev/null')
828 | else:
829 | os.system('cp ' + fileInRaw + ' ' + fileInRawCodec)
830 | fileInRate=8000
831 | elif isNarrowBand(codec,opts)==-1:
832 | if fileInRate==8000:
833 | # resample to 8ksps
834 | print ' wide-band codec: resampling to 16ksps'
835 | # os.system(soxBin+' -t raw -e signed-integer -b 16 -r 8000 -c 1 ' + fileInRaw + ' -r 16000 ' + fileInRawCodec + ' < /dev/null')
836 | os.system(soxBin+' -t raw -e signed-integer -b 16 -r 8000 ' + fileInRaw + ' -G -r 16000 ' + fileInRawCodec + ' < /dev/null')
837 | else:
838 | os.system('cp ' + fileInRaw + ' ' + fileInRawCodec)
839 | fileInRate=16000
840 | else:
841 | # 8000 and 16000 are fine
842 | os.system('cp ' + fileInRaw + ' ' + fileInRawCodec)
843 |
844 | if len(codec)==0:
845 | break
846 |
847 | #encode
848 | stepNo = stepNo + 1
849 | fileOutTmp1Raw=re.sub('.raw','-'+str(stepNo)+'-tmp1-'+codec+'.raw',fileInRaw)
850 | fileOutTmp2Raw=re.sub('.raw','-'+str(stepNo)+'-tmp2-'+codec+'.raw',fileInRaw)
851 | fileOutTmp3Raw=re.sub('.raw','-'+str(stepNo)+'-tmp3-'+codec+'.raw',fileInRaw)
852 | fileOutTmp4Raw=re.sub('.raw','-'+str(stepNo)+'-tmp4-'+codec+'.raw',fileInRaw)
853 | fileOutRaw=re.sub('.raw','-'+str(stepNo)+'-codec-'+codec+'.raw',fileInRaw)
854 |
855 | #encode and decode to fileOutDecRaw
856 |
857 | if codec=='noise':
858 | skip=False
859 | print ' adding noise (' + str(opts) + ')'
860 | if len(noiseFiles)>0:
861 | if len(opts['filter'])>0:
862 | s = opts['filter'].split('|')
863 | rexp = '.*'+opts['filter']+'.*'
864 | if len(s) == 1:
865 | l = filterPick (noiseFiles,rexp)
866 | else:
867 | rexp = '('
868 | for i,x in enumerate(s):
869 | if i != len(s)-1 :
870 | rexp = rexp + '.*'+x+'.*|'
871 | else:
872 | rexp = rexp + '.*'+x+'.*'
873 | rexp = rexp + ')'
874 | l = filterPick (noiseFiles,rexp)
875 | else:
876 | rexp = '.*'+opts['filter']+'.*'
877 | l = filterPick (noiseFiles,rexp)
878 |
879 | if len(l)>1:
880 | print ' ' + str(len(l)) + ' files matching ' + rexp + ', choosing one randomly'
881 | elif len(l)==1:
882 | print ' only 1 file matching ' + rexp
883 | else:
884 | print ' no files matching ' + rexp + ': skipping adding noise'
885 | skip=True
886 |
887 | if skip:
888 | os.system ('cp ' + fileInRawCodec + ' ' + fileOutTmp4Raw)
889 | else:
890 | (sampInputFile,lenInputFile,rmsInputFile)=getAudioStats(fileInRawCodec, '-t raw -e signed-integer -b 16 -r ' + str(fileInRate))
891 | rmsInputFile=getSpeechRMSAmp(fileInRawCodec, '-t raw -e signed-integer -b 16 -r ' + str(fileInRate))
892 | # random.shuffle(l)
893 | l=listShuffle(l)
894 | noiseFile=scriptDir+'/'+l[0]
895 | print ' using ' + noiseFile
896 | (sampNoiseFile,lenNoiseFile, rmsNoiseFile)=getAudioStats(noiseFile, '-t raw -e signed-integer -b 16 -r ' + str(fileInRate))
897 | rmsNoiseFile=getSpeechRMSAmp(noiseFile, '-t raw -e signed-integer -b 16 -r ' + str(fileInRate))
898 | repeatTimes=int(ceil(lenInputFile/lenNoiseFile))
899 | if repeatTimes>1:
900 | os.system(soxBin+' -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' ' + noiseFile + ' ' + fileOutTmp1Raw + ' repeat ' + str(repeatTimes))
901 | os.system(soxBin+' -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' ' + fileOutTmp1Raw + ' ' + fileOutTmp2Raw + ' trim 0 ' + str(lenInputFile))
902 | else:
903 | os.system(soxBin+' -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' ' + noiseFile + ' ' + fileOutTmp2Raw + ' trim 0 ' + str(lenInputFile))
904 |
905 | noiseScaling=rmsInputFile/rmsNoiseFile
906 | print ' applying gain ' + '%.2f' % noiseScaling + ' to noise to match recording RMS power'
907 | noiseScaling=noiseScaling*pow(10,-float(opts['snr'])/20.0)
908 | print ' applying ' + '%.2f' % -float(opts['snr']) + ' gain to noise'
909 | os.system(soxBin+' -m -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' ' + fileInRawCodec + ' -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' -v ' + str(noiseScaling) + ' ' + fileOutTmp2Raw + ' ' + fileOutTmp4Raw)
910 |
911 | elif codec=='irdevice' or codec=='irspace':
912 | skip=False
913 |
914 | if codec=='irdevice':
915 | print ' device IR (' + str(opts) + ') '
916 | elif codec=='irspace':
917 | print ' space IR (' + str(opts) + ') '
918 | rexp = '.*'+opts['filter']+'.*'
919 | if codec=='irdevice':
920 | l = filterPick (deviceIRs,rexp)
921 | elif codec=='irspace':
922 | s = opts['filter'].split('|')
923 | if len(s) == 1:
924 | l = filterPick (spaceIRs,rexp)
925 | else:
926 | rexp = '('
927 | for i,x in enumerate(s):
928 | if i != len(s)-1 :
929 | rexp = rexp + '.*'+x+'.*|'
930 | else:
931 | rexp = rexp + '.*'+x+'.*'
932 | rexp = rexp + ')'
933 | l = filterPick (spaceIRs,rexp)
934 |
935 | if len(l)>1:
936 | print ' ' + str(len(l)) + ' files matching ' + rexp + ', choosing one randomly'
937 | elif len(l)==1:
938 | print ' only 1 file matching ' + rexp
939 | else:
940 | print ' no files matching ' + rexp + ': skipping impulse response simulation'
941 | skip=True
942 |
943 | if skip:
944 | os.system ('cp ' + fileInRawCodec + ' ' + fileOutTmp4Raw)
945 | else:
946 | # random.shuffle(l)
947 | l=listShuffle(l)
948 | if fileInRate==16000:
949 | ir=scriptDir+'/'+l[0]
950 | elif fileInRate==8000:
951 | ir=scriptDir+'/'+re.sub('16000','8000',l[0])
952 | else:
953 | print ' only 8ksps and 16ksps IR supported: skipping'
954 | continue
955 |
956 | print ' using ' + ir
957 |
958 | rmsPreFIR=getSpeechRMSAmp(fileInRawCodec, '-t raw -e signed-integer -b 16 -r ' + str(fileInRate))
959 | os.system(soxBin+' -G -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' ' + fileInRawCodec + ' ' + fileOutTmp3Raw + ' fir ' + ir)
960 | rmsPostFIR=getSpeechRMSAmp(fileOutTmp3Raw, '-t raw -e signed-integer -b 16 -r ' + str(fileInRate))
961 | firScaling=rmsPreFIR / rmsPostFIR
962 | os.system(soxBin+' -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' -v ' + str(firScaling) + ' ' + fileOutTmp3Raw + ' ' + fileOutTmp2Raw)
963 |
964 | if opts['wet']==100:
965 | os.system('cp ' + fileOutTmp2Raw + ' ' + fileOutTmp4Raw)
966 | else:
967 | gWet=str(float(opts['wet'])/100.0)
968 | gDry=str((100-float(opts['wet']))/100.0)
969 | print soxBin+' -m -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' -v ' + gDry + ' ' + fileInRawCodec + ' -G -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' -v ' + gWet + ' ' + fileOutTmp2Raw + ' ' + fileOutTmp4Raw
970 | os.system(soxBin+' -m -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' -v ' + gDry + ' ' + fileInRawCodec + ' -G -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' -v ' + gWet + ' ' + fileOutTmp2Raw + ' ' + fileOutTmp4Raw)
971 |
972 | elif codec=='norm':
973 | print ' normalizing audio (' + str(opts) + ')'
974 | rmsFile=getSpeechRMSAmp(fileInRawCodec, '-t raw -e signed-integer -b 16 -r ' + str(fileInRate))
975 | rmsTarget=pow( 10, float(opts['rms'])/20.0 )
976 | gain=rmsTarget/rmsFile
977 | print ' applying gain ' + '%.2f' % gain + ' to match ' + str(opts['rms']) + 'dbFS RMS power'
978 | os.system(soxBin+' -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' -v ' + str(gain) + ' ' + fileInRawCodec + ' ' + fileOutTmp4Raw)
979 |
980 | elif codec=='nr':
981 | print ' applying Qualcomm-OGI noise reduction (' + str(opts) + ')'
982 | os.environ["AURORACALC"]=qioDir
983 | os.system(qioBin + ' -swapin 0 -swapout 0 -fs ' + str(fileInRate) + ' -Stype QIO_'+opts['type'].upper() + ' -i ' + fileInRawCodec + ' -o ' + fileOutTmp4Raw + ' 2> nr.log')
984 |
985 | elif codec=='bp':
986 | skip=False
987 | for c in lcodecs:
988 | if c in codecsWithBP:
989 | print ' skipping band-pass filtering: codec ' + c + ' already applies appropriate filtering.'
990 | skip=True
991 |
992 | if skip:
993 | os.system('cp ' + fileInRawCodec + ' ' + fileOutTmp4Raw)
994 | else:
995 |
996 | print ' applying band-pass filter',
997 | if opts['bp-type']=='g712':
998 | print 'G.712 (300-3400Hz)'
999 | elif opts['bp-type']=='p341':
1000 | print 'P.341'
1001 | elif opts['bp-type']=='irs':
1002 | print 'IRS (200-4000Hz)'
1003 | elif opts['bp-type']=='mirs':
1004 | print 'Modified IRS (200-5000Hz)'
1005 |
1006 | bn = os.path.basename (fileInRawCodec)
1007 | inlist = tmpDir + '/' + bn+'-in-list.txt'
1008 | outlist = tmpDir + '/' + bn + '-out-list.txt'
1009 | os.system('echo ' + fileInRawCodec + ' > ' + inlist)
1010 | os.system('echo ' + fileOutTmp4Raw + ' > ' + outlist)
1011 | os.system(fantBin + ' -i ' + inlist + ' -o ' + outlist + ' -f ' + opts['bp-type'] + ' > /dev/null 2> ' + tmpDir + '/bp.log')
1012 | if rmTmp:
1013 | os.system('rm -f ' + inlist)
1014 | os.system('rm -f ' + outlist)
1015 |
1016 |
1017 | elif codec=='g711':
1018 | print ' encoding G.711 (' + str(opts) + ')'
1019 | os.system(g711bin + ' ' + opts['law'] + ' lilo ' + fileInRawCodec + ' ' + fileOutTmp1Raw + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1020 | print ' decoding G.711 (' + str(opts) + ')'
1021 | os.system(g711bin + ' ' + opts['law'] + ' loli ' + fileOutTmp1Raw + ' ' + fileOutTmp4Raw + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1022 |
1023 | elif codec=='cvsd':
1024 | print ' encoding CVSD (' + str(opts) + ')'
1025 | os.system(soxBin+' -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' ' + fileInRawCodec + ' -t cvu ' + fileOutTmp1Raw + ' rate ' + str(br2int(opts['bit-rate'])) + ' < /dev/null')
1026 | print ' decoding CVSD (' + str(opts) + ')'
1027 | os.system(soxBin+' -t cvu -r ' + str(br2int(opts['bit-rate'])) + ' ' + fileOutTmp1Raw + ' -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' ' + fileOutTmp4Raw + ' < /dev/null')
1028 |
1029 | elif codec=='g729a':
1030 | print ' encoding G.729a'
1031 | os.system(g729aEncBin + ' ' + fileInRawCodec + ' ' + fileOutTmp1Raw + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1032 | print ' decoding G.729a'
1033 | os.system(g729aDecBin + ' ' + fileOutTmp1Raw + ' ' + fileOutTmp4Raw + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1034 |
1035 | elif codec=='g726':
1036 | print ' encoding G.711+G.726 (' + str(opts) + ')'
1037 | br=opts['bit-rate'][:-1]
1038 | mode = int(br)/8
1039 | os.system(g711bin + ' ' + opts['law'] + ' lilo ' + fileInRawCodec + ' ' + fileOutTmp1Raw + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1040 | os.system(g726bin + ' ' + opts['law'] + ' load ' + str(mode) + ' ' + fileOutTmp1Raw + ' ' + fileOutTmp2Raw + ' > /dev/null 2> enc2.log')
1041 | print ' decoding G.711+G.726 (' + str(opts) + ')'
1042 | os.system(g726bin + ' ' + opts['law'] + ' adlo ' + str(mode) + ' ' + fileOutTmp2Raw + ' ' + fileOutTmp3Raw + ' > /dev/null 2> dec1.log')
1043 | os.system(g711bin + ' ' + opts['law'] + ' loli ' + fileOutTmp3Raw + ' ' + fileOutTmp4Raw + ' > /dev/null 2> dec2.log')
1044 |
1045 | elif codec=='g722':
1046 | if br2int(opts['bit-rate'])==64000:
1047 | mode = 1
1048 | elif br2int(opts['bit-rate'])==56000:
1049 | mode = 2
1050 | elif br2int(opts['bit-rate'])==48000:
1051 | mode = 3
1052 | else:
1053 | print 'mode not supported'
1054 |
1055 | print ' encoding G.722 (' + str(opts) + ')'
1056 | os.system(g722bin + ' -enc ' + fileInRawCodec + ' ' + fileOutTmp1Raw + ' ' + str(mode) + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1057 | print ' decoding G.722 (' + str(opts) + ')'
1058 | os.system(g722bin + ' -dec ' + fileOutTmp1Raw + ' ' + fileOutTmp4Raw + ' ' + str(mode) + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1059 |
1060 | elif codec=='g728':
1061 |
1062 | print ' encoding G.728 (' + str(opts) + ')'
1063 | os.system(g728bin + ' enc ' + fileInRawCodec + ' ' + fileOutTmp1Raw + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1064 | print ' decoding G.728 (' + str(opts) + ')'
1065 | if opts['lloss']>0:
1066 | os.system(g728bin + ' -plcsize ' + str(opts['lloss']) + ' dec ' + fileOutTmp1Raw + ' ' + fileOutTmp4Raw + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1067 | else:
1068 | os.system(g728bin + ' dec ' + fileOutTmp1Raw + ' ' + fileOutTmp4Raw + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1069 |
1070 | elif codec=='c2':
1071 | br=opts['bit-rate']
1072 | if br=='3k2':
1073 | opt='3200'
1074 | elif br=='2k4':
1075 | opt='2400'
1076 | elif br=='1k4':
1077 | opt='1400'
1078 | elif br=='1k3':
1079 | opt='1300'
1080 | elif br=='1k2':
1081 | opt='1200'
1082 | else:
1083 | print br + ' not supported'
1084 |
1085 | print ' encoding Codec2 (' + str(opts) + ')'
1086 | os.system(c2EncBin + ' ' + opt + ' ' + fileInRawCodec + ' ' + fileOutTmp1Raw + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1087 | print ' decoding Codec2 (' + str(opts) + ')'
1088 | os.system(c2DecBin + ' ' + opt + ' ' + fileOutTmp1Raw + ' ' + fileOutTmp4Raw + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1089 |
1090 |
1091 | elif codec=='amr':
1092 | br=opts['bit-rate']
1093 | if opts['dtx']:
1094 | opt='-dtx '
1095 | else:
1096 | opt=''
1097 | if br=='4k75':
1098 | opt=opt+'MR475'
1099 | elif br=='5k9':
1100 | opt=opt+'MR59'
1101 | elif br=='6k7':
1102 | opt=opt+'MR67'
1103 | elif br=='7k4':
1104 | opt=opt+'MR74'
1105 | elif br=='7k95':
1106 | opt=opt+'MR795'
1107 | elif br=='10k2':
1108 | opt=opt+'MR102'
1109 | elif br=='12k2':
1110 | opt=opt+'MR122'
1111 | else:
1112 | print br + ' not supported'
1113 |
1114 | print ' encoding AMR-NB ' + str(opts)
1115 | os.system(amrNBEncBin + ' ' + opt + ' ' + fileInRawCodec + ' ' + fileOutTmp1Raw + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1116 | print ' decoding AMR-NB ' + str(opts)
1117 | os.system(amrNBDecBin + ' ' + fileOutTmp1Raw + ' ' + fileOutTmp4Raw + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1118 |
1119 | elif codec=='amrwb':
1120 | br=opts['bit-rate']
1121 | if opts['dtx']:
1122 | opt='-dtx '
1123 | else:
1124 | opt=''
1125 | if br=='6k6':
1126 | opt=opt+' 0 '
1127 | elif br=='8k85':
1128 | opt=opt+' 1 '
1129 | elif br=='12k65':
1130 | opt=opt+' 2 '
1131 | elif br=='14k25':
1132 | opt=opt+' 3 '
1133 | elif br=='15k85':
1134 | opt=opt+' 4 '
1135 | elif br=='18k25':
1136 | opt=opt+' 5 '
1137 | elif br=='19k85':
1138 | opt=opt+' 6 '
1139 | elif br=='23k05':
1140 | opt=opt+' 7 '
1141 | elif br=='23k85':
1142 | opt=opt+' 8 '
1143 | else:
1144 | print br + ' not supported'
1145 |
1146 | print ' encoding AMR-WB ' + str(opts)
1147 | os.system(amrWBEncBin + ' ' + opt + ' ' + fileInRawCodec + ' ' + fileOutTmp1Raw + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1148 | print ' decoding AMR-WB ' + str(opts)
1149 | os.system(amrWBDecBin + ' ' + fileOutTmp1Raw + ' ' + fileOutTmp4Raw + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1150 |
1151 | elif codec=='evrc':
1152 | br=br2int(opts['bit-rate'])
1153 | if opts['dtx']:
1154 | optEnc='-W '+str(br)+' -D 1 -X Fsinp=8000'
1155 | optDec='-W '+str(br)+' -D 1 -X Fsop=8000'
1156 | else:
1157 | optEnc='-W '+str(br)+' -D 0 -X Fsinp=8000'
1158 | optDec='-W '+str(br)+' -D 0 -X Fsop=8000'
1159 |
1160 | print ' encoding EVRC-NB ' + str(opts)
1161 | os.system(evrcBin + ' -i ' + fileInRawCodec + ' -o ' + fileOutTmp1Raw + ' -e ' + optEnc + '> /dev/null 2> ' + tmpDir + '/enc.log')
1162 | print ' decoding EVRC-NB ' + str(opts)
1163 | os.system(evrcBin + ' -i ' + fileOutTmp1Raw + ' -o ' + fileOutTmp4Raw + ' -d ' + optDec + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1164 |
1165 | elif codec=='evrcwb':
1166 | br=br2int(opts['bit-rate'])
1167 | if opts['dtx']:
1168 | opt='-W '+str(br)+' -D 1 -X Fsinp=16000 -X Fsop=16000'
1169 | else:
1170 | opt='-W '+str(br)+' -D 0 -X Fsinp=16000 -X Fsop=16000'
1171 |
1172 | print ' encoding EVRC-WB ' + str(opts)
1173 | os.system(evrcBin + ' -i ' + fileInRawCodec + ' -o ' + fileOutTmp1Raw + ' -e ' + opt + '> /dev/null 2> ' + tmpDir + '/enc.log')
1174 | print ' decoding EVRC-WB ' + str(opts)
1175 | os.system(evrcBin + ' -i ' + fileOutTmp1Raw + ' -o ' + fileOutTmp4Raw + ' -d ' + opt + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1176 |
1177 | elif codec=='gsmhr':
1178 | if opts['dtx']:
1179 | opt='dtx'
1180 | else:
1181 | opt='nodtx'
1182 |
1183 | print ' encoding GSM-HR ' + str(opts)
1184 | print gsmHRBin + ' enc ' + fileInRawCodec + ' ' + fileOutTmp1Raw + ' ' + opt + ' > /dev/null 2> ' + tmpDir + '/enc.log'
1185 | os.system(gsmHRBin + ' enc ' + fileInRawCodec + ' ' + fileOutTmp1Raw + ' ' + opt + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1186 | print ' decoding GSM-HR ' + str(opts)
1187 | os.system(gsmHRBin + ' dec ' + fileOutTmp1Raw + ' ' + fileOutTmp4Raw + ' ' + opt + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1188 |
1189 | elif codec=='gsmefr':
1190 | if opts['dtx']:
1191 | opt='dtx'
1192 | else:
1193 | opt='nodtx'
1194 |
1195 | print ' encoding GSM-EFR ' + str(opts)
1196 | os.system(gsmEFREncBin + ' ' + fileInRawCodec + ' ' + fileOutTmp1Raw + ' ' + opt + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1197 | os.system (gsmEFRCnvBin + ' ' + fileOutTmp1Raw + ' ' + fileOutTmp2Raw + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1198 | print ' decoding GSM-EFR ' + str(opts)
1199 | os.system(gsmEFRDecBin + ' ' + fileOutTmp2Raw + ' ' + fileOutTmp4Raw + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1200 |
1201 | elif codec=='gsmfr':
1202 |
1203 | print ' encoding GSM-FR '
1204 | fileOutTmp1Gsm=re.sub('.raw','-'+str(stepNo)+'-tmp1-'+codec+'.gsm',fileInRaw)
1205 | os.system(soxBin+' -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' ' + fileInRawCodec + ' ' + fileOutTmp1Gsm + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1206 | print ' decoding GSM-FR '
1207 | os.system(soxBin+' ' + fileOutTmp1Gsm + ' -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' ' + fileOutTmp4Raw + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1208 | os.system('rm -f ' + fileOutTmp1Gsm)
1209 |
1210 | elif codec=='silk':
1211 | if opts['dtx']:
1212 | opt='-dtx'
1213 | else:
1214 | opt=''
1215 |
1216 | if int(opts['loss'])>0:
1217 | optDec='-loss ' + opts['loss'] + ' -inbandfec'
1218 | else:
1219 | optDec=''
1220 |
1221 | print ' encoding SILK-NB ' + str(opts)
1222 | os.system(silkBin + ' -e voip ' + str(fileInRate) + ' 1 ' + str(br2int(opts['bit-rate'])) + ' -bandwidth NB ' + opt + ' ' + fileInRawCodec + ' ' + fileOutTmp1Raw + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1223 | print ' decoding SILK-NB ' + str(opts)
1224 | os.system(silkBin + ' -d ' + str(fileInRate) + ' 1 ' + optDec + ' ' + fileOutTmp1Raw + ' ' + fileOutTmp4Raw + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1225 |
1226 | elif codec=='silkwb':
1227 | if opts['dtx']:
1228 | opt='-dtx'
1229 | else:
1230 | opt=''
1231 |
1232 | if int(opts['loss'])>0:
1233 | optDec='-loss ' + opts['loss'] + ' -inbandfec'
1234 | else:
1235 | optDec=''
1236 |
1237 | print ' encoding SILK-WB ' + str(opts)
1238 | os.system(silkBin + ' -e voip ' + str(fileInRate) + ' 1 ' + str(br2int(opts['bit-rate'])) + ' -bandwidth WB ' + opt + ' ' + fileInRawCodec + ' ' + fileOutTmp1Raw + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1239 | print ' decoding SILK-WB ' + str(opts)
1240 | os.system(silkBin + ' -d ' + str(fileInRate) + ' 1 ' + optDec + ' ' + fileOutTmp1Raw + ' ' + fileOutTmp4Raw + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1241 |
1242 | elif codec=='mp3':
1243 | fileOutTmp1Mp3=re.sub('.raw','-'+str(stepNo)+'-tmp1-'+codec+'.mp3',fileInRaw)
1244 | print ' encoding MP3 ' + str(opts)
1245 | os.system(ffmpegBin + ' -f s16le -ar ' + str(fileInRate) + ' -i ' + fileInRawCodec + ' -strict experimental -y -acodec mp3 -ar ' + str(fileInRate) + ' -b:a ' + str(br2int(opts['bit-rate'])) + ' ' + fileOutTmp1Mp3 + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1246 | print ' decoding MP3 ' + str(opts)
1247 | os.system(ffmpegBin + ' -i ' + fileOutTmp1Mp3 + ' -y -f s16le -ar ' + str(fileInRate) + ' ' + fileOutTmp4Raw + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1248 | os.system('rm -f ' + fileOutTmp1Mp3)
1249 |
1250 | elif codec=='aac':
1251 | fileOutTmp1Aac=re.sub('.raw','-'+str(stepNo)+'-tmp1-'+codec+'.aac',fileInRaw)
1252 | print ' encoding AAC ' + str(opts)
1253 | os.system(ffmpegBin + ' -f s16le -ar ' + str(fileInRate) + ' -i ' + fileInRawCodec + ' -strict experimental -y -acodec aac -ar ' + str(fileInRate) + ' -b:a ' + str(br2int(opts['bit-rate'])) + ' ' + fileOutTmp1Aac + ' > /dev/null 2> ' + tmpDir + '/enc.log')
1254 | print ' decoding AAC ' + str(opts)
1255 | os.system(ffmpegBin + ' -i ' + fileOutTmp1Aac + ' -strict experimental -y -f s16le -ar ' + str(fileInRate) + ' ' + fileOutTmp4Raw + ' > /dev/null 2> ' + tmpDir + '/dec.log')
1256 | os.system('rm -f ' + fileOutTmp1Aac)
1257 |
1258 | else:
1259 | print codec + ' not supported'
1260 | exit()
1261 |
1262 | os.system('cp ' + fileOutTmp4Raw + ' ' + fileOutRaw)
1263 | if rmTmp:
1264 | if fileInRaw != fileInRawIni:
1265 | os.system('rm -f ' + fileInRaw)
1266 | os.system('rm -f ' + fileInRawCodec)
1267 | os.system('rm -f ' + fileOutTmp1Raw)
1268 | os.system('rm -f ' + fileOutTmp2Raw)
1269 | os.system('rm -f ' + fileOutTmp3Raw)
1270 | os.system('rm -f ' + fileOutTmp4Raw)
1271 | if fileInRaw != fileInRawIni:
1272 | os.system('rm -f ' + fileInRaw)
1273 | fileInRaw=fileOutRaw
1274 |
1275 | if options.samplerate=='auto':
1276 | options.samplerate = fileInRate
1277 |
1278 | fileName, fileExtension = os.path.splitext(outputFile)
1279 | outext = fileExtension[1:]
1280 |
1281 |
1282 | # convert from raw to wav again
1283 | if options.samplerate != fileInRate:
1284 | print '\nresampling to ' + str(int(options.samplerate)/1000) + 'ksps'
1285 | os.system(soxBin+' -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' ' + fileInRaw + ' -t ' + outext + ' -r ' + str(options.samplerate) + ' ' + outputFile + ' < /dev/null')
1286 | else:
1287 | print '\nwriting ' + str(int(options.samplerate)/1000) + 'ksps output'
1288 | os.system(soxBin+' -t raw -e signed-integer -b 16 -r ' + str(fileInRate) + ' ' + fileInRaw + ' -t ' + outext + ' -r ' + str(options.samplerate) + ' ' + outputFile + ' < /dev/null')
1289 | if rmTmp:
1290 | if len(fileOutRaw)>0:
1291 | os.system('rm -f ' + fileOutRaw)
1292 | os.system('rm -f ' + fileInRawIni)
1293 | os.system('rm -f *.log')
1294 | os.system('rm -rf ' + tmpDir)
1295 |
--------------------------------------------------------------------------------
/download-noise-db.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | #Copyright (c) 2015 Idiap Research Institute, http://www.idiap.ch/
4 | #Written by Marc Ferras ,
5 | #
6 | #This file is part of AcSim.
7 | #
8 | #AcSim is free software: you can redistribute it and/or modify
9 | #it under the terms of the GNU General Public License version 3 as
10 | #published by the Free Software Foundation.
11 | #
12 | #Foobar is distributed in the hope that it will be useful,
13 | #but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | #GNU General Public License for more details.
16 | #
17 | #You should have received a copy of the GNU General Public License
18 | #along with AcSim. If not, see .
19 |
20 |
21 | import freesound
22 | import string
23 | import shutil
24 | import unicodedata
25 | import time
26 | import glob
27 | import os,sys,subprocess
28 | import re
29 |
30 | # paste your Freesound API v2 key below
31 | # you can apply for one on http://www.freesound.org/apiv2/apply
32 | apiKey=""
33 |
34 |
35 |
36 |
37 | downloadAudio = True
38 | delim=",.?-_:;'\"\' ()[]{}&^%$#@!~`<>|/"
39 |
40 | def shortstr (s, ds, l=0):
41 | for d in ds:
42 | s = s.replace (d,'').lower()
43 |
44 | if l==0 :
45 | return s
46 | else:
47 | return s[0:l-1]
48 |
49 | def remove_accents(input_str):
50 | nkfd_form = unicodedata.normalize('NFKD', unicode(input_str))
51 | return u"".join([c for c in nkfd_form if not unicodedata.combining(c)])
52 |
53 | def flatten(x):
54 | result = []
55 | for el in x:
56 | if hasattr(el, "__iter__") and not isinstance(el, basestring):
57 | result.extend(flatten(el))
58 | else:
59 | result.append(el)
60 | return result
61 |
62 |
63 |
64 |
65 |
66 | if len(sys.argv)!=2:
67 | print "Syntax: download-noise-audio.py noise-db.txt"
68 | sys.exit (0)
69 | else:
70 | soundList = sys.argv[1]
71 |
72 | outDir = 'noise-samples'
73 |
74 | try:
75 | os.stat(outDir)
76 | except:
77 | os.mkdir(outDir)
78 |
79 | c = freesound.FreesoundClient()
80 | c.set_token(apiKey,"oauth2")
81 |
82 | fileNo = 0;
83 |
84 | f = open (soundList, 'r')
85 | fnl = open ('noise-file-list.txt', 'a')
86 | fntl = open ('noise-type-list.txt', 'a')
87 |
88 | if downloadAudio:
89 | fout = open (outDir + '/' + 'noise-db.txt', 'a')
90 |
91 | with open(outDir + '/' + 'noise-db-fields.txt','a') as fr:
92 | fr.write ('noise-type sound-id username name duration src-audio-quality tgt-audio-quality tags\n')
93 |
94 | noisetypes=[]
95 | for line in f.readlines():
96 | line = line.strip()
97 | s = line.split(' ')
98 | soundid =s[0]
99 | soundtag = s[1]
100 | soundlic = s[2]
101 |
102 | # check if sound is already downloaded
103 | g=glob.glob(outDir +'/' + soundtag + '/' + soundid + '*.wav')
104 | if len(g)>0:
105 | print 'skipping file ' + g[0]
106 | continue
107 |
108 | if soundtag not in noisetypes:
109 | noisetypes.append(soundtag)
110 | fntl.write(soundtag+'\n')
111 | fntl.flush()
112 |
113 | try:
114 | s = c.get_sound(soundid)
115 | except freesound.FreesoundException as e:
116 | if e.code == 400:
117 | continue
118 | if e.code == 429:
119 | print 'maximum limit of requests to freesound reached (2000/day)'
120 | exit()
121 |
122 | # get sound metadata
123 | # sound description until carrier return
124 | idxcr = s.description.find(u'\n')
125 | if idxcr>=0:
126 | s.description = s.description[0:idxcr-1]
127 |
128 | # duration
129 | sdur = "%.0f" % s.duration
130 | ssrate = "%.1f" % (s.samplerate / 1000)
131 | sbrate = "%.1f" % (s.bitrate / 1000)
132 |
133 | # short name
134 | sname = remove_accents(s.name.lower())
135 | sname = sname.replace(".wav",'')
136 | sname = sname.replace(".mp3",'')
137 | sname = sname.replace(".aiff",'')
138 | sname = shortstr (sname, delim, 20)
139 | sname = filter(lambda x: x in string.printable, sname)
140 | suname = shortstr (remove_accents(s.username.lower()), delim)
141 | suname = filter(lambda x: x in string.printable, suname)
142 |
143 | # file names
144 | ogg = str(s.id) + '-' + suname + '-' + sname + '-' + sdur + '.ogg'
145 | wavTmp = str(s.id) + '-' + suname + '-' + sname + '-' + sdur + '-tmp.wav'
146 | wav = str(s.id) + '-' + suname + '-' + sname + '-' + sdur + '.wav'
147 |
148 | if downloadAudio:
149 | outDirFile = outDir + '/' + soundtag
150 | try:
151 | os.stat(outDirFile)
152 | except:
153 | os.mkdir(outDirFile)
154 |
155 | print 'downloading sound ' + soundid + ', noise type ' + soundtag + ', ' + sdur + ' s'
156 |
157 |
158 | # s.retrieve_preview_lq_mp3(outDirFile, ogg)
159 | # s.retrieve_preview_hq_mp3(outDirFile, ogg)
160 | # s.retrieve_preview_lq_ogg(outDirFile, ogg)
161 | s.retrieve_preview_hq_ogg(outDirFile, ogg)
162 |
163 |
164 | if os.path.isfile(outDirFile + '/' + ogg):
165 | # get info about original file
166 | strSrcFileInfo=s.type+'-'+ssrate+'kHz'
167 | if s.type !='wav':
168 | #it is compressed => get bitrate
169 | strSrcFileInfo=strOriginalFileInfo+'-'+sbrate+'bps'
170 | if s.type == 'wav':
171 | print ' (' + s.type + ', ' + ssrate + 'ksps)'
172 | else:
173 | print ' (' + s.type + ', ' + ssrate + 'ksps, ' + sbrate + 'kbps)'
174 |
175 | # get info about output file
176 | o=subprocess.check_output('file ' + outDirFile + '/' + ogg, shell=True)
177 | o=o.split('\n')
178 | ln=o[0]
179 | sps=''
180 | m=re.search(r',\s+([0-9]+) Hz',ln)
181 | if m:
182 | sps=m.group(1)
183 | bps=''
184 | m=re.search(r',\s+[~]*([0-9]+) bps',ln)
185 | if m:
186 | bps=m.group(1)
187 | strTgtFileInfo='ogg-'+sps+'Hz-'+bps+'bps'
188 |
189 | if sps!='':
190 | fsps = float(sps)/1000
191 | ssps = '%.1f' % fsps
192 | else:
193 | ssps = '-'
194 | if bps!='':
195 | fbps = float(bps)/1000
196 | sbps = '%.1f' % fbps
197 | else:
198 | sbps = '-'
199 | print ' to ' + outDirFile + '/' + ogg + ' (ogg, ' + ssps + 'ksps, ' + sbps + 'kbps)'
200 |
201 | # convert to PCM wav
202 | cmd = 'ffmpeg -i ' + outDirFile + '/' + ogg + ' -ar 16000 -ac 1 -y ' + outDirFile + '/' + wav + ' < /dev/null 2> /dev/null'
203 | os.system(cmd)
204 | print ' converting to ' + outDirFile + '/' + wav + ' (wav, 16-bit PCM, 16ksps)'
205 | if os.path.isfile(outDirFile + '/' + wavTmp):
206 | os.remove(outDirFile + '/' + wavTmp)
207 |
208 | if os.path.isfile(outDirFile + '/' + wav):
209 |
210 |
211 | fout.write(soundtag + ' ' + str(s.id) + ' ' + suname + ' ' + sname + ' ' + sdur + ' ' + strSrcFileInfo + ' ' + strTgtFileInfo + ' ' + ','.join(s.tags) + '\n')
212 | fout.flush()
213 |
214 | fnl.write(outDirFile + '/' + wav + '\n')
215 | fnl.flush()
216 | os.fsync(fout.fileno())
217 |
218 | fileNo = fileNo + 1
219 |
220 | if not downloadAudio:
221 | time.sleep(2)
222 |
223 | f.close()
224 | fnl.close()
225 | fntl.close()
226 |
227 | if downloadAudio:
228 | fout.close()
229 |
--------------------------------------------------------------------------------
/freesound.py:
--------------------------------------------------------------------------------
1 | #The MIT License (MIT)
2 | #
3 | #Copyright (c) 2013-2014 Universitat Pompeu Fabra
4 | #
5 | #Permission is hereby granted, free of charge, to any person obtaining a copy
6 | #of this software and associated documentation files (the "Software"), to deal
7 | #in the Software without restriction, including without limitation the rights
8 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | #copies of the Software, and to permit persons to whom the Software is
10 | #furnished to do so, subject to the following conditions:
11 | #
12 | #The above copyright notice and this permission notice shall be included in
13 | #all copies or substantial portions of the Software.
14 | #
15 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | #THE SOFTWARE.
22 |
23 | import os, re, json
24 | from collections import namedtuple
25 |
26 | try: #python 3
27 | from urllib.request import urlopen, FancyUrlOpener, Request
28 | from urllib.parse import urlparse, urlencode, quote
29 | from urllib.error import HTTPError
30 | except ImportError: #python 2.7
31 | from urlparse import urlparse
32 | from urllib import urlencode, FancyURLopener, quote
33 | from urllib2 import HTTPError, urlopen, Request
34 |
35 | class URIS():
36 | HOST = 'www.freesound.org'
37 | BASE = 'https://'+HOST+'/apiv2'
38 | TEXT_SEARCH = '/search/text/'
39 | CONTENT_SEARCH= '/search/content/'
40 | COMBINED_SEARCH = '/sounds/search/combined/'
41 | SOUND = '/sounds//'
42 | SOUND_ANALYSIS = '/sounds//analysis/'
43 | SIMILAR_SOUNDS = '/sounds//similar/'
44 | COMMENTS = '/sounds//comments/'
45 | DOWNLOAD = '/sounds//download/'
46 | UPLOAD = '/sounds/upload/'
47 | DESCRIBE = '/sounds//describe/'
48 | PENDING = '/sounds/pending_uploads/'
49 | BOOKMARK = '/sounds//bookmark/'
50 | RATE = '/sounds//rate/'
51 | COMMENT = '/sounds//comment/'
52 | AUTHORIZE = '/oauth2/authorize/'
53 | LOGOUT = '/api-auth/logout/'
54 | LOGOUT_AUTHORIZE = '/oauth2/logout_and_authorize/'
55 | ME = '/me/'
56 | USER = '/users//'
57 | USER_SOUNDS = '/users//sounds/'
58 | USER_PACKS = '/users//packs/'
59 | USER_BOOKMARK_CATEGORIES = '/users//bookmark_categories/'
60 | USER_BOOKMARK_CATEGORY_SOUNDS = '/users//bookmark_categories//sounds/'
61 | PACK = '/packs//'
62 | PACK_SOUNDS = '/packs//sounds/'
63 | PACK_DOWNLOAD = '/packs//download/'
64 |
65 |
66 | @classmethod
67 | def uri(cls, uri, *args):
68 | for a in args:
69 | uri = re.sub('<[\w_]+>', quote(str(a)), uri, 1)
70 | return cls.BASE+uri
71 |
72 | class FreesoundClient():
73 |
74 | client_secret = ""
75 | client_id = ""
76 | token = ""
77 | header =""
78 |
79 | def get_sound(self, sound_id):
80 | uri = URIS.uri(URIS.SOUND,sound_id)
81 | return FSRequest.request(uri, {}, self, Sound)
82 |
83 | def text_search(self, **params):
84 | uri = URIS.uri(URIS.TEXT_SEARCH)
85 | return FSRequest.request(uri, params, self, Pager)
86 |
87 | def content_based_search(self, **params):
88 | uri = URIS.uri(URIS.CONTENT_SEARCH)
89 | return FSRequest.request(uri, params, self, Pager)
90 |
91 | def combined_search(self, **params):
92 | uri = URIS.uri(URIS.COMBINED_SEARCH)
93 | return FSRequest.request(uri,params,self,CombinedSearchPager)
94 |
95 | def get_user(self,username):
96 | uri = URIS.uri(URIS.USER, username)
97 | return FSRequest.request(uri,{},self,User)
98 |
99 | def get_pack(self,pack_id):
100 | uri = URIS.uri(URIS.PACK, pack_id)
101 | return FSRequest.request(uri,{},self,Pack)
102 |
103 |
104 |
105 | def set_token(self, token, auth_type="token"):
106 | self.token = token#TODO
107 | self.header = 'Bearer '+token if auth_type=='oauth' else 'Token '+token
108 |
109 |
110 | class FreesoundObject:
111 | def __init__(self,json_dict, client):
112 | self.client=client
113 | def replace_dashes(d):
114 | for k, v in d.items():
115 | if "-" in k:
116 | d[k.replace("-","_")] = d[k]
117 | del d[k]
118 | if isinstance(v, dict):replace_dashes(v)
119 |
120 | replace_dashes(json_dict)
121 | self.__dict__.update(json_dict)
122 | for k, v in json_dict.items():
123 | if isinstance(v, dict):
124 | self.__dict__[k] = FreesoundObject(v, client)
125 |
126 | class FreesoundException(Exception):
127 | def __init__(self, http_code, detail):
128 | self.code = http_code
129 | self.detail = detail
130 | def __str__(self):
131 | return '' % \
132 | (self.code, self.detail)
133 |
134 | class Retriever(FancyURLopener):
135 | def http_error_default(self, url, fp, errcode, errmsg, headers):
136 | resp = fp.read()
137 | try:
138 | error = json.loads(resp)
139 | raise FreesoundException(errcode,resp.detail)
140 | except:
141 | raise Exception(resp)
142 |
143 | class FSRequest:
144 | @classmethod
145 | def request(cls, uri, params={}, client=None, wrapper=FreesoundObject, method='GET',data=False):
146 | p = params if params else {}
147 | url = '%s?%s' % (uri, urlencode(p)) if params else uri
148 | d = urllib.urlencode(data) if data else None
149 | headers = {'Authorization':client.header}
150 | req = Request(url,d,headers)
151 | try:
152 | f = urlopen(req)
153 | except HTTPError, e:
154 | resp = e.read()
155 | if e.code >= 200 and e.code < 300:
156 | return resp
157 | else:
158 | raise FreesoundException(e.code,json.loads(resp))
159 | resp = f.read()
160 | f.close()
161 | result = None
162 | try:
163 | result = json.loads(resp)
164 | except:
165 | raise FreesoundException(0,"Couldn't parse response")
166 | if wrapper:
167 | return wrapper(result,client)
168 | return result
169 |
170 | @classmethod
171 | def retrieve(cls, url, client,path):
172 | print ' from ' + url,
173 | r = Retriever()
174 | r.addheader('Authorization', client.header)
175 | return r.retrieve(url, path)
176 |
177 | class Pager(FreesoundObject):
178 | def __getitem__(self, key):
179 | return Sound(self.results[key],self.client)
180 |
181 | def next_page(self):
182 | return FSRequest.request(self.next, {}, self.client, Pager)
183 |
184 | def previous_page(self):
185 | return FSRequest.request(self.previous, {}, self.client, Pager)
186 |
187 | class CombinedSearchPager(FreesoundObject):
188 | def __getitem__(self, key):
189 | return Sound(self.results[key], None)
190 |
191 | def more(self):
192 | return FSRequest.request(self.more, {}, self.client, CombinedSearchPager)
193 |
194 | class Sound(FreesoundObject):
195 |
196 | def retrieve(self, directory, soundid, name=False):
197 | path = os.path.join(directory, name if name else self.name)
198 | uri = URIS.uri(URIS.DOWNLOAD, soundid)
199 | return FSRequest.retrieve(uri, self.client,path)
200 |
201 | def retrieve_preview_hq_ogg(self, directory, name=False):
202 | path = os.path.join(directory, name if name else str(self.previews.preview_hq_ogg.split("/")[-1]))
203 | return FSRequest.retrieve(self.previews.preview_hq_ogg, self.client,path)
204 |
205 | def retrieve_preview_lq_ogg(self, directory, name=False):
206 | path = os.path.join(directory, name if name else str(self.previews.preview_lq_ogg.split("/")[-1]))
207 | return FSRequest.retrieve(self.previews.preview_lq_ogg, self.client,path)
208 |
209 | def retrieve_preview_hq_mp3(self, directory, name=False):
210 | path = os.path.join(directory, name if name else str(self.previews.preview_hq_mp3.split("/")[-1]))
211 | return FSRequest.retrieve(self.previews.preview_hq_mp3, self.client,path)
212 |
213 | def retrieve_preview_lq_mp3(self, directory, name=False):
214 | path = os.path.join(directory, name if name else str(self.previews.preview_lq_mp3.split("/")[-1]))
215 | return FSRequest.retrieve(self.previews.preview_lq_mp3, self.client,path)
216 |
217 | def get_analysis(self, descriptors=None):
218 | uri = URIS.uri(URIS.SOUND_ANALYSIS,self.id)
219 | params = {}
220 | if descriptors:
221 | params['descriptors']=descriptors
222 | return FSRequest.request(uri, params,self.client,FreesoundObject)
223 |
224 | def get_similar(self):
225 | uri = URIS.uri(URIS.SIMILAR_SOUNDS,self.id)
226 | return FSRequest.request(uri, {},self.client, Pager)
227 |
228 | def get_comments(self):
229 | uri = URIS.uri(URIS.COMMENTS,self.id)
230 | return FSRequest.request(uri, {}, self.client, Pager)
231 |
232 | def __repr__(self):
233 | return '' % \
234 | (self.id, self.name)
235 |
236 | class User(FreesoundObject):
237 |
238 | def get_sounds(self):
239 | uri = URIS.uri(URIS.USER_SOUNDS,self.username)
240 | return FSRequest.request(uri, {}, self.client, Pager)
241 |
242 | def get_packs(self):
243 | uri = URIS.uri(URIS.USER_PACKS,self.username)
244 | return FSRequest.request(uri, {}, self.client, Pager)
245 |
246 | def get_bookmark_categories(self):
247 | uri = URIS.uri(URIS.USER_BOOKMARK_CATEGORIES,self.username)
248 | return FSRequest.request(uri, {}, self.client, Pager)
249 |
250 | def get_bookmark_category_sounds(self):
251 | uri = URIS.uri(URIS.USER_BOOKMARK_CATEGORY_SOUNDS,self.username)
252 | return FSRequest.request(uri, {}, self.client, Pager)
253 |
254 | def __repr__(self): return '' % ( self.username)
255 |
256 | class Pack(FreesoundObject):
257 |
258 | def get_sounds(self):
259 | uri = URIS.uri(URIS.PACK_SOUNDS,self.id)
260 | return FSRequest.request(uri, {}, self.client, Pager)
261 |
262 | def __repr__(self):
263 | return '' % \
264 | ( self.get('name','n.a.'))
265 |
--------------------------------------------------------------------------------
/impulse-responses-original/devices/aaron-brown/Behritone_ir_Recording.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/aaron-brown/Behritone_ir_Recording.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/aaron-brown/iPad_ir_Recording.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/aaron-brown/iPad_ir_Recording.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/aaron-brown/iPhone_ir_Recording.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/aaron-brown/iPhone_ir_Recording.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/aaron-brown/license.txt:
--------------------------------------------------------------------------------
1 | These iPhone, iPad and Behritone impulse responses were made by Aaron Brown.
2 |
3 | They are free to use and pass on to your friends, but please link them to my website to download them.
4 |
5 | They should be useful to any iOS developers or audio people wanting a quick test to see how their mixes sound on mono speakers from these devices.
6 |
7 |
8 |
9 | Enjoy and may the rest of your days be filled with creative inspiration and sonic success :)
10 |
11 | Http://www.AaronBrownSound.com
12 |
13 |
14 | iPhone and iPad are trademarked and copyrighted by Apple Inc.
15 | Behritone is a property of Behringer.
16 |
17 | All product names used in this webpage are trademarks of their respective owners, which are in no way associated or affiliated with Aaron Brown. These trademarks of other manufacturers are used solely to identify the products of those manufacturers whose tones and sounds were sampled during impulse response capture.
18 |
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/80sUk/AK-SPKRS_80sUk_001.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/80sUk/AK-SPKRS_80sUk_001.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/80sUk/AK-SPKRS_80sUk_002.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/80sUk/AK-SPKRS_80sUk_002.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/80sUs/AK-SPKRS_80sUs_001.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/80sUs/AK-SPKRS_80sUs_001.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/80sUs/AK-SPKRS_80sUs_002.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/80sUs/AK-SPKRS_80sUs_002.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_001.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_001.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_002.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_002.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_003.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_003.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_004.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_004.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_005.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_005.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_006.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_006.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_007.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_007.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_008.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_008.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_009.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_009.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_010.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_010.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_011.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_011.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_012.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_012.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_013.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_013.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_014.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_014.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_015.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_015.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_016.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_016.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_017.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_017.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_018.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_018.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_019.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/AK-SPKRS_019.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/ModernUk/AK-SPKRS_ModUk_001.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/ModernUk/AK-SPKRS_ModUk_001.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/ModernUk/AK-SPKRS_ModUk_002.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/ModernUk/AK-SPKRS_ModUk_002.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/ModernUs/AK-SPKRS_ModUs_001.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/ModernUs/AK-SPKRS_ModUs_001.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/ModernUs/AK-SPKRS_ModUs_002.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/ModernUs/AK-SPKRS_ModUs_002.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/ModernUs/AK-SPKRS_ModUs_003.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/ModernUs/AK-SPKRS_ModUs_003.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/ModernUs/AK-SPKRS_ModUs_004.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/ModernUs/AK-SPKRS_ModUs_004.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/Radio/AK-SPKRS_Radio_001.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/Radio/AK-SPKRS_Radio_001.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/Speaker/AK-SPKRS_Speaker_001.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/Speaker/AK-SPKRS_Speaker_001.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/Speaker/AK-SPKRS_Speaker_002.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/Speaker/AK-SPKRS_Speaker_002.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/VintageUk/AK-SPKRS_VinUk_001.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/VintageUk/AK-SPKRS_VinUk_001.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/VintageUk/AK-SPKRS_VinUk_002.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/VintageUk/AK-SPKRS_VinUk_002.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/VintageUs/AK-SPKRS_VinUs_001.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/VintageUs/AK-SPKRS_VinUs_001.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/ak-spkrs/VintageUs/AK-SPKRS_VinUs_002.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/adventure-kid/ak-spkrs/VintageUs/AK-SPKRS_VinUs_002.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/adventure-kid/license.txt:
--------------------------------------------------------------------------------
1 | IRs taken from http://www.adventurekid.se/akrt/free-reverb-impulse-responses/
2 | under Creative Commons Attribution 4.0 International License.
3 |
4 | Allowed:
5 |
6 | Share — copy and redistribute the material in any medium or format
7 | Adapt — remix, transform, and build upon the material for any purpose, even commercially.
8 |
9 | The licensor cannot revoke these freedoms as long as you follow the
10 | license terms.
11 |
12 | Not allowed:
13 |
14 | Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
15 |
16 | Check http://creativecommons.org/licenses/by/4.0/ for license details.
17 |
--------------------------------------------------------------------------------
/impulse-responses-original/devices/microphones/Doremi_.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/microphones/Doremi_.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/microphones/Oktava_ML19.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/microphones/Oktava_ML19.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/microphones/RCA_PB90.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/microphones/RCA_PB90.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/microphones/Reslo_RB250.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/microphones/Reslo_RB250.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/microphones/Reslo_RB_RedLabel.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/microphones/Reslo_RB_RedLabel.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/microphones/Reslo_SR1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/microphones/Reslo_SR1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/microphones/Sony_C37Fet.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/microphones/Sony_C37Fet.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/microphones/license.txt:
--------------------------------------------------------------------------------
1 | Taken from http://micirp.blogspot.ch under Creative Commons Attribution - ShareAlike 3.0 Unported License (https://creativecommons.org/licenses/by-sa/3.0/deed.en_US).
2 |
--------------------------------------------------------------------------------
/impulse-responses-original/devices/voxengo/IMreverbs4/Direct Cabinet N1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/voxengo/IMreverbs4/Direct Cabinet N1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/voxengo/IMreverbs4/Direct Cabinet N2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/voxengo/IMreverbs4/Direct Cabinet N2.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/voxengo/IMreverbs4/Direct Cabinet N3.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/voxengo/IMreverbs4/Direct Cabinet N3.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/voxengo/IMreverbs4/Direct Cabinet N4.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/devices/voxengo/IMreverbs4/Direct Cabinet N4.wav
--------------------------------------------------------------------------------
/impulse-responses-original/devices/voxengo/IMreverbs4/license.txt:
--------------------------------------------------------------------------------
1 | All impulses in this archive were created with Impulse Modeler that can be downloaded at http://www.voxengo.com/imodeler/
2 |
3 | By extracting and using provided impulse files you signify acceptance of the following terms and conditions:
4 |
5 | 1. All copyrights to these impulse files are exclusively owned by the Distributor - Aleksey Vaneev. All rights not expressly granted here are reserved by Aleksey Vaneev.
6 |
7 | 2. Permission is granted to anyone to use these impulse files royalty-free for any purpose, including commercial usage.
8 |
9 | 3. You may not sell these impulse files or earn any direct or indirect profit from their distribution.
10 |
11 | 4. You may not copy and distribute these impulse files in whole or in part unless:
12 | a) the copyright notice and this list of conditions appear on all copies;
13 | b) copies are complete and unaltered with all messages intact;
14 | c) no charge is associated with the distribution of such copies; and
15 | d) any distribution made by you hereunder is expressly made subject to an acknowledgment by you and the recipient of such distribution that Aleksey Vaneev retains exclusive ownership of these impulse files including all intellectual property rights therein, at all times.
16 |
17 | 5. THESE IMPULSE FILES ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, TRADE OR PRACTICE. Some jurisdictions do not allow the exclusion of implied warranties, so the above disclaimer may not apply to you.
18 |
19 | IN NO EVENT SHALL THE DISTRIBUTOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THESE IMPULSE FILES.
20 |
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/cksde/belle hall 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/cksde/belle hall 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/cksde/big room 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/cksde/big room 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/cksde/bright lead vocal1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/cksde/bright lead vocal1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/cksde/clear fluter hall 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/cksde/clear fluter hall 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/cksde/clear plate 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/cksde/clear plate 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/cksde/densely plate 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/cksde/densely plate 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/cksde/license.txt:
--------------------------------------------------------------------------------
1 | These IRs were downloaded from
2 |
3 | http://www.cksde.com/p_6_250.htm
4 |
5 |
6 |
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/cksde/plate gated 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/cksde/plate gated 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/cksde/plate medium 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/cksde/plate medium 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/cksde/smooth plate 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/cksde/smooth plate 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Conic Long Echo Hall.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Conic Long Echo Hall.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Deep Space.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Deep Space.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Derlon Sanctuary.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Derlon Sanctuary.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Five Columns Long.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Five Columns Long.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Five Columns.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Five Columns.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Going Home.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Going Home.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Greek 7 Echo Hall.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Greek 7 Echo Hall.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Highly Damped Large Room.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Highly Damped Large Room.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Large Bottle Hall.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Large Bottle Hall.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Large Long Echo Hall.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Large Long Echo Hall.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Large Wide Echo Hall.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Large Wide Echo Hall.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Musikvereinsaal.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Musikvereinsaal.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Parking Garage.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Parking Garage.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Rays.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Rays.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Right Glass Triangle.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Right Glass Triangle.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Scala Milan Opera Hall.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Scala Milan Opera Hall.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/St Nicolaes Church.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/St Nicolaes Church.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/Vocal Duo.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/large/voxengo/Vocal Duo.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/large/voxengo/license.txt:
--------------------------------------------------------------------------------
1 | All impulses in this archive were created with Impulse Modeler that can be downloaded at http://www.voxengo.com/imodeler/
2 |
3 | By extracting and using provided impulse files you signify acceptance of the following terms and conditions:
4 |
5 | 1. All copyrights to these impulse files are exclusively owned by the Distributor - Aleksey Vaneev. All rights not expressly granted here are reserved by Aleksey Vaneev.
6 |
7 | 2. Permission is granted to anyone to use these impulse files royalty-free for any purpose, including commercial usage.
8 |
9 | 3. You may not sell these impulse files or earn any direct or indirect profit from their distribution.
10 |
11 | 4. You may not copy and distribute these impulse files in whole or in part unless:
12 | a) the copyright notice and this list of conditions appear on all copies;
13 | b) copies are complete and unaltered with all messages intact;
14 | c) no charge is associated with the distribution of such copies; and
15 | d) any distribution made by you hereunder is expressly made subject to an acknowledgment by you and the recipient of such distribution that Aleksey Vaneev retains exclusive ownership of these impulse files including all intellectual property rights therein, at all times.
16 |
17 | 5. THESE IMPULSE FILES ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, TRADE OR PRACTICE. Some jurisdictions do not allow the exclusion of implied warranties, so the above disclaimer may not apply to you.
18 |
19 | IN NO EVENT SHALL THE DISTRIBUTOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THESE IMPULSE FILES.
20 |
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/medium/cksde/brit. small 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/medium/cksde/brit. small 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/medium/cksde/clean hall 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/medium/cksde/clean hall 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/medium/cksde/license.txt:
--------------------------------------------------------------------------------
1 | These IRs were downloaded from
2 |
3 | http://www.cksde.com/p_6_250.htm
4 |
5 |
6 |
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/medium/cksde/slapy plate 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/medium/cksde/slapy plate 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/medium/cksde/small bright plate 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/medium/cksde/small bright plate 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/medium/voxengo/French 18th Century Salon.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/medium/voxengo/French 18th Century Salon.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/medium/voxengo/In The Silo Revised.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/medium/voxengo/In The Silo Revised.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/medium/voxengo/Masonic Lodge.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/medium/voxengo/Masonic Lodge.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/medium/voxengo/Narrow Bumpy Space.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/medium/voxengo/Narrow Bumpy Space.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/medium/voxengo/Ruby Room.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/medium/voxengo/Ruby Room.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/medium/voxengo/license.txt:
--------------------------------------------------------------------------------
1 | All impulses in this archive were created with Impulse Modeler that can be downloaded at http://www.voxengo.com/imodeler/
2 |
3 | By extracting and using provided impulse files you signify acceptance of the following terms and conditions:
4 |
5 | 1. All copyrights to these impulse files are exclusively owned by the Distributor - Aleksey Vaneev. All rights not expressly granted here are reserved by Aleksey Vaneev.
6 |
7 | 2. Permission is granted to anyone to use these impulse files royalty-free for any purpose, including commercial usage.
8 |
9 | 3. You may not sell these impulse files or earn any direct or indirect profit from their distribution.
10 |
11 | 4. You may not copy and distribute these impulse files in whole or in part unless:
12 | a) the copyright notice and this list of conditions appear on all copies;
13 | b) copies are complete and unaltered with all messages intact;
14 | c) no charge is associated with the distribution of such copies; and
15 | d) any distribution made by you hereunder is expressly made subject to an acknowledgment by you and the recipient of such distribution that Aleksey Vaneev retains exclusive ownership of these impulse files including all intellectual property rights therein, at all times.
16 |
17 | 5. THESE IMPULSE FILES ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, TRADE OR PRACTICE. Some jurisdictions do not allow the exclusion of implied warranties, so the above disclaimer may not apply to you.
18 |
19 | IN NO EVENT SHALL THE DISTRIBUTOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THESE IMPULSE FILES.
20 |
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/adventure-kid/ak-srooms/AK-SROOMS_001.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/adventure-kid/ak-srooms/AK-SROOMS_001.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/adventure-kid/ak-srooms/AK-SROOMS_006.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/adventure-kid/ak-srooms/AK-SROOMS_006.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/adventure-kid/ak-srooms/AK-SROOMS_007.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/adventure-kid/ak-srooms/AK-SROOMS_007.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/adventure-kid/ak-srooms/AK-SROOMS_016.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/adventure-kid/ak-srooms/AK-SROOMS_016.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/adventure-kid/license.txt:
--------------------------------------------------------------------------------
1 | IRs taken from http://www.adventurekid.se/akrt/free-reverb-impulse-responses/
2 | under Creative Commons Attribution 4.0 International License.
3 |
4 | Allowed:
5 |
6 | Share — copy and redistribute the material in any medium or format
7 | Adapt — remix, transform, and build upon the material for any purpose, even commercially.
8 |
9 | The licensor cannot revoke these freedoms as long as you follow the
10 | license terms.
11 |
12 | Not allowed:
13 |
14 | Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
15 |
16 | Check http://creativecommons.org/licenses/by/4.0/ for license details.
17 |
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/cksde/clear room 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/cksde/clear room 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/cksde/license.txt:
--------------------------------------------------------------------------------
1 | These IRs were downloaded from
2 |
3 | http://www.cksde.com/p_6_250.htm
4 |
5 |
6 |
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/cksde/small place 6.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/cksde/small place 6.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/cksde/small room 3.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/cksde/small room 3.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/voxengo/Block Inside.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/voxengo/Block Inside.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/voxengo/Bottle Hall.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/voxengo/Bottle Hall.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/voxengo/Cement Blocks 1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/voxengo/Cement Blocks 1.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/voxengo/Cement Blocks 2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/voxengo/Cement Blocks 2.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/voxengo/Nice Drum Room.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/voxengo/Nice Drum Room.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/voxengo/Small Drum Room.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/voxengo/Small Drum Room.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/voxengo/Small Prehistoric Cave.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/voxengo/Small Prehistoric Cave.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/voxengo/Trig Room.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idiap/acoustic-simulator/492586d78c43ecd35c3e642a431fad123416f492/impulse-responses-original/spaces/small/voxengo/Trig Room.wav
--------------------------------------------------------------------------------
/impulse-responses-original/spaces/small/voxengo/license.txt:
--------------------------------------------------------------------------------
1 | All impulses in this archive were created with Impulse Modeler that can be downloaded at http://www.voxengo.com/imodeler/
2 |
3 | By extracting and using provided impulse files you signify acceptance of the following terms and conditions:
4 |
5 | 1. All copyrights to these impulse files are exclusively owned by the Distributor - Aleksey Vaneev. All rights not expressly granted here are reserved by Aleksey Vaneev.
6 |
7 | 2. Permission is granted to anyone to use these impulse files royalty-free for any purpose, including commercial usage.
8 |
9 | 3. You may not sell these impulse files or earn any direct or indirect profit from their distribution.
10 |
11 | 4. You may not copy and distribute these impulse files in whole or in part unless:
12 | a) the copyright notice and this list of conditions appear on all copies;
13 | b) copies are complete and unaltered with all messages intact;
14 | c) no charge is associated with the distribution of such copies; and
15 | d) any distribution made by you hereunder is expressly made subject to an acknowledgment by you and the recipient of such distribution that Aleksey Vaneev retains exclusive ownership of these impulse files including all intellectual property rights therein, at all times.
16 |
17 | 5. THESE IMPULSE FILES ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, TRADE OR PRACTICE. Some jurisdictions do not allow the exclusion of implied warranties, so the above disclaimer may not apply to you.
18 |
19 | IN NO EVENT SHALL THE DISTRIBUTOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THESE IMPULSE FILES.
20 |
--------------------------------------------------------------------------------
/prepare-impulse-responses.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | #Copyright (c) 2015 Idiap Research Institute, http://www.idiap.ch/
4 | #Written by Marc Ferras ,
5 | #
6 | #This file is part of AcSim.
7 | #
8 | #AcSim is free software: you can redistribute it and/or modify
9 | #it under the terms of the GNU General Public License version 3 as
10 | #published by the Free Software Foundation.
11 | #
12 | #Foobar is distributed in the hope that it will be useful,
13 | #but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | #GNU General Public License for more details.
16 | #
17 | #You should have received a copy of the GNU General Public License
18 | #along with AcSim. If not, see .
19 |
20 |
21 | import os,sys,subprocess
22 | import numpy as np
23 | import scikits.audiolab as al # audiolab, install through pip, requires libsndfile
24 | import scikits.samplerate as src # secret rabbit code resampled, install through pip, requires SRC
25 | import matplotlib.pyplot as plt
26 | import struct
27 | import re
28 |
29 | def loadSignal(fileName):
30 | try:
31 | x, Fs, encFmt = al.wavread(fileName)
32 | except IOError:
33 | print('Could not import file "%s"' % sigPath)
34 | return None
35 |
36 | return (x, Fs)
37 |
38 | def find1(L, S):
39 | return [x for x in (L) if S in x]
40 |
41 |
42 | irOriginal='impulse-responses-original'
43 | irOutput='impulse-responses'
44 | irDeviceList='ir-device-file-list.txt'
45 | irSpaceList='ir-space-file-list.txt'
46 |
47 | kwDevice = ['devices']
48 | kwSpace = ['spaces']
49 | kwBlockSpace = []
50 |
51 | # read wav IR
52 | swav=subprocess.check_output('find -L ' + irOriginal + ' -type f -name \"*.wav\"', shell=True)
53 | swav=swav.split('\n')
54 | swav=swav[:-1]
55 |
56 | nDevice = 0
57 | nSpace = 0
58 | fdevice=open(irDeviceList,'wt')
59 | fspace=open(irSpaceList,'wt')
60 | for ln in swav:
61 | (fileName, fileExtension) = os.path.splitext(ln)
62 |
63 | # read wav file
64 | (x,fs)=loadSignal(ln)
65 | sx=x.shape
66 | if len(sx)==2:
67 | ir = x[:,1]
68 | elif len(sx)==1:
69 | ir = x
70 | else:
71 | print 'too many channels for IR ' + ln + ': skipping'
72 | continue
73 |
74 | ir8k = src.resample(ir, 8000/float(fs), 'sinc_medium')
75 | ir8kabs = ir8k * ir8k
76 | sum8k=ir8kabs.sum()
77 | ir8k = ir8k / np.sqrt(sum8k)
78 | dname=os.path.dirname(ln)
79 | lin=dname.split('/')[1:]
80 | lout=[]
81 | for elem in lin:
82 | e = ''.join(e for e in elem if e.isalnum())
83 | lout.append(e)
84 | outdir=irOutput + '/' + '/'.join(lout)
85 |
86 |
87 | basename = os.path.basename(ln)
88 | basename = re.sub('.wav','',basename)
89 | basename = ''.join(e for e in basename if e.isalnum())
90 |
91 | basename8k = basename + '-8000.ir'
92 | outfile8k = outdir + '/' + basename8k
93 |
94 | ir16k = src.resample(ir, 16000/float(fs), 'sinc_medium')
95 | ir16kabs = ir16k * ir16k
96 | sum16k=ir16kabs.sum()
97 | ir16k = ir16k / np.sqrt(sum16k)
98 | basename16k = basename + '-16000.ir'
99 | outfile16k = outdir + '/' + basename16k
100 |
101 | foundSpace = False
102 | foundBlockSpace = False
103 | for kw in kwSpace:
104 | if kw in dname:
105 | foundSpace = True
106 | if foundSpace:
107 | for kw2 in kwBlockSpace:
108 | if kw2 in dname:
109 | foundBlockSpace = True
110 | if foundSpace and not foundBlockSpace:
111 | break
112 | elif foundSpace and foundBlockSpace:
113 | foundSpace = False
114 |
115 | foundDevice = False
116 | for kw in kwDevice:
117 | if kw in dname:
118 | foundDevice = True
119 | break
120 |
121 | if foundDevice:
122 | try:
123 | os.makedirs(outdir)
124 | except:
125 | pass
126 | print ln
127 | np.savetxt(outfile8k, ir8k, newline=' ')
128 | np.savetxt(outfile16k, ir16k, newline=' ')
129 | fdevice.write(outfile16k +'\n')
130 | nDevice = nDevice + 1
131 |
132 | if foundSpace:
133 | try:
134 | os.makedirs(outdir)
135 | except:
136 | pass
137 | print ln
138 | np.savetxt(outfile8k, ir8k, newline=' ')
139 | np.savetxt(outfile16k, ir16k, newline=' ')
140 | fspace.write(outfile16k +'\n')
141 | nSpace = nSpace + 1
142 |
143 | fdevice.close()
144 | fspace.close()
145 |
146 | print str(nDevice) + ' device IRs'
147 | print str(nSpace) + ' space IRs'
148 |
--------------------------------------------------------------------------------
/split-dev-train-test.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | #Copyright (c) 2015 Idiap Research Institute, http://www.idiap.ch/
4 | #Written by Marc Ferras ,
5 | #
6 | #This file is part of AcSim.
7 | #
8 | #AcSim is free software: you can redistribute it and/or modify
9 | #it under the terms of the GNU General Public License version 3 as
10 | #published by the Free Software Foundation.
11 | #
12 | #Foobar is distributed in the hope that it will be useful,
13 | #but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | #GNU General Public License for more details.
16 | #
17 | #You should have received a copy of the GNU General Public License
18 | #along with AcSim. If not, see .
19 |
20 |
21 | import sys
22 | import random
23 | import os
24 |
25 | def initRandom (file, seed):
26 |
27 | global rnd
28 | global rndidx
29 |
30 | rndidx = 0
31 | rnd=[]
32 | with open(file,'r') as f:
33 | for l in f.readlines():
34 | rnd.append(l.strip())
35 |
36 | if seed == '' or seed =='0':
37 | rndidx=0
38 | else:
39 | rndidx=int(seed)
40 | if rndidx >= len(rnd):
41 | rndidx = rndidx % len(rnd)
42 |
43 | return (rnd)
44 |
45 | def getRandom():
46 |
47 | global rndidx
48 | global rnd
49 |
50 | maxint=9223372036854775807
51 |
52 | out = float(rnd[rndidx]) /float(maxint)
53 |
54 | rndidx = rndidx + 1
55 | if rndidx==len(rnd):
56 | rndidx=0
57 |
58 | return out
59 |
60 | def getRandomInt(nvalues):
61 |
62 | global rndidx
63 | global rnd
64 |
65 | maxint=9223372036854775807
66 |
67 | out = int ( float(nvalues-1)*float(rnd[rndidx]) /float(maxint) )
68 |
69 | rndidx = rndidx + 1
70 | if rndidx==len(rnd):
71 | rndidx=0
72 |
73 | return out
74 |
75 |
76 | def listShuffle(l):
77 |
78 | global rnd
79 | global rndidx
80 |
81 | idx = range(0,len(l))
82 | idxp = list(idx)
83 | for i in idx:
84 | ri1 = getRandomInt(len(l))
85 | itmp = idxp[i]
86 | idxp[i] = idxp[ri1]
87 | idxp[ri1] = itmp
88 |
89 | l2 = [ l[i] for i in idxp ]
90 | return (l2)
91 |
92 |
93 |
94 | if len(sys.argv)!=4:
95 | print './split-train-test.py noise-file-list.txt train.list test.list'
96 | sys.exit(0)
97 |
98 | fileList=sys.argv[1]
99 | trainList=sys.argv[2]
100 | testList=sys.argv[3]
101 |
102 | with open(trainList,'r') as f:
103 | train=f.readlines()
104 |
105 | with open(testList,'r') as f:
106 | test=f.readlines()
107 |
108 | # generate train and test file names
109 | fileName, fileExtension = os.path.splitext(fileList)
110 | #open output file list for writing
111 | fileListDev = fileName +'-dev' + fileExtension
112 | fileListTrn = fileName +'-trn' + fileExtension
113 | fileListTst = fileName +'-tst' + fileExtension
114 |
115 | initRandom('random',0)
116 |
117 | noises=[]
118 | with open(fileList,'r') as f:
119 | for ln in f.readlines():
120 | ln =ln.strip()
121 | noises.append(ln)
122 | noises = listShuffle (noises)
123 |
124 | # assign train first
125 | assignedNoises=[]
126 | for f in train:
127 | noise = noises[0]
128 | if noise not in assignedNoises:
129 | assignedNoises.append(noise)
130 | del noises[0]
131 | trainNoises = list (assignedNoises)
132 | print str(len(trainNoises)) + ' noise files to train set'
133 | with open(fileListTrn,'w') as f:
134 | for line in trainNoises:
135 | f.write(line+'\n')
136 |
137 |
138 | # assign test
139 | assignedNoises=[]
140 | for f in test:
141 | noise = noises[0]
142 | if noise not in assignedNoises:
143 | assignedNoises.append(noise)
144 | del noises[0]
145 | testNoises = list (assignedNoises)
146 | print str(len(testNoises)) + ' noise files to test set'
147 | with open(fileListTst,'w') as f:
148 | for line in testNoises:
149 | f.write(line+'\n')
150 |
151 |
152 | # assign dev
153 | devNoises = list(noises)
154 | print str(len(devNoises)) + ' noise files to dev set'
155 | with open(fileListDev,'w') as f:
156 | for line in devNoises:
157 | f.write(line+'\n')
158 |
--------------------------------------------------------------------------------
/test.list:
--------------------------------------------------------------------------------
1 | MIX120371 ehjnxA m
2 | MIX120371 emnigA m
3 | MIX120395 erzxtA m
4 | MIX120395 edfykA m
5 | MIX120668 bkedyA f
6 | MIX120668 eamwoA f
7 | MIX120667 ekqtbA m
8 | MIX120664 eqyxqA m
9 | MIX120664 bmnriA m
10 | MIX120662 bbqdzA m
11 | MIX120662 evwhtA m
12 | MIX120663 bqxsvA f
13 | MIX120663 eppwgA f
14 | MIX120546 eomjlA f
15 | MIX120546 egqbcA f
16 | MIX120544 eshslA f
17 | MIX120544 ebazhA f
18 | MIX120540 bqgwvA m
19 | MIX120540 eshdqA m
20 | MIX120548 edfimA m
21 | MIX120807 bopmsA f
22 | MIX120807 ezmteA f
23 | MIX120804 evrsnA m
24 | MIX120804 enuciA m
25 | MIX120805 eovzoA m
26 | MIX120805 elbsmA m
27 | MIX120803 evtkxA f
28 | MIX120803 baarvA f
29 | MIX120800 eemguA f
30 | MIX120800 bygydA f
31 | MIX120809 ezpumA m
32 | MIX120809 esclaA m
33 | MIX120483 eyxvqA m
34 | MIX120483 biqtaA m
35 | MIX120329 elzmcA m
36 | MIX120329 ewinkA m
37 | MIX120481 bpafhA m
38 | MIX120481 ebyjxA m
39 | MIX120484 ecwaiA f
40 | MIX120484 bcdxrA f
41 | MIX120485 eueprA f
42 | MIX120485 ecrnvA f
43 | MIX120323 evyqaA m
44 | MIX120323 bzjpwA m
45 | MIX120897 etumwA f
46 | MIX120489 exbtgA f
47 | MIX120489 byjcnA f
48 | MIX120891 eztouA m
49 | MIX120890 emkbgA f
50 | MIX120892 byccpA f
51 | MIX120713 eajzqA m
52 | MIX120713 bbyedA m
53 | MIX120242 efrgoA m
54 | MIX120242 eiyapA m
55 | MIX120243 baihkA m
56 | MIX120716 blhsyA f
57 | MIX120716 ewsktA f
58 | MIX120714 ejymwA f
59 | MIX120714 bvuxyA f
60 | MIX120715 brzrlA f
61 | MIX120715 eajtgA f
62 | MIX120718 egmiwA m
63 | MIX120718 bjcdqA m
64 | MIX120719 blarjA f
65 | MIX120719 ekacrA f
66 | MIX120829 bjheoA m
67 | MIX120829 exmptA m
68 | MIX120933 esobnA m
69 | MIX120935 emxrlA m
70 | MIX120821 ehtytA f
71 | MIX120821 eqzzpA f
72 | MIX120438 edsoiA m
73 | MIX120438 biuczA m
74 | MIX120436 evmryA f
75 | MIX120436 eruclA f
76 | MIX120435 bdagbA f
77 | MIX120435 eelguA f
78 | MIX120434 bmmhhA m
79 | MIX120434 ebxkiA m
80 | MIX120432 ecodjA m
81 | MIX120432 edfwdA m
82 | MIX120431 eszrrA m
83 | MIX120431 emjxjA m
84 | MIX120430 ebzaxA m
85 | MIX120430 earpwA m
86 | MIX120293 evjykA f
87 | MIX120290 ewmqnA m
88 | MIX120297 ethuoA f
89 | MIX120297 ekmgkA f
90 | MIX120295 eawgtA f
91 | MIX120295 btbjdA f
92 | MIX120294 ekmrvA m
93 | MIX120294 bfaxjA m
94 | MIX120299 ekrupA f
95 | MIX120299 errzsA f
96 | MIX120503 euxjgA f
97 | MIX120503 bezffA f
98 | MIX120502 bbhqsA f
99 | MIX120501 eaoieA f
100 | MIX120501 eidevA f
101 | MIX120500 esjvoA f
102 | MIX120506 eefjjA f
103 | MIX120506 epujnA f
104 | MIX120505 bybfjA f
105 | MIX120505 eafesA f
106 | MIX120266 ecqavA m
107 | MIX120266 eunhfA m
108 | MIX120509 ehhseA m
109 | MIX120509 bfowmA m
110 | MIX120680 elrdhA f
111 | MIX120680 bojhmA f
112 | MIX120683 bhxpfA m
113 | MIX120683 eahviA m
114 | MIX120684 eayelA f
115 | MIX120684 eaamdA f
116 | MIX120685 bxljgA f
117 | MIX120685 ecgbxA f
118 | MIX120686 eyyoaA f
119 | MIX120686 bbsviA f
120 | MIX120688 eeapaA m
121 | MIX120688 bkectA m
122 | MIX120882 bjqpsA f
123 | MIX120882 exsfjA f
124 | MIX120880 elfjkA m
125 | MIX120880 evqpiA m
126 | MIX120333 bqrmsA f
127 | MIX120727 eccnxA f
128 | MIX120727 bynqnA f
129 | MIX120208 eozdjA m
130 | MIX120759 ecxfdA f
131 | MIX120759 eiogkA f
132 | MIX120756 bjbmfA m
133 | MIX120750 efsccA f
134 | MIX120750 bzzsoA f
135 | MIX120751 eaqusA f
136 | MIX120751 bhvzzA f
137 | MIX120617 bgzaaA m
138 | MIX120617 ezhbsA m
139 | MIX120613 bszoyA f
140 | MIX120613 epmovA f
141 | MIX120612 eaqrcA f
142 | MIX120612 ejcclA f
143 | MIX120611 boxymA f
144 | MIX120611 ekqdeA f
145 | MIX120594 byttdA f
146 | MIX120594 ejblxA f
147 | MIX120596 eogomA f
148 | MIX120596 bywocA f
149 | MIX120590 bxatjA f
150 | MIX120590 eplfgA f
151 | MIX120591 bqgwoA f
152 | MIX120591 eotveA f
153 | MIX120593 edwvuA f
154 | MIX120593 brozzA f
155 | MIX120233 einalA m
156 | MIX120233 efmbcA m
157 | MIX120879 bhzgzA m
158 | MIX120879 edrrwA m
159 | MIX120877 bsailA m
160 | MIX120876 burybA f
161 | MIX120876 eagymA f
162 | MIX120874 bxcuxA m
163 | MIX120874 ezottA m
164 | MIX120873 essyxA f
165 | MIX120873 eypdwA f
166 | MIX120872 eadgfA f
167 | MIX120872 enrbuA f
168 | MIX120870 bwlspA f
169 | MIX120870 eppkwA f
170 | MIX120473 eezltA f
171 | MIX120473 eqtppA f
172 | MIX120472 eyqvuA f
173 | MIX120475 ezaddA f
174 | MIX120474 esnlbA f
175 | MIX120474 byrweA f
176 | MIX120279 bunhsA m
177 | MIX120279 eqmngA m
178 | MIX120278 bbayuA m
179 | MIX120278 edocuA m
180 | MIX120374 bopjtA f
181 | MIX120374 enoptA f
182 | MIX120376 bxjvnA f
183 | MIX120376 emkokA f
184 | MIX120271 ewgzhA m
185 | MIX120271 exglwA m
186 | MIX120379 bxsclA m
187 | MIX120379 eqoqaA m
188 | MIX111138 bibohA f
189 | MIX111268 bgfxjA m
190 | MIX111268 ehighA m
191 | MIX120618 ejstpA f
192 | MIX120618 byvkfA f
193 | MIX120653 euaaeA m
194 | MIX120653 buljlA m
195 | MIX120651 ehnwtA f
196 | MIX120651 eriajA f
197 | MIX120650 ehmjsA m
198 | MIX120650 bwbgrA m
199 | MIX120657 bxmjxA m
200 | MIX120657 eofqiA m
201 | MIX120656 eooakA m
202 | MIX120656 bnyuqA m
203 | MIX120550 brfusA m
204 | MIX120550 ewyfyA m
205 | MIX120659 eocwgA f
206 | MIX120659 ezvjzA f
207 | MIX120555 blkzeA f
208 | MIX120555 esjwgA f
209 | MIX120556 ennddA f
210 | MIX120556 ecwetA f
211 | MIX120338 byizmA m
212 | MIX120338 efpbjA m
213 | MIX120339 eofbqA f
214 | MIX120339 erxhlA f
215 | MIX120889 eqetxA m
216 | MIX120886 elyenA f
217 | MIX120335 bxbmjA f
218 | MIX120884 brfqfA m
219 | MIX120337 bouhrA m
220 | MIX120330 erwhxA f
221 | MIX120330 bshgpA f
222 | MIX120883 eszpxA f
223 | MIX120332 egzwkA f
224 | MIX120235 ebvgfA m
225 | MIX120235 bpreyA m
226 | MIX120726 eounfA f
227 | MIX120726 eibayA f
228 | MIX120724 emqdzA f
229 | MIX120724 ebcgwA f
230 | MIX120721 eowwxA f
231 | MIX120721 bwysiA f
232 | MIX120232 bifcmA m
233 | MIX120232 elkklA m
234 | MIX120238 bwtiiA m
235 | MIX120238 edtguA m
236 | MIX120729 erecpA m
237 | MIX120729 eifceA m
238 | MIX120728 edmhsA m
239 | MIX120728 bioqmA m
240 | MIX120905 elpomA f
241 | MIX120902 ejsaxA f
242 | MIX120901 ezvlyA m
243 | MIX120901 enbsxA m
244 | MIX120348 eahjaA f
245 | MIX120838 bllhhA f
246 | MIX120424 etsgpA f
247 | MIX120425 eewecA f
248 | MIX120425 bfynwA f
249 | MIX120426 bpkycA f
250 | MIX120426 eknitA f
251 | MIX120833 bbkvfA m
252 | MIX120833 ezywaA m
253 | MIX120832 eodhqA f
254 | MIX120832 erfmlA f
255 | MIX120831 emxbjA m
256 | MIX120831 bceogA m
257 | MIX120345 eatgrA f
258 | MIX120345 bvhmvA f
259 | MIX120344 btxprA f
260 | MIX120344 eymadA f
261 | MIX120346 egjjqA m
262 | MIX120346 bxvvjA m
263 | MIX120428 bsztnA f
264 | MIX120428 eqamoA f
265 | MIX120343 bcrwjA m
266 | MIX120448 elravA f
267 | MIX120284 engyoA f
268 | MIX120312 ehkbvA m
269 | MIX120312 bkqcxA m
270 | MIX120281 epdnpA m
271 | MIX120281 esxpeA m
272 | MIX120282 bbevbA f
273 | MIX120282 ezupeA f
274 | MIX120288 enscqA m
275 | MIX120515 ejtohA f
276 | MIX120515 efzgmA f
277 | MIX120510 eokumA f
278 | MIX120510 eegqvA f
279 | MIX120511 eajbdA m
280 | MIX120511 exrhdA m
281 | MIX120512 ewiwyA m
282 | MIX120512 bvzpyA m
283 | MIX120513 eejknA f
284 | MIX120513 bozxzA f
285 | MIX120519 bbshuA f
286 | MIX120480 bdssaA f
287 | MIX120480 elrxaA f
288 | MIX120762 btnywA f
289 | MIX120762 eywczA f
290 | MIX120761 babjyA f
291 | MIX120761 efiteA f
292 | MIX120760 bedhpA m
293 | MIX120760 etlvbA m
294 | MIX120764 bcpljA f
295 | MIX120764 ewqvtA f
296 | MIX120600 esufjA f
297 | MIX120600 bbewxA f
298 | MIX120768 bbzjeA f
299 | MIX120768 eiyjlA f
300 | MIX120605 beoteA m
301 | MIX120561 bgyyzA f
302 | MIX120561 edjqpA f
303 | MIX120560 emggbA m
304 | MIX120560 ezmmrA m
305 | MIX120563 eqaujA f
306 | MIX120563 eyaltA f
307 | MIX120562 beytaA f
308 | MIX120562 eggnjA f
309 | MIX120565 bewisA f
310 | MIX120565 exxgdA f
311 | MIX120564 bqrffA f
312 | MIX120564 ehbreA f
313 | MIX120566 ezferA m
314 | MIX120566 eeypoA m
315 | MIX120568 eolrpA f
316 | MIX120488 bjrxbA f
317 | MIX120488 efavfA f
318 | MIX120862 ebjnfA m
319 | MIX120862 ewozdA m
320 | MIX120896 ejmsmA f
321 | MIX120866 egtxyA m
322 | MIX120867 ecpeyA f
323 | MIX120780 eiooqA m
324 | MIX120780 btgmyA m
325 | MIX120783 byckgA m
326 | MIX120783 exrlsA m
327 | MIX120782 erspzA m
328 | MIX120782 ezbmuA m
329 | MIX120785 bqvmiA m
330 | MIX120785 eohesA m
331 | MIX120787 ejhlfA f
332 | MIX120786 bomfaA m
333 | MIX120786 eayswA m
334 | MIX120468 etexhA f
335 | MIX120468 eezogA f
336 | MIX120469 bcvmuA f
337 | MIX120469 eirspA f
338 | MIX120465 bpaivA m
339 | MIX120465 eelisA m
340 | MIX120466 euuqoA m
341 | MIX120466 bbdjmA m
342 | MIX120467 bosntA m
343 | MIX120710 bxxjxA m
344 | MIX120710 eldnzA m
345 | MIX120462 ehbsfA f
346 | MIX120462 edbatA f
347 | MIX120463 eiedxA m
348 | MIX120463 bkkbyA m
349 | MIX120304 elyifA m
350 | MIX120304 blunbA m
351 | MIX120269 bvcnzA m
352 | MIX120269 ehrbvA m
353 | MIX120301 ezdalA f
354 | MIX120301 eltwaA f
355 | MIX120300 edzhfA m
356 | MIX120300 ecloeA m
357 | MIX120303 etkesA m
358 | MIX120303 enndrA m
359 | MIX120262 elnbyA m
360 | MIX120262 byhhfA m
361 | MIX120263 efrfzA m
362 | MIX120263 bhggeA m
363 | MIX120261 bfdpqA m
364 | MIX120261 evvnmA m
365 | MIX120309 beflfA m
366 | MIX120309 ezikzA m
367 | MIX120308 euiikA f
368 | MIX120308 bosihA f
369 | MIX113093 bclkpA f
370 | MIX120418 eydolA m
371 | MIX120941 bkotbA f
372 | MIX120217 ehuloA m
373 | MIX120217 erxrmA m
374 | MIX120743 ebszuA m
375 | MIX120743 baxbfA m
376 | MIX120214 eptxcA m
377 | MIX120214 ejrmvA m
378 | MIX120647 ekedeA m
379 | MIX120641 eyfqbA f
380 | MIX120641 etcibA f
381 | MIX120642 eerirA f
382 | MIX120642 enxrmA f
383 | MIX120643 efvynA f
384 | MIX120643 ewxmyA f
385 | MIX120524 edwgfA f
386 | MIX120524 bcdvcA f
387 | MIX120527 bnxklA m
388 | MIX120527 eywpgA m
389 | MIX120526 ewxrrA f
390 | MIX120526 efzrzA f
391 | MIX120648 bdbjyA m
392 | MIX120520 bdnyzA f
393 | MIX120520 ecoypA f
394 | MIX120523 bwupkA f
395 | MIX120523 efrnnA f
396 | MIX120522 enmvaA f
397 | MIX120522 egnmnA f
398 | MIX120671 elaxaA f
399 | MIX120671 eghunA f
400 | MIX120738 bxgvyA f
401 | MIX120738 eyaanA f
402 | MIX120739 ejvqaA m
403 | MIX120739 bsymvA m
404 | MIX120731 eqprsA m
405 | MIX120731 epcuiA m
406 | MIX120732 bceyzA m
407 | MIX120732 edqglA m
408 | MIX120733 eqblxA m
409 | MIX120733 bmwyyA m
410 | MIX120735 erzruA f
411 | MIX120735 boweoA f
412 | MIX120736 ewwxbA f
413 | MIX120736 ecsjfA f
414 | MIX120737 effrqA f
415 | MIX120737 bliusA f
416 | MIX120631 bmrsaA f
417 | MIX120631 evppxA f
418 | MIX120633 bqnklA m
419 | MIX120633 efgdcA m
420 | MIX120632 eficbA f
421 | MIX120632 bqsaeA f
422 | MIX120636 exyopA f
423 | MIX120636 ezhtpA f
424 | MIX120638 eprmuA f
425 | MIX120638 bzpkaA f
426 | MIX120229 blxouA m
427 | MIX120229 etbjmA m
428 | MIX120859 bcgcgA f
429 | MIX120912 ecqmoA f
430 | MIX120914 ervorA m
431 | MIX120916 evizkA m
432 | MIX120919 efanjA f
433 | MIX120853 btomfA f
434 | MIX120852 boatrA f
435 | MIX120852 ewwpaA f
436 | MIX120854 bdrkyA f
437 | MIX120854 elxllA f
438 | MIX120856 evtrxA m
439 | MIX120856 eonxhA m
440 | MIX120454 epmwgA f
441 | MIX120454 buwiyA f
442 | MIX120457 eiriiA m
443 | MIX120457 erpuvA m
444 | MIX120359 eccgkA f
445 | MIX120359 eaydiA f
446 | MIX120828 bzspoA f
447 | MIX120450 bbeouA m
448 | MIX120450 eltgfA m
449 | MIX120453 bcnvrA f
450 | MIX120453 eyatkA f
451 | MIX120452 erhjvA m
452 | MIX120452 becmqA m
453 | MIX120824 earfnA f
454 | MIX120824 eqsixA f
455 | MIX120353 ecvoyA m
456 | MIX120353 eeipvA m
457 | MIX120826 efwvkA f
458 | MIX120826 elekkA f
459 | MIX120351 eytqfA m
460 | MIX120351 efbelA m
461 | MIX120820 exejnA f
462 | MIX120820 bkyjpA f
463 | MIX120458 ehusiA m
464 | MIX120822 eqbctA f
465 | MIX120822 eceacA f
466 | MIX120823 eceylA m
467 | MIX120823 bhaeuA m
468 | MIX120521 efkxfA f
469 | MIX120521 exxjaA f
470 | MIX120817 esuacA f
471 | MIX120817 bcwygA f
472 | MIX120816 eklptA m
473 | MIX120797 eviiqA f
474 | MIX120797 enalmA f
475 | MIX110236 blqwsA f
476 | MIX110236 eosvlA f
477 | MIX120380 eabuvA f
478 | MIX120380 ekhljA f
479 | MIX120774 bsiygA f
480 | MIX120774 esbwqA f
481 | MIX120770 bdvmmA m
482 | MIX120770 ewakjA m
483 | MIX120674 efkpwA f
484 | MIX120674 eyuilA f
485 | MIX120778 eykisA m
486 | MIX120778 etqhqA m
487 | MIX120779 bvntuA f
488 | MIX120779 ejkugA f
489 | MIX120673 ehricA f
490 | MIX120573 eqrueA f
491 | MIX120573 edzhcA f
492 | MIX120570 bknqtA m
493 | MIX120570 eunbzA m
494 | MIX120577 bqmnmA f
495 | MIX120577 elkiyA f
496 | MIX120574 eztwwA m
497 | MIX120574 bwnieA m
498 | MIX120575 evkcvA f
499 | MIX120575 ezueaA f
500 | MIX120578 ekwodA f
501 | MIX120578 bqbnwA f
502 | MIX120579 bafnzA f
503 | MIX120579 eqzhtA f
504 | MIX120814 eoyawA f
505 | MIX120814 edmccA f
506 | MIX120798 byfkpA m
507 | MIX120798 ewngdA m
508 | MIX120799 bvollA f
509 | MIX120811 ehaopA f
510 | MIX120811 eqrzoA f
511 | MIX120810 eouelA m
512 | MIX120810 biavmA m
513 | MIX120792 emfxrA f
514 | MIX120792 ekpeeA f
515 | MIX120793 ewgfcA m
516 | MIX120791 eqedvA f
517 | MIX120791 baidgA f
518 | MIX120819 edezlA m
519 | MIX120818 eokfrA f
520 | MIX120818 blpnwA f
521 | MIX120794 ejllyA m
522 | MIX120794 bfivaA m
523 | MIX120795 eoxvaA m
524 | MIX120795 bzqohA m
525 | MIX120493 bkphpA m
526 | MIX120493 etthtA m
527 | MIX120492 bzoxnA m
528 | MIX120492 eprfyA m
529 | MIX120494 bffeoA m
530 | MIX120494 ediizA m
531 | MIX120497 ewjknA m
532 | MIX120499 eunypA m
533 | MIX120498 ehtuoA f
534 | MIX120498 bmqipA f
535 | MIX120701 edkbfA f
536 | MIX120701 egiywA f
537 | MIX120700 bqklvA f
538 | MIX120700 ehcarA f
539 | MIX120314 bdpzlA m
540 | MIX120314 essjnA m
541 | MIX120315 blbhrA f
542 | MIX120315 etvzvA f
543 | MIX120705 emtukA f
544 | MIX120705 bytpgA f
545 | MIX120704 baxysA m
546 | MIX120707 byxhjA f
547 | MIX120707 eefldA f
548 | MIX120706 erxlvA f
549 | MIX120706 emkwyA f
550 | MIX120256 eqmktA m
551 | MIX120318 ejasaA m
552 | MIX120318 bqxtaA m
553 | MIX120319 ectweA f
554 | MIX120319 ezahvA f
555 | MIX111756 eowlvA m
556 | MIX111756 bdewrA m
557 | MIX120355 ejfvmA m
558 | MIX120316 efealA m
559 | MIX120316 bxjtrA m
560 | MIX120317 bbszwA f
561 | MIX120317 ererrA f
562 | MIX120409 etmyyA f
563 | MIX120402 bcbjyA m
564 | MIX120402 ecvnhA m
565 | MIX120403 esujaA m
566 | MIX120403 byoizA m
567 | MIX120401 bmtfqA f
568 | MIX120401 ezbfpA f
569 | MIX120406 exvueA m
570 | MIX120406 eryldA m
571 | MIX120404 bpdviA m
572 | MIX120404 eohikA m
573 | MIX120405 bhkktA f
574 | MIX120259 ejnexA m
575 | MIX120259 bkkpcA m
576 | MIX120311 evzvrA m
577 | MIX120311 bylpvA m
578 | MIX120255 briynA m
579 | MIX120255 ebrlaA m
580 | MIX120226 enbxjA m
581 | MIX120538 bfajpA m
582 | MIX120534 bojwbA f
583 | MIX120534 elugoA f
584 | MIX120535 brtydA m
585 | MIX120535 eccygA m
586 | MIX120532 esnifA f
587 | MIX120532 elvexA f
588 | MIX120533 eqwioA m
589 | MIX120533 bylhyA m
590 | MIX120699 ebofaA f
591 | MIX120699 eburgA f
592 | MIX120698 esylnA f
593 | MIX120698 eqxfdA f
594 | MIX120697 bkeugA m
595 | MIX120696 eheceA f
596 | MIX120696 ehtnnA f
597 | MIX120694 bkqfpA m
598 | MIX120694 ekxnfA m
599 | MIX120693 bvjdtA m
600 | MIX120692 ezrvuA m
601 | MIX120692 bvahiA m
602 | MIX120691 euvqqA m
603 | MIX120691 bmndbA m
604 | MIX120690 bugyfA m
605 | MIX120690 envhfA m
606 | MIX120218 erjhkA m
607 | MIX120218 bappeA m
608 | MIX120749 bjedpA m
609 | MIX120749 ecxkoA m
610 | MIX120747 bpmimA m
611 | MIX120747 evehnA m
612 | MIX120740 bayqpA m
613 | MIX120740 ewkwzA m
614 | MIX120215 ezydcA m
615 | MIX120215 btblcA m
616 | MIX120742 bacakA m
617 | MIX120742 ecegiA m
618 | MIX120623 ehtmoA m
619 | MIX120623 ewlvvA m
620 | MIX120588 biuvwA f
621 | MIX120588 edcljA f
622 | MIX120627 ehmtnA f
623 | MIX120627 evhaqA f
624 | MIX120625 exkmcA m
625 | MIX120582 eruwwA m
626 | MIX120582 eceurA m
627 | MIX120581 bwjrjA f
628 | MIX120581 enutdA f
629 | MIX120580 ejrinA f
630 | MIX120580 bjcilA f
631 | MIX120585 esejaA f
632 | MIX120585 eblbrA f
633 | MIX120840 bsthwA f
634 | MIX120840 eigplA f
635 | MIX120447 eiqbdA m
636 | MIX120447 erspwA m
637 | MIX120444 bawboA f
638 | MIX120440 bjmjaA m
639 | MIX120440 equsbA m
640 | MIX120367 empidA f
641 | MIX120367 baukvA f
642 | MIX120365 elkheA f
643 | MIX120362 bquycA m
644 | MIX120361 epycxA m
645 |
--------------------------------------------------------------------------------
/train.list:
--------------------------------------------------------------------------------
1 | MIX120371 bgjsyA m
2 | MIX120395 btcdvA m
3 | MIX120668 enyveA f
4 | MIX120667 bqaouA m
5 | MIX120664 eslnrA m
6 | MIX120662 edcrvA m
7 | MIX120663 ehqurA f
8 | MIX120546 bbdypA f
9 | MIX120544 bvbitA f
10 | MIX120540 ecfptA m
11 | MIX120548 bhwehA m
12 | MIX120807 efltfA f
13 | MIX120804 bpzqiA m
14 | MIX120805 brtgnA m
15 | MIX120803 esifdA f
16 | MIX120800 eozvfA f
17 | MIX120809 bmcdnA m
18 | MIX120483 eonzcA m
19 | MIX120329 bgykaA m
20 | MIX120481 esorwA m
21 | MIX120484 ezwvzA f
22 | MIX120485 bopnlA f
23 | MIX120323 eyvbrA m
24 | MIX120897 bfmxmA f
25 | MIX120489 elfiiA f
26 | MIX120891 bkdupA m
27 | MIX120890 bxzhqA f
28 | MIX120892 epyrtA f
29 | MIX120713 eoeetA m
30 | MIX120242 byebmA m
31 | MIX120243 ebtvlA m
32 | MIX120716 ekjwmA f
33 | MIX120714 emdjkA f
34 | MIX120715 ebxhlA f
35 | MIX120718 elrjqA m
36 | MIX120719 encenA f
37 | MIX120829 eatmnA m
38 | MIX120933 bjgunA m
39 | MIX120935 booryA m
40 | MIX120821 bxnveA f
41 | MIX120438 epceiA m
42 | MIX120436 byqryA f
43 | MIX120435 ereqgA f
44 | MIX120434 eaftqA m
45 | MIX120432 bmrhxA m
46 | MIX120431 brfdfA m
47 | MIX120430 bospdA m
48 | MIX120293 banxtA f
49 | MIX120290 bmfiuA m
50 | MIX120297 beetsA f
51 | MIX120295 eeslwA f
52 | MIX120294 ebpmeA m
53 | MIX120299 bsgsmA f
54 | MIX120503 ezkikA f
55 | MIX120502 eqawhA f
56 | MIX120501 bwnuwA f
57 | MIX120500 enmxkA f
58 | MIX120506 bjpwgA f
59 | MIX120505 emuncA f
60 | MIX120266 bfvcoA m
61 | MIX120509 ewumeA m
62 | MIX120680 eipntA f
63 | MIX120683 ewtzlA m
64 | MIX120684 besodA f
65 | MIX120685 ekllgA f
66 | MIX120686 eouowA f
67 | MIX120688 efqtgA m
68 | MIX120882 emdffA f
69 | MIX120880 bsjfkA m
70 | MIX120333 ererwA f
71 | MIX120727 egkptA f
72 | MIX120208 balnzA m
73 | MIX120759 bfcbhA f
74 | MIX120756 eupycA m
75 | MIX120750 edcwvA f
76 | MIX120751 elofsA f
77 | MIX120617 eovscA m
78 | MIX120613 erpavA f
79 | MIX120612 bjzksA f
80 | MIX120611 euopgA f
81 | MIX120594 elmbxA f
82 | MIX120596 ehzrbA f
83 | MIX120590 eccccA f
84 | MIX120591 exxabA f
85 | MIX120593 evdedA f
86 | MIX120233 bnwjrA m
87 | MIX120879 euvhqA m
88 | MIX120877 eebdzA m
89 | MIX120876 edydsA f
90 | MIX120874 euxhmA m
91 | MIX120873 brjalA f
92 | MIX120872 bpjdjA f
93 | MIX120870 etptfA f
94 | MIX120473 bgivgA f
95 | MIX120472 brjcgA f
96 | MIX120475 bayiiA f
97 | MIX120474 eeklkA f
98 | MIX120279 ekiuoA m
99 | MIX120278 ebkrvA m
100 | MIX120374 eyuzmA f
101 | MIX120376 ejynvA f
102 | MIX120271 bhzrsA m
103 | MIX120379 ejeqgA m
104 | MIX111138 emosuA f
105 | MIX111268 eqrmjA m
106 | MIX120618 errxoA f
107 | MIX120653 erpclA m
108 | MIX120651 bpjwoA f
109 | MIX120650 ecpniA m
110 | MIX120657 eplpzA m
111 | MIX120656 ewkbtA m
112 | MIX120550 evaizA m
113 | MIX120659 boulxA f
114 | MIX120555 eylayA f
115 | MIX120556 eojudA f
116 | MIX120338 esdiuA m
117 | MIX120339 bsnduA f
118 | MIX120889 bhvgwA m
119 | MIX120886 btkcqA f
120 | MIX120335 eeitmA f
121 | MIX120884 ewidmA m
122 | MIX120337 endyoA m
123 | MIX120330 ekypcA f
124 | MIX120883 bymcnA f
125 | MIX120332 bbyvjA f
126 | MIX120235 epxssA m
127 | MIX120726 bdbrxA f
128 | MIX120724 bwfekA f
129 | MIX120721 eafszA f
130 | MIX120232 ewauzA m
131 | MIX120238 epzxjA m
132 | MIX120729 bpjkgA m
133 | MIX120728 epulwA m
134 | MIX120905 byafdA f
135 | MIX120902 bmaooA f
136 | MIX120901 bnvyqA m
137 | MIX120348 bveejA f
138 | MIX120838 ehcqmA f
139 | MIX120424 bcudbA f
140 | MIX120425 ettpaA f
141 | MIX120426 edebqA f
142 | MIX120833 eqbdkA m
143 | MIX120832 bdtamA f
144 | MIX120831 effteA m
145 | MIX120345 ekqxsA f
146 | MIX120344 ehbwpA f
147 | MIX120346 ezlnuA m
148 | MIX120428 edydzA f
149 | MIX120343 ecfpaA m
150 | MIX120448 bgaaxA f
151 | MIX120284 bpsymA f
152 | MIX120312 ebjroA m
153 | MIX120281 bnmnqA m
154 | MIX120282 ebpcwA f
155 | MIX120288 bcsfhA m
156 | MIX120515 bgvytA f
157 | MIX120510 bmgkrA f
158 | MIX120511 bdujzA m
159 | MIX120512 egrgaA m
160 | MIX120513 evhimA f
161 | MIX120519 emefkA f
162 | MIX120480 esntiA f
163 | MIX120762 ehonyA f
164 | MIX120761 efpowA f
165 | MIX120760 eyhvqA m
166 | MIX120764 exnlrA f
167 | MIX120600 exbdiA f
168 | MIX120768 elilgA f
169 | MIX120605 ewfynA m
170 | MIX120561 entxeA f
171 | MIX120560 biqqoA m
172 | MIX120563 bwtjgA f
173 | MIX120562 ewvnnA f
174 | MIX120565 eelnqA f
175 | MIX120564 esjmrA f
176 | MIX120566 blmatA m
177 | MIX120568 bljbgA f
178 | MIX120488 edauaA f
179 | MIX120862 bfwjnA m
180 | MIX120896 bnjpyA f
181 | MIX120866 bybmbA m
182 | MIX120867 bngzaA f
183 | MIX120780 epndyA m
184 | MIX120783 eqipgA m
185 | MIX120782 bkqogA m
186 | MIX120785 eixskA m
187 | MIX120787 bzzmhA f
188 | MIX120786 enaudA m
189 | MIX120468 bgnjoA f
190 | MIX120469 excrjA f
191 | MIX120465 emuxqA m
192 | MIX120466 enlkqA m
193 | MIX120467 efeuiA m
194 | MIX120710 eprwkA m
195 | MIX120462 bkvhsA f
196 | MIX120463 eojknA m
197 | MIX120304 elwvdA m
198 | MIX120269 edfboA m
199 | MIX120301 bpiqsA f
200 | MIX120300 bluskA m
201 | MIX120303 bmcxrA m
202 | MIX120262 epppsA m
203 | MIX120263 eirbvA m
204 | MIX120261 evovoA m
205 | MIX120309 edjbyA m
206 | MIX120308 ebpmdA f
207 | MIX113093 enfdfA f
208 | MIX120418 bvvzgA m
209 | MIX120941 epufnA f
210 | MIX120217 bocdkA m
211 | MIX120743 esxmgA m
212 | MIX120214 bpezhA m
213 | MIX120647 bzvvsA m
214 | MIX120641 banoeA f
215 | MIX120642 bbrzqA f
216 | MIX120643 brvxxA f
217 | MIX120524 eyxzaA f
218 | MIX120527 eymmtA m
219 | MIX120526 brdckA f
220 | MIX120648 eqfokA m
221 | MIX120520 eutvcA f
222 | MIX120523 ecuiuA f
223 | MIX120522 briltA f
224 | MIX120671 bihnoA f
225 | MIX120738 epeupA f
226 | MIX120739 ekcfhA m
227 | MIX120731 bysbaA m
228 | MIX120732 erljyA m
229 | MIX120733 ermkrA m
230 | MIX120735 eqwbxA f
231 | MIX120736 bgdjuA f
232 | MIX120737 etjawA f
233 | MIX120631 eijrcA f
234 | MIX120633 ezqioA m
235 | MIX120632 egzksA f
236 | MIX120636 bgnmkA f
237 | MIX120638 epqqgA f
238 | MIX120229 erkzzA m
239 | MIX120859 emnwrA f
240 | MIX120912 bvrovA f
241 | MIX120914 bbhhsA m
242 | MIX120916 bjmhdA m
243 | MIX120919 blsxoA f
244 | MIX120853 eyfjiA f
245 | MIX120852 eihqsA f
246 | MIX120854 evyiiA f
247 | MIX120856 bnjhmA m
248 | MIX120454 etyqkA f
249 | MIX120457 bzufaA m
250 | MIX120359 biszcA f
251 | MIX120828 eqvmhA f
252 | MIX120450 eqfapA m
253 | MIX120453 ezhkwA f
254 | MIX120452 eelqeA m
255 | MIX120824 bnmxaA f
256 | MIX120353 btdstA m
257 | MIX120826 bvwmsA f
258 | MIX120351 bfphxA m
259 | MIX120820 erupwA f
260 | MIX120458 bjzatA m
261 | MIX120822 bwpkuA f
262 | MIX120823 etyjuA m
263 | MIX120521 bnqbzA f
264 | MIX120817 eubexA f
265 | MIX120816 banxaA m
266 | MIX120797 bsigpA f
267 | MIX110236 ejmzxA f
268 | MIX120380 bxqoxA f
269 | MIX120774 emokuA f
270 | MIX120770 efrlpA m
271 | MIX120674 ehpkmA f
272 | MIX120778 bgjdwA m
273 | MIX120779 exdgfA f
274 | MIX120673 bdyiiA f
275 | MIX120573 brbqmA f
276 | MIX120570 epgtqA m
277 | MIX120577 eagclA f
278 | MIX120574 eioxyA m
279 | MIX120575 babuyA f
280 | MIX120578 erdsmA f
281 | MIX120579 ehrdvA f
282 | MIX120814 bvcysA f
283 | MIX120798 exqviA m
284 | MIX120799 emzbcA f
285 | MIX120811 btjvxA f
286 | MIX120810 esimnA m
287 | MIX120792 bjsfmA f
288 | MIX120793 bdekuA m
289 | MIX120791 eypprA f
290 | MIX120819 bssooA m
291 | MIX120818 emqrdA f
292 | MIX120794 eaojoA m
293 | MIX120795 eqsrfA m
294 | MIX120493 epoftA m
295 | MIX120492 edxphA m
296 | MIX120494 ehoxsA m
297 | MIX120497 bbmebA m
298 | MIX120499 bfqeiA m
299 | MIX120498 ecbsrA f
300 | MIX120701 bigjlA f
301 | MIX120700 efjepA f
302 | MIX120314 evtuwA m
303 | MIX120315 eyrngA f
304 | MIX120705 eiynmA f
305 | MIX120704 euuiyA m
306 | MIX120707 enrilA f
307 | MIX120706 bpnbxA f
308 | MIX120256 bqqguA m
309 | MIX120318 emalcA m
310 | MIX120319 bkdimA f
311 | MIX111756 efvooA m
312 | MIX120355 btmkiA m
313 | MIX120316 eqzomA m
314 | MIX120317 eoxruA f
315 | MIX120409 bqdcsA f
316 | MIX120402 eiduyA m
317 | MIX120403 egrefA m
318 | MIX120401 ecvekA f
319 | MIX120406 bzaamA m
320 | MIX120404 ehddqA m
321 | MIX120405 ercxxA f
322 | MIX120259 ejgenA m
323 | MIX120311 epvcfA m
324 | MIX120255 evqgaA m
325 | MIX120226 bdhciA m
326 | MIX120538 evgfzA m
327 | MIX120534 eskgpA f
328 | MIX120535 exnffA m
329 | MIX120532 ehpprA f
330 | MIX120533 ejvpvA m
331 | MIX120699 bitsvA f
332 | MIX120698 bzattA f
333 | MIX120697 elbuxA m
334 | MIX120696 bjlngA f
335 | MIX120694 ewmayA m
336 | MIX120693 ejvqkA m
337 | MIX120692 eprvsA m
338 | MIX120691 esueaA m
339 | MIX120690 eejjuA m
340 | MIX120218 eleqgA m
341 | MIX120749 eptlnA m
342 | MIX120747 evigvA m
343 | MIX120740 etjyyA m
344 | MIX120215 erbdzA m
345 | MIX120742 exzzxA m
346 | MIX120623 bwaykA m
347 | MIX120588 eqggfA f
348 | MIX120627 ephpfA f
349 | MIX120625 bqznpA m
350 | MIX120582 bolvkA m
351 | MIX120581 eportA f
352 | MIX120580 eykptA f
353 | MIX120585 bdblpA f
354 | MIX120840 egpzpA f
355 | MIX120447 bsdtvA m
356 | MIX120444 edxmyA f
357 | MIX120440 eajvuA m
358 | MIX120367 ehmliA f
359 | MIX120365 buqgzA f
360 | MIX120362 efmszA m
361 | MIX120361 bbpnfA m
362 |
--------------------------------------------------------------------------------