how to create speech waves with equal loudness in matlab

조회 수: 7 (최근 30일)
ana
ana 2013년 11월 18일
답변: ana 2013년 11월 22일
hi frnds i want matlab command or code for making speech waves with equal loudness in matlab i.e speech waves with same intensity and frequency.

채택된 답변

Pedro Villena
Pedro Villena 2013년 11월 18일
편집: Pedro Villena 2013년 11월 19일
I suggest you to use Microsoft Anna (Text to Speech) and save the sound in a *.wav file or *.mp3 file.
Then import the sound file to MATLAB.
To equalize the loudness you could try this options:
  • Use the soundsc command:
[y1,Fs1] = audioread('myRecord1.wav');
[y2,Fs2] = audioread('myRecord2.wav');
y1n = soundsc(y1,Fs1);
y2n = soundsc(y2,Fs2);
  • Use FFT to equalize the median dB:
Pxx1 = abs(fft(y1));
Pxx2 = abs(fft(y2));
dB1 = median(10*log10(Pxx1(1:(end/2)).^2));
dB2 = median(10*log10(Pxx2(1:(end/2)).^2));
dB = [dB1 dB2];
k = sqrt(10.^((max(dB)-dB)/10));
y1n = k(1)*y1;
y2n = k(2)*y2;
  댓글 수: 2
ana
ana 2013년 11월 19일
Hey thnx for this idea. But already i have some speech waves that i want to make with equal loudness, so is there any another way to do this ?
Pedro Villena
Pedro Villena 2013년 11월 19일
Sorry, I forget to tell you how to equalize the loudness.
Options:
  • Use the soundsc command:
Examples:
[y1,Fs1] = audioread('myRecord1.wav');
[y2,Fs2] = audioread('myRecord2.wav');
y1n = soundsc(y1,Fs1);
y2n = soundsc(y2,Fs2);
  • Use FFT to equalize the median dB:
Pxx1 = abs(fft(y1));
Pxx2 = abs(fft(y2));
dB1 = median(10*log10(Pxx1(1:(end/2)).^2));
dB2 = median(10*log10(Pxx2(1:(end/2)).^2));
dB = [dB1 dB2];
k = sqrt(10.^((max(dB)-dB)/10));
y1n = k(1)*y1;
y2n = k(2)*y2;

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

ana
ana 2013년 11월 22일
Thanx for your answer..

카테고리

Help CenterFile Exchange에서 Psychoacoustics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by