Mercurial > hg > audio-degradation-toolbox
annotate html_gen/generate_html.py @ 28:76f45f5c9afd DoP tip
- added units
* adaptiveEqualizer
* applyMfccMeanAdaption
- added corresponding data files for presets
- modified applyImpulseReponse to use the estimated average group delay to adjust
the output audio and keep the timestamps as is (was vice versa before)
- added new units demos, incl one for applyLowpass
author | SebastianEwert |
---|---|
date | Tue, 21 Jan 2014 18:08:28 +0000 |
parents | 2a219bedc712 |
children |
rev | line source |
---|---|
matthiasm@6 | 1 import sys |
matthiasm@6 | 2 |
matthiasm@6 | 3 args = sys.argv |
matthiasm@6 | 4 wavfilestump = args[1].strip().split(".")[-2].split("/")[-1] |
matthiasm@6 | 5 print wavfilestump |
matthiasm@6 | 6 fileid = wavfilestump.split("_")[-1] |
matthiasm@6 | 7 degid = "_".join(wavfilestump.split("_")[:-1]) |
matthiasm@6 | 8 |
matthiasm@6 | 9 |
matthiasm@6 | 10 html = '''<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
matthiasm@6 | 11 "http://www.w3.org/TR/html4/loose.dtd"> |
matthiasm@6 | 12 |
matthiasm@6 | 13 <html lang="en"> |
matthiasm@6 | 14 <head> |
matthiasm@6 | 15 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
matthiasm@6 | 16 <title>untitled</title> |
matthiasm@6 | 17 <meta name="generator" content="TextMate http://macromates.com/"> |
matthiasm@6 | 18 <meta name="author" content="Matthias Mauch"> |
matthiasm@6 | 19 <!-- Date: 2013-08-20 --> |
matthiasm@6 | 20 </head> |
matthiasm@6 | 21 <body style = "background:#ddd;"> |
matthiasm@6 | 22 <div> |
matthiasm@6 | 23 <div style="float:left;"> |
matthiasm@6 | 24 <h3>Original ({0})</h3> |
matthiasm@6 | 25 <img src="../demoOutput/00_Original_{0}.png" width="800px"/><br> |
matthiasm@6 | 26 <div style="margin-left:auto;margin-right:auto;width:70%"> |
matthiasm@6 | 27 <audio controls> |
matthiasm@6 | 28 <source src="../demoOutput/00_Original_{0}.wav" type="audio/wav"> |
matthiasm@6 | 29 Your browser does not support the audio element. |
matthiasm@6 | 30 </audio> |
matthiasm@6 | 31 </div> |
matthiasm@6 | 32 </div> |
matthiasm@6 | 33 <div style="float:left;"> |
matthiasm@6 | 34 <h3>{1} ({0})</h3> |
matthiasm@6 | 35 <img src="../demoOutput/{1}_{0}.png" width="800px"/><br> |
matthiasm@6 | 36 <div style="margin-left:auto;margin-right:auto;width:70%"> |
matthiasm@6 | 37 <audio controls> |
matthiasm@6 | 38 <source src="../demoOutput/{1}_{0}.wav" type="audio/wav"> |
matthiasm@6 | 39 Your browser does not support the audio element. |
matthiasm@6 | 40 </audio> |
matthiasm@6 | 41 </div> |
matthiasm@6 | 42 </div> |
matthiasm@6 | 43 </div> |
matthiasm@6 | 44 </body> |
matthiasm@6 | 45 </html>'''.format(fileid, degid) |
matthiasm@6 | 46 |
matthiasm@6 | 47 f = open(degid+"_"+fileid+".html", "w") |
matthiasm@6 | 48 print >>f, html |