유성음과 무성음의 검출
무성음 부분을 감지하고 그것을 감쇠시킵니다.
In[1]:=
![Click for copyable input](assets.ko/voiced-vs-unvoiced-detection/In_42.png)
a = ExampleData[{"Audio", "NoisyTalk"}, "Audio"]
AudioIntervals을 사용하여 RMS 진폭이 낮은 부분과 평탄도가 높은 부분을 찾습니다.
In[2]:=
![Click for copyable input](assets.ko/voiced-vs-unvoiced-detection/In_43.png)
nonVoicedIntervals =
AudioIntervals[
a, #RMSAmplitude < .02 && #SpectralFlatness > .0001 &, .1,
PartitionGranularity -> {.06, .01}]
Out[2]=
![](assets.ko/voiced-vs-unvoiced-detection/O_20.png)
검출된 구간을 시각화합니다.
In[3]:=
![Click for copyable input](assets.ko/voiced-vs-unvoiced-detection/In_44.png)
AudioPlot[a,
Epilog -> {RGBColor[1, 0, 0, .3],
Rectangle[{#[[1]], -1}, {#[[2]], 1}] & /@ nonVoicedIntervals},
ImageSize -> Medium]
Out[3]=
![](assets.ko/voiced-vs-unvoiced-detection/O_21.png)
검출된 부분을 감쇠시킵니다.
In[4]:=
![Click for copyable input](assets.ko/voiced-vs-unvoiced-detection/In_45.png)
AudioJoin[
Riffle[AudioFade /@ AudioTrim[a, Except@nonVoicedIntervals],
0.3*AudioTrim[a, nonVoicedIntervals]]]