필터 지우기
필터 지우기

How to decrease the speed of an audio signal in MATLAB???

조회 수: 19 (최근 30일)
fatima alansari
fatima alansari 2018년 12월 10일
댓글: Walter Roberson 2018년 12월 13일
Hello,
How can i decrease the speed of an audio signal??
is there any simle methode to do so?
should i alwayse use FFT ???
or it used only if I want to change the pitch of the voice?

채택된 답변

Walter Roberson
Walter Roberson 2018년 12월 10일
For audible output purposes: use a lower Fs (sampling frequency) for the audio output.
If the sampling frequency is to be maintained: resample() as-if to a higher frequency, but play at the same frequency. For example if you were to duplicate every input sample, making the output twice as long, but play it at the same rate, then what used to appear 1/2 second in would appear 2*1/2=1 second in, so we can see that the output would have been effectively slowed down.
  댓글 수: 4
fatima alansari
fatima alansari 2018년 12월 13일
편집: fatima alansari 2018년 12월 13일
sorry, i forgot to tell that i removed that parameter..
this is what i did...
%{
reader = dsp.AudioFileReader('SpeechDFT-16-8-mono-5secs.wav'
, ...
'SamplesPerFrame',AnalysisLen, ...
'OutputDataType','double')
%}
reader = audioDeviceReader('SamplesPerFrame',AnalysisLen, ...
'OutputDataType','double');
Walter Roberson
Walter Roberson 2018년 12월 13일
If I hack at it and set the analysis length to 256, same as the frame length, and make some small fix-ups, then I can get it to execute without error -- but the gain it calculates is small enough that the signals come out too quiet to hear.
The idft object is configured to expect conjugate symmetric input. However, the phase correction that is being done is not producing exact conjugate symmetric. When I set the analysis length to 256 then the only point that was not properly symmetric was the middle one, point 129 of 256. For even length fft, the middle point needs to have a 0 imaginary component in order for conjugate symmetric to work out, but it was showing a small imaginary component. That was probably due to the fact that the representation of pi is truncated and that argument reduction is not perfect, so sin(N*pi) for integer N can turn out to not be an exact 0. In my version, I added a fix-up for that situation.
I do not know yet what is happening for the case where the analysis length is smaller than the window length. Problems with the lack of conjugate symmetry, yes, but I have not traced far enough to figure out would be reasonable.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by