Voiced vs. Unvoiced Detection
Detect unvoiced segments and attenuate them.
In[1]:=
a = ExampleData[{"Audio", "NoisyTalk"}, "Audio"]
Use AudioIntervals to look for segments with low RMS amplitude and high spectral flatness.
In[2]:=
nonVoicedIntervals =
AudioIntervals[
a, #RMSAmplitude < .02 && #SpectralFlatness > .0001 &, .1,
PartitionGranularity -> {.06, .01}]
Out[2]=
Visualize the detected intervals.
In[3]:=
AudioPlot[a,
Epilog -> {RGBColor[1, 0, 0, .3],
Rectangle[{#[[1]], -1}, {#[[2]], 1}] & /@ nonVoicedIntervals},
ImageSize -> Medium]
Out[3]=
Attenuate the detected intervals.
In[4]:=
AudioJoin[
Riffle[AudioFade /@ AudioTrim[a, Except@nonVoicedIntervals],
0.3*AudioTrim[a, nonVoicedIntervals]]]