[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: making a sound unrecognizable

Dear Ursula,

Few years ago, I tried a MATLAB code to prevent a speech sounds to be recognizable. The overall spectrum and the temporal envelope (up to 60 Hz) of the initial sound are roughly preserved by this code. Be aware that neither the spectrum nor the temporal envelope of the output are exactly the same than the input !
Below is the MATLAB code (the MATLAB signal toolbox is required). This code is not guaranteed !

Hope this help.

Nicolas Grimault

function new=SigToNoise(N);%N is the filename (including path) of the wav file (the input signal) to be transformed
[sig fe bit]=wavread(N);%read the input signal (from a wav file)
rmssig=sqrt(sum(sig(:,1).^2)/length(sig(:,1))); %RMS of the input signal
[Fparam1 Fparam2]=butter(1, 60/(0.5*fe)); %low-pass filter Fc=60 Hz
LPsig=filter(Fparam1,Fparam2,abs(sig(:,1)));%rectified temporal envelope of the input signal (Fc=60 Hz)
phasefftnoise=2*pi*rand(length(sig),1);%a random phase vector
fftsig=abs(fft(sig(:,1)));%FFT magnitude of the input signal
fftnew=fftsig.*exp(-j*phasefftnoise);%the output signal is generated here in the frequency domain. The output has the same magnitude than the input signal but random phases
new=real(ifft(fftnew));%output in the time domain (by FFT-1)
new=new.*LPsig;%the temporal envelope of the input is applied to the output
rmsnewsig=sqrt(sum(new.^2)/length(new));%RMS of the output signal
new=rmssig*new/rmsnewsig;%the RMS of the output is adjusted to be the same than the RMS of the input if max(abs(new))>1 | max(abs(sig(:,1)))>1 %check for saturation
disp('Error: saturation...');
disp(['Maximum = ' int2str(max(abs(new)))]);
wavwrite(new,fe,bit,['new_' N]); %write the output in a wav file end

Dear list members,

I'm looking for a possibility to change/edit a environmental or at least natural sound in a way that it is not any longer recognizable as what it is, but, however, for doing this with changing as less acoustic parameters as possible. ;-) The intention is to use these sounds in a MMN paradigm and it is important that both "versions" of the sound are acoustically as similar as possible.
The main point is that the sound (that can also be a more complex thing as the sound of a barking dog or a something like that) should be not possible to be recognized as what it is.

I would be very happy about ideas or would like know if maybe somebody has already tried something like this? I would also be very happy about recommations for software or matlab scripts that could be helpful in respect to this. For example I'm looking for a way to transfer the amplitude envelope from one sound to another (I already wrote a matlab routine for this, but its not yet functioning perfectly fine and the result is not completely convincing).

So if anybody has a an idea I would be grateful.

best regards and thanks a lot,
Ursula Kirmse

Nicolas Grimault
Cognition Auditive et Psychoacoustique
UMR CNRS 5020 Neurosciences et Systèmes Sensoriels
50 Av. Tony Garnier
69366 Lyon Cedex 07
Vocal: 33 (0)4 37 28 74 89
Fax: 33 (0)4 37 28 76 01
Email: nicolas.grimault@xxxxxxxxxxxxxxxxxxx
Web: http://olfac.univ-lyon1.fr/unite/equipe-02/grimault/grimault-f.html

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature