1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1886],{96273:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/article/python/extract-accompaniment-using-spleeter",function(){return s(97101)}])},97101:function(e,n,s){"use strict";s.r(n),s.d(n,{default:function(){return v}});var r=s(85893),t=s(67294),l=s(9008),i=s.n(l),a=s(26219),o=s(72253),c=s(14932),p=s(11151),d=s(57307),h=s(41577),u=s(52856),x=function(e){var n=(0,t.useRef)(null),s=(0,t.useRef)(null);return(0,r.jsxs)(t.Fragment,{children:[(0,r.jsx)("h4",{children:"åçé³ä¹ï¼ãI love you ç§ã®åã"}),(0,r.jsx)("audio",{src:"/media/extract-accompaniment-using-spleeter/1.mp4",controls:!0}),(0,r.jsx)("h4",{className:"mt-[12px]",children:"æååç人声åä¼´å¥"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"align-[21px]",children:"人声ï¼"}),(0,r.jsx)("audio",{ref:n,src:"/media/extract-accompaniment-using-spleeter/vocals.wav",controls:!0})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"align-[21px]",children:"ä¼´å¥ï¼"}),(0,r.jsx)("audio",{ref:s,src:"/media/extract-accompaniment-using-spleeter/accompaniment.wav",controls:!0})]}),(0,r.jsxs)(u.ZP.Group,{className:"mt-[12px] mb-[16px]",children:[(0,r.jsx)(u.ZP,{type:"primary",onClick:function(e){n.current&&s.current&&(n.current.currentTime=s.current.currentTime=0,n.current.play(),s.current.play())},children:"åæ¶ææ¾"}),(0,r.jsx)(u.ZP,{onClick:function(e){n.current&&s.current&&(n.current.pause(),s.current.pause())},children:"æå"})]})]})};function m(e){var n=(0,o._)({code:"code",div:"div",h1:"h1",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul"},(0,p.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"使ç¨Spleeteræåä¼´å¥"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(h.Z,{href:"https://github.com/deezer/spleeter",children:"Spleeter"}),"\næ¯ç±æ³å½å¨çº¿é³ä¹æµåªä½æå¡æä¾åDeezer弿ºçå离é³é¢åºï¼å¯ä»¥å°é³é¢å离æäººå£°ãä¼´å¥ãé¼ç¹ãè´æ¯ãé¢ç´ççã\n宿¯åºäºTensorFlowçæ·±åº¦å¦ä¹ 模åï¼å¯ä»¥å¨CPUæGPUä¸è¿è¡ãå®çå离ææé常好ï¼å¯ä»¥è¯´æ¯ç®åæå¥½çå离é³é¢åºäºã"]}),"\n",(0,r.jsx)(n.h2,{children:"å®è£
æµç¨"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"å®è£
pyenvï¼å¯éï¼"}),"\n",(0,r.jsx)(n.p,{children:"Spleeterè¦æ±Pythonçæ¬ä¸º3.7 - 3.10ï¼æä»¥æä»¬éè¦å®è£
pyenvævenvæ¥ç®¡çPythonçæ¬ã"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"å®è£
pythonï¼æ¨èçæ¬ä¸ºv3.10.5ã"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"å®è£
FFmpeg"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"使ç¨pipå®è£
Spleeter"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/path/to/.pyenv/pyenv-win/versions/3.10.5/python.exe -m pip install spleeter\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"å®è£
libsndfile"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Windowsç³»ç»å¨",(0,r.jsx)(h.Z,{href:"http://www.mega-nerd.com/libsndfile/#Download",children:"http://www.mega-nerd.com/libsndfile/#Download"}),"ä¸è½½ã"]}),"\n",(0,r.jsxs)(n.li,{children:["使ç¨brewä¸è½½ï¼","\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"brew install libsndfile\n"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{children:"使ç¨Spleeteræåä¼´å¥"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"éè¿æ§è¡å½ä»¤æ¥æåä¼´å¥"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"python.exe -m spleeter separate -p spleeter:2stems -o /path/to/output /path/to/audio.mp3\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"éè¿pythonæ§è¡ä»£ç ï¼ä»£ç ç±AIçæï¼"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"import spleeter\n\n# Separate vocals and accompaniment from an audio file\nseparator = spleeter.Separator('spleeter:2stems')\nseparator.separate_to_file('path/to/audio/file', 'output/path')\n\n# Separate vocals, drums, bass, and other from an audio file\nseparator = spleeter.Separator('spleeter:4stems')\nseparator.separate_to_file('path/to/audio/file', 'output/path')\n\n# Separate vocals, drums, bass, piano, and other from an audio file\nseparator = spleeter.Separator('spleeter:5stems')\nseparator.separate_to_file('path/to/audio/file', 'output/path')\n"})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{children:"æåææ"}),"\n",(0,r.jsx)(x,{}),"\n",(0,r.jsx)(d.Z,{type:"info",message:[(0,r.jsx)(n.div,{className:"mb-0 py-[8px] text-[16px]",children:"åèå°åï¼"},"cankaodizhi"),(0,r.jsxs)(n.div,{className:"py-[8px]",children:["Python audiolab install, unable to install (or find) libsndfile on Mac OSXï¼",(0,r.jsx)(h.Z,{href:"https://stackoverflow.com/questions/13999790/python-audiolab-install-unable-to-install-or-find-libsndfile-on-mac-osx",children:"https://stackoverflow.com/questions/13999790/python-audiolab-install-unable-to-install-or-find-libsndfile-on-mac-osx"})]},"WebRTC_API")]})]})}function j(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,o._)({},(0,p.a)(),e.components).wrapper;return n?(0,r.jsx)(n,(0,c._)((0,o._)({},e),{children:(0,r.jsx)(m,(0,o._)({},e))})):m(e)}var f=function(e){return(0,r.jsx)(a.Z,{children:(0,r.jsx)(j,{})})};function v(e){return(0,r.jsxs)(t.Fragment,{children:[(0,r.jsxs)(i(),{children:[(0,r.jsx)("title",{children:"使ç¨Spleeteræåä¼´å¥"}),(0,r.jsx)("meta",{name:"keywords",content:"è§é¢, åªä½"}),(0,r.jsx)("meta",{name:"description",content:"使ç¨Spleeteræåä¼´å¥"})]}),(0,r.jsx)(f,{})]})}},94914:function(e,n,s){"use strict";var r=s(85893),t=s(73935),l=s(39332),i=s(39738),a=s(52856),o=s(70612),c=s(30448),p=s(76467),d=s(1294),h=s.n(d),u=i.Z.BackTop;n.Z=function(e){var n=(0,l.useRouter)();return[(0,r.jsxs)("div",{className:h().main,children:[e.goBack?(0,r.jsx)("div",{className:"mb-[16px] text-right",children:(0,r.jsxs)(a.ZP,{onClick:function(e){n.push("/")},children:[(0,r.jsx)(c.Z,{className:"mr-[6px]"}),"è¿å"]})}):null,null==e?void 0:e.children]},"main"),(null==e?void 0:e.goToTop)?(0,r.jsx)(p.default,{children:"object"==typeof document?(0,t.createPortal)((0,r.jsx)(u,{type:"primary",icon:(0,r.jsx)(o.Z,{}),title:"è¿åé¡¶é¨",tabIndex:0,role:"button","aria-label":"è¿åé¡¶é¨"}),document.body):null},"backTop"):null]}},26219:function(e,n,s){"use strict";var r=s(85893),t=s(66252),l=s(94914);n.Z=function(e){return(0,r.jsx)(l.Z,{goToTop:!0,goBack:!0,children:(0,r.jsx)(t.Z,{children:e.children})})}},1294:function(e){e.exports={main:"main_main__IZXSv",goToTop:"main_goToTop__Py8c8"}}},function(e){e.O(0,[2856,8375,7307,2888,9774,179],function(){return e(e.s=96273)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.