Skip to content

Voice isolation — separating clean speech from background noise and mixed audio.

Python
17.3 KB
Raw Blame
<svg xmlns="http://www.w3.org/2000/svg" width="1040" height="551" viewBox="0 0 1040 551" role="img" aria-label="Inworld Voice Isolator architecture">
<desc>Input x(t), 48 kHz mono. STFT with N = 2048 and hop H = 480 (10 ms) gives X in C^(F x T), F = 1025 bins. Band split into B = 46 bands, 100 Hz to 2 kHz wide, each projected to D = 512, gives Z in R^(B x T x D). Seven dual-path blocks, alternating A, M, A, M, A, M, A: block A is time attention (rotary positions, exclusive self-attention, 8 heads) then band attention; block M is time Mamba (state 16, expand 2, conv 4) then band Mamba; the time path runs along time within each band, the band path across bands within each frame; every sub-layer has a residual connection. Per-band linear heads produce a bounded complex mask M and a bounded residual R, both in C^(F x T). Output spectrum X_hat = X + M (.) X + R, from the input spectrum X through a skip connection; iSTFT gives the isolated voice s_hat(t). The realtime checkpoint runs the same blocks causally with a look-ahead of 0, 2 or 4 frames as a learned embedding; the offline checkpoint is two-sided and renders 8 s chunks.</desc>
<rect width="100%" height="100%" fill="#FFFFFF"/>
<path d="M24.0,124.0 L72.7,124.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M78.0,124.0 L69.5,127.2 L71.9,124.0 L69.5,120.8 Z" fill="#59636E"/>
<text x="47.0" y="114.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="19" fill="#1F2328" text-anchor="middle"><tspan font-style="italic">x</tspan>(<tspan font-style="italic">t</tspan>)</text>
<text x="47.0" y="148.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="13.5" fill="#59636E" text-anchor="middle">48 kHz</text>
<path d="M962.0,124.0 L1010.7,124.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M1016.0,124.0 L1007.5,127.2 L1009.9,124.0 L1007.5,120.8 Z" fill="#59636E"/>
<text x="991.0" y="114.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="19" fill="#1F2328" text-anchor="middle"><tspan font-style="italic">ŝ</tspan>(<tspan font-style="italic">t</tspan>)</text>
<text x="991.0" y="148.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="13.5" fill="#59636E" text-anchor="middle">48 kHz</text>
<rect x="78.0" y="66" width="132.5" height="116" rx="8" fill="#DCE8F6"/>
<text x="144.2" y="97.5" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="17.5" fill="#1F2328" font-weight="600" text-anchor="middle">STFT</text>
<text x="144.2" y="121.5" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15" fill="#3D444D" text-anchor="middle"><tspan font-style="italic">N</tspan> = 2048</text>
<text x="144.2" y="142.5" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15" fill="#3D444D" text-anchor="middle"><tspan font-style="italic">H</tspan> = 480 (10 ms)</text>
<text x="144.2" y="163.5" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15" fill="#3D444D" text-anchor="middle"><tspan font-style="italic">F</tspan> = 1025 bins</text>
<rect x="242.4" y="66" width="154.6" height="116" rx="8" fill="#D7EEDF"/>
<text x="319.7" y="97.5" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="17.5" fill="#1F2328" font-weight="600" text-anchor="middle">Band split</text>
<text x="319.7" y="121.5" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15" fill="#3D444D" text-anchor="middle"><tspan font-style="italic">B</tspan> = 46 bands</text>
<text x="319.7" y="142.5" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15" fill="#3D444D" text-anchor="middle">100 Hz–2 kHz wide</text>
<text x="319.7" y="163.5" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15" fill="#3D444D" text-anchor="middle">linear to <tspan font-style="italic">D</tspan> = 512</text>
<rect x="428.9" y="66" width="180.9" height="116" rx="8" fill="#D7EEDF"/>
<text x="519.4" y="108.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="17.5" fill="#1F2328" font-weight="600" text-anchor="middle">7 dual-path blocks</text>
<text x="519.4" y="132.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15" fill="#3D444D" text-anchor="middle">A M A M A M A</text>
<text x="519.4" y="153.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15" fill="#3D444D" text-anchor="middle">attention, Mamba</text>
<rect x="641.7" y="66" width="157.8" height="116" rx="8" fill="#F8E5C2"/>
<text x="720.6" y="108.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="17.5" fill="#1F2328" font-weight="600" text-anchor="middle">Per-band heads</text>
<text x="720.6" y="132.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15" fill="#3D444D" text-anchor="middle">mask <tspan font-style="italic">M</tspan>, bounded</text>
<text x="720.6" y="153.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15" fill="#3D444D" text-anchor="middle">residual <tspan font-style="italic">R</tspan>, |<tspan font-style="italic">R</tspan>| ≤ 0.5</text>
<rect x="889.4" y="66" width="72.6" height="116" rx="8" fill="#DCE8F6"/>
<text x="925.7" y="129.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="17.5" fill="#1F2328" font-weight="600" text-anchor="middle">iSTFT</text>
<path d="M211.5,124.0 L236.1,124.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M241.4,124.0 L232.9,127.2 L235.3,124.0 L232.9,120.8 Z" fill="#59636E"/>
<text x="226.5" y="50.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="16" fill="#1F2328" text-anchor="middle"><tspan font-style="italic">X</tspan> ∈ ℂ<tspan dy="-6.40" font-size="11.52" font-style="italic">F</tspan><tspan font-size="11.52">×</tspan><tspan font-size="11.52" font-style="italic">T</tspan></text>
<path d="M398.0,124.0 L422.7,124.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M427.9,124.0 L419.4,127.2 L421.8,124.0 L419.4,120.8 Z" fill="#59636E"/>
<text x="413.0" y="50.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="16" fill="#1F2328" text-anchor="middle"><tspan font-style="italic">Z</tspan> ∈ ℝ<tspan dy="-6.40" font-size="11.52" font-style="italic">B</tspan><tspan font-size="11.52">×</tspan><tspan font-size="11.52" font-style="italic">T</tspan><tspan font-size="11.52">×</tspan><tspan font-size="11.52" font-style="italic">D</tspan></text>
<path d="M610.8,124.0 L635.4,124.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M640.7,124.0 L632.2,127.2 L634.6,124.0 L632.2,120.8 Z" fill="#59636E"/>
<text x="625.7" y="50.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="16" fill="#1F2328" text-anchor="middle"><tspan font-style="italic">Z</tspan>′ ∈ ℝ<tspan dy="-6.40" font-size="11.52" font-style="italic">B</tspan><tspan font-size="11.52">×</tspan><tspan font-size="11.52" font-style="italic">T</tspan><tspan font-size="11.52">×</tspan><tspan font-size="11.52" font-style="italic">D</tspan></text>
<path d="M800.5,124.0 L825.2,124.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M830.5,124.0 L822.0,127.2 L824.3,124.0 L822.0,120.8 Z" fill="#59636E"/>
<path d="M858.5,124.0 L883.1,124.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M888.4,124.0 L879.9,127.2 L882.3,124.0 L879.9,120.8 Z" fill="#59636E"/>
<circle cx="844.5" cy="124.0" r="13" fill="#FFFFFF" stroke="#59636E" stroke-width="1.4"/>
<path d="M837.7,124.0 H851.2 M844.5,117.2 V130.8" stroke="#59636E" stroke-width="1.4" stroke-linecap="round"/>
<text x="844.5" y="50.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="16" fill="#1F2328" text-anchor="middle"><tspan font-style="italic">X̂</tspan> = <tspan font-style="italic">X</tspan> + <tspan font-style="italic">M</tspan> ⊙ <tspan font-style="italic">X</tspan> + <tspan font-style="italic">R</tspan></text>
<circle cx="226.5" cy="124.0" r="3.4" fill="#59636E"/>
<path d="M226.5,124.0 L226.5,196.0 Q226.5,206.0 236.5,206.0 L834.5,206.0 Q844.5,206.0 844.5,196.0 L844.5,142.3" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="5 4"/>
<path d="M844.5,137.0 L847.7,145.5 L844.5,143.1 L841.2,145.5 Z" fill="#59636E"/>
<text x="535.5" y="226.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="13.5" fill="#59636E" text-anchor="middle">skip: the input spectrum <tspan font-style="italic">X</tspan></text>
<rect x="24" y="256" width="992" height="214" rx="12" fill="#F6F8FA"/>
<text x="46.0" y="288.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15.5" fill="#1F2328" font-weight="600" text-anchor="start">Inside each dual-path block</text>
<text x="261.5" y="288.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15.5" fill="#59636E" text-anchor="start">· every sub-layer is residual</text>
<text x="64.0" y="356.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="21" fill="#1F2328" font-weight="600" text-anchor="middle">A</text>
<text x="64.0" y="374.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="12.5" fill="#59636E" text-anchor="middle">attention</text>
<path d="M94.0,354.0 L124.7,354.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M130.0,354.0 L121.5,357.2 L123.9,354.0 L121.5,350.8 Z" fill="#59636E"/>
<rect x="130.0" y="328.0" width="173.8" height="52" rx="7" fill="#D7EEDF"/>
<text x="216.9" y="351.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15.5" fill="#1F2328" font-weight="600" text-anchor="middle">time attention</text>
<text x="216.9" y="370.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="13.5" fill="#3D444D" text-anchor="middle">along <tspan font-style="italic">T</tspan>, in each band</text>
<path d="M303.8,354.0 L315.5,354.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M320.8,354.0 L312.3,357.2 L314.7,354.0 L312.3,350.8 Z" fill="#59636E"/>
<circle cx="112.0" cy="354.0" r="2.6" fill="#59636E"/>
<path d="M112.0,354.0 L112.0,322.0 Q112.0,315.0 119.0,315.0 L324.8,315.0 Q331.8,315.0 331.8,322.0 L331.8,337.7" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M331.8,343.0 L328.6,334.5 L331.8,336.9 L335.1,334.5 Z" fill="#59636E"/>
<circle cx="331.8" cy="354.0" r="11" fill="#FFFFFF" stroke="#59636E" stroke-width="1.4"/>
<path d="M326.1,354.0 H337.5 M331.8,348.3 V359.7" stroke="#59636E" stroke-width="1.4" stroke-linecap="round"/>
<path d="M342.8,354.0 L371.5,354.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M376.8,354.0 L368.3,357.2 L370.7,354.0 L368.3,350.8 Z" fill="#59636E"/>
<rect x="376.8" y="328.0" width="173.8" height="52" rx="7" fill="#D7EEDF"/>
<text x="463.7" y="351.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15.5" fill="#1F2328" font-weight="600" text-anchor="middle">band attention</text>
<text x="463.7" y="370.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="13.5" fill="#3D444D" text-anchor="middle">across <tspan font-style="italic">B</tspan>, in each frame</text>
<path d="M550.6,354.0 L562.3,354.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M567.6,354.0 L559.1,357.2 L561.5,354.0 L559.1,350.8 Z" fill="#59636E"/>
<circle cx="358.8" cy="354.0" r="2.6" fill="#59636E"/>
<path d="M358.8,354.0 L358.8,322.0 Q358.8,315.0 365.8,315.0 L571.6,315.0 Q578.6,315.0 578.6,322.0 L578.6,337.7" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M578.6,343.0 L575.4,334.5 L578.6,336.9 L581.9,334.5 Z" fill="#59636E"/>
<circle cx="578.6" cy="354.0" r="11" fill="#FFFFFF" stroke="#59636E" stroke-width="1.4"/>
<path d="M572.9,354.0 H584.3 M578.6,348.3 V359.7" stroke="#59636E" stroke-width="1.4" stroke-linecap="round"/>
<path d="M589.6,354.0 L614.3,354.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M619.6,354.0 L611.1,357.2 L613.5,354.0 L611.1,350.8 Z" fill="#59636E"/>
<text x="631.6" y="359.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="14.5" fill="#3D444D" text-anchor="start">rotary positions · exclusive self-attention · 8 heads</text>
<text x="64.0" y="434.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="21" fill="#1F2328" font-weight="600" text-anchor="middle">M</text>
<text x="64.0" y="452.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="12.5" fill="#59636E" text-anchor="middle">Mamba</text>
<path d="M94.0,432.0 L124.7,432.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M130.0,432.0 L121.5,435.2 L123.9,432.0 L121.5,428.8 Z" fill="#59636E"/>
<rect x="130.0" y="406.0" width="173.8" height="52" rx="7" fill="#D7EEDF"/>
<text x="216.9" y="429.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15.5" fill="#1F2328" font-weight="600" text-anchor="middle">time Mamba</text>
<text x="216.9" y="448.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="13.5" fill="#3D444D" text-anchor="middle">along <tspan font-style="italic">T</tspan>, in each band</text>
<path d="M303.8,432.0 L315.5,432.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M320.8,432.0 L312.3,435.2 L314.7,432.0 L312.3,428.8 Z" fill="#59636E"/>
<circle cx="112.0" cy="432.0" r="2.6" fill="#59636E"/>
<path d="M112.0,432.0 L112.0,400.0 Q112.0,393.0 119.0,393.0 L324.8,393.0 Q331.8,393.0 331.8,400.0 L331.8,415.7" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M331.8,421.0 L328.6,412.5 L331.8,414.9 L335.1,412.5 Z" fill="#59636E"/>
<circle cx="331.8" cy="432.0" r="11" fill="#FFFFFF" stroke="#59636E" stroke-width="1.4"/>
<path d="M326.1,432.0 H337.5 M331.8,426.3 V437.7" stroke="#59636E" stroke-width="1.4" stroke-linecap="round"/>
<path d="M342.8,432.0 L371.5,432.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M376.8,432.0 L368.3,435.2 L370.7,432.0 L368.3,428.8 Z" fill="#59636E"/>
<rect x="376.8" y="406.0" width="173.8" height="52" rx="7" fill="#D7EEDF"/>
<text x="463.7" y="429.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="15.5" fill="#1F2328" font-weight="600" text-anchor="middle">band Mamba</text>
<text x="463.7" y="448.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="13.5" fill="#3D444D" text-anchor="middle">across <tspan font-style="italic">B</tspan>, in each frame</text>
<path d="M550.6,432.0 L562.3,432.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M567.6,432.0 L559.1,435.2 L561.5,432.0 L559.1,428.8 Z" fill="#59636E"/>
<circle cx="358.8" cy="432.0" r="2.6" fill="#59636E"/>
<path d="M358.8,432.0 L358.8,400.0 Q358.8,393.0 365.8,393.0 L571.6,393.0 Q578.6,393.0 578.6,400.0 L578.6,415.7" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M578.6,421.0 L575.4,412.5 L578.6,414.9 L581.9,412.5 Z" fill="#59636E"/>
<circle cx="578.6" cy="432.0" r="11" fill="#FFFFFF" stroke="#59636E" stroke-width="1.4"/>
<path d="M572.9,432.0 H584.3 M578.6,426.3 V437.7" stroke="#59636E" stroke-width="1.4" stroke-linecap="round"/>
<path d="M589.6,432.0 L614.3,432.0" fill="none" stroke="#59636E" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M619.6,432.0 L611.1,435.2 L613.5,432.0 L611.1,428.8 Z" fill="#59636E"/>
<text x="631.6" y="437.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="14.5" fill="#3D444D" text-anchor="start">selective scan · state 16 · expand 2 · conv 4</text>
<text x="24.0" y="506.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="14.5" fill="#3D444D" text-anchor="start"><tspan font-weight="600">Realtime checkpoint:</tspan> the same blocks run causally, with a look-ahead <tspan font-style="italic">ℓ</tspan> ∈ {0, 2, 4} frames as a learned embedding.</text>
<text x="24.0" y="529.0" font-family="Instrument Sans, Helvetica Neue, Helvetica, Arial, sans-serif" font-size="14.5" fill="#3D444D" text-anchor="start"><tspan font-weight="600">Offline checkpoint:</tspan> two-sided, 8 s chunks.</text>
</svg>