speice.io/assets/js/cd68b6a4.371cb0e3.js

1 line
22 KiB
JavaScript
Raw Permalink Normal View History

"use strict";(self.webpackChunkspeice_io=self.webpackChunkspeice_io||[]).push([["1408"],{4849:function(e,t,s){s.r(t),s.d(t,{metadata:()=>n,contentTitle:()=>u,default:()=>x,assets:()=>m,toc:()=>g,frontMatter:()=>p});var n=s("9810"),a=s("5893"),i=s("65");let o=s.p+"assets/medias/1-bc356a416dae6236d2e366a42bee2cd3.wav",r=s.p+"assets/medias/2-bc356a416dae6236d2e366a42bee2cd3.wav",l=s.p+"assets/medias/3-e8092f56b531e18a0d335c0f391b46b9.wav",d=s.p+"assets/medias/4-90047e615651067970475dc7f117aceb.wav",c=s.p+"assets/medias/5-896767515da7b5a0fe46e9a205c1130f.wav",h=s.p+"assets/medias/6-756ec27a28b4fa02181f43ed9061f0b3.wav",p={slug:"2016/11/pca-audio-compression",title:"PCA audio compression",date:new Date("2016-11-01T12:00:00.000Z"),authors:["bspeice"],tags:[]},u=void 0,m={authorsImageUrls:[void 0]},g=[{value:"Towards a new (and pretty poor) compression scheme",id:"towards-a-new-and-pretty-poor-compression-scheme",level:2},{value:"A Brief Introduction to Audio Compression",id:"a-brief-introduction-to-audio-compression",level:2},{value:"A PCA-based Compression Scheme",id:"a-pca-based-compression-scheme",level:2},{value:"Running the Algorithm",id:"running-the-algorithm",level:2},{value:"Drop the (Treble)",id:"drop-the-treble",level:2},{value:"A More Realistic Example",id:"a-more-realistic-example",level:2},{value:"Conclusions",id:"conclusions",level:2}];function f(e){let t={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.p,{children:"In which I apply Machine Learning techniques to Digital Signal Processing to astounding failure."}),"\n",(0,a.jsx)(t.h2,{id:"towards-a-new-and-pretty-poor-compression-scheme",children:"Towards a new (and pretty poor) compression scheme"}),"\n",(0,a.jsxs)(t.p,{children:["I'm going to be working with some audio data for a while as I get prepared for a term project this semester. I'll be working (with a partner) to design a system for separating voices from music. Given my total lack of experience with ",(0,a.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Digital_signal_processing",children:"Digital Signal Processing"})," I figured that now was as good a time as ever to work on a couple of fun projects that would get me back up to speed."]}),"\n",(0,a.jsx)(t.p,{children:"The first project I want to work on: Designing a new compression scheme for audio data."}),"\n",(0,a.jsx)(t.h2,{id:"a-brief-introduction-to-audio-compression",children:"A Brief Introduction to Audio Compression"}),"\n",(0,a.jsxs)(t.p,{children:["Audio files when uncompressed (files ending with ",(0,a.jsx)(t.code,{children:".wav"}),") are huge. Like, 10.5 Megabytes per minute huge. Storage is cheap these days, but that's still an incredible amount of data that we don't really need. Instead, we'd like to compress that data so that it's not taking up so much space. There are broadly two ways to accomplish this:"]}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsxs)(t.p,{children:["Lossless compression - Formats like ",(0,a.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/FLAC",children:"FLAC"}),", ",(0,a.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Apple_Lossless",children:"ALAC"}),", and ",(0,a.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Monkey%27s_Audio",children:"Monkey's Audio (.ape)"})," all go down this route. The idea is that when you compress and uncompress a file, you get exactly the same as what you started with."]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsxs)(t.p,{children:["Lossy compression - Formats like ",(0,a.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/MP3",children:"MP3"}),", ",(0,a.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Vorbis",children:"Ogg"}),", and ",(0,a.jsxs)(t.a,{href:"https://en.wikipedia.org/wiki/Advanced_Audio_Coding",children:["AAC (",(0,a.jsx)(t.code,{children:".m4a"}),")"]})," are far more popular, but make a crucial tradeoff: We can reduce the file size even more during compression, but the decompressed file won't be the same."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{chil