Friday 30 November 2012

Speaking Voice Processing

Sonic Field started life as an audio processing project - back to its roots!

The following script uses envelope followers to remove background rumble from the recording without taking out the lows from the voice. It also has a de-esser which is much the same thing but for high frequencies. Some light reverb is use via a very simple algorithm which folds the signal back on its self. This reverb' is seeded using a bit of Haas effect form the mono code.

The script also does some gating to remove noise between the words and compression of the over all signal to make the volume even through out. It does have a nasty habit of not catching very short audio spikes which end up left in the signal. I need to figure out how to fix this, but it is so rare that a manual tweak in Audacity does the trick.


(>left, 150,2,12)RBJPeaking  Normalise  !left
(>right,150,2,12)RBJPeaking  Normalise  !right


The above filters then make the voice sound deeper. The values would need tweaking for a female voice.

Here is a video where I used the script to process my voice:
http://youtu.be/7qhoXL7EKYs

Here is the script:
"temp/input.wav" ReadFile ^signal
?signal !orig

[Low peak cut]
(?signal,150,3)ButterworthLowPass  !lower
(?signal,150,3)ButterworthHighPass !upper
(>lower,60,2)ButterworthHighPass   !lower
(?lower Normalise,100,100)Follow           !shape
(?shape,(1,?shape MaxValue)/)NumericVolume !shape
(0.1,>shape dbs+48)DirectMix               !shape
(
    >lower,
    >shape 
)Divide !lower

(
    >lower,
    >upper 
)Mix  Normalise !signal

[ De-ess ]
(?signal,4000,5)ButterworthLowPass  !lower
(?signal,4000,5)ButterworthHighPass !upper
(?upper Normalise,100,100)Follow           !shape
(?shape,(1,?shape MaxValue)/)NumericVolume !shape
(0.1,>shape dbs+48)DirectMix               !shape
(
    >upper,
    >shape 
)Divide !upper

(
    >lower,
    >upper dbs+3
)Mix  Normalise !signal


(
    (?signal Reverse,1,50)Follow Reverse,
    (?signal        ,1,50)Follow,
)Mix !shape    
(?shape,(2,?shape MaxValue)/)NumericVolume   !shape
(0.04,>shape)DirectMix Clip                  !shape
(>signal,?shape)Multiply Normalise           !signal

(
    (?signal Normalise,25,25)Follow,
    (?signal Normalise Reverse,25,25)Follow Reverse,
)Mix !shape
(?shape,(1,?shape MaxValue)/)NumericVolume !shape
(0.3,>shape dbs+24)DirectMix               !shape
(
    >signal,
    >shape 
)Divide Normalise !signal 

[ Reverb ]
(15 Silence,?signal)Concatenate !note-left
?signal                         !note-right

(>note-left ,1000,0.25)RBJLowPass !note-left
(>note-right,1000,0.25)RBJLowPass !note-right
(
    1,2,
    {    
        !outer
        (
            1,4,
            {
                !t
                {((30,(?t,(24,?outer)*)*)+ Prime Silence,?note-left )Concatenate} Do !nlTask
                {((45,(?t,(15,?outer)*)*)+ Prime Silence,?note-right)Concatenate} Do !nrTask
            
                {((>nlTask Done, -15)Volume,(700,(?t,3)*)-,1)ButterworthLowPass}  Do  !nlTask
                {((>nrTask Done, -15)Volume,(700,(?t,3)*)-,1)ButterworthLowPass}  Do  !nrTask
            
                {(>nlTask Done, ?note-left )Mix Normalise}                        Do !nlTask 
                {(>nrTask Done, ?note-right)Mix Normalise}                        Do !nrTask
                
                ?nlTask Done !note-left
                ?nrTask Done !note-right
            }
        )Repeat
    }
)Repeat
(
    >note-left dbs-20,
    ?signal
)Mix Normalise !left
(
    >note-right dbs-20,
    >signal
)Mix Normalise !right

(>left ,3000,2,6)RBJPeaking Normalise   !left
(>right,3000,2,6)RBJPeaking Normalise   !right
(>left, 150,2,12)RBJPeaking  Normalise  !left
(>right,150,2,12)RBJPeaking  Normalise  !right

(
    (
        >left,
        >right
    )StereoMonitor,"temp/tone.wav"
)WriteFile32


No comments:

Post a Comment