0
$\begingroup$

I have a speech file that was recorded with a sampling frequency of 8kHz. I read the file in Matlab as [x,fs,nbits]=wavread('speech.wav). Now I play the file in Matlab using soundsc(x,fs). But if I use the command soundsc(x,fs/2) and soundsc(x,2*fs) the speech changes. What is the reason?

$\endgroup$
2
  • 1
    $\begingroup$ Hint: consider a single tone, e. g. a pure sine wave with 500 kHz. How does the resampled signal at fs/2 and 2*fs look like, what's its frequency? $\endgroup$
    – Deve
    Feb 19, 2014 at 9:04
  • 1
    $\begingroup$ @guest: Congratulations, You've just discovered how "Alvin and Chipmunks" songs were created - this is most basic pitch-shifting method ;) $\endgroup$
    – jojeck
    Apr 1, 2014 at 14:48

1 Answer 1

3
$\begingroup$

The soundsc command will playback $f_s$ samples per second. Playing back at a faster rate than you recorded will increase the pitch of the speech. Playing back at a lower sample rate will reduce the pitch.

If you prefer to think in the frequency domain; all the information is scaled on the frequency axis with relation to the change in $f_s$. Reducing fs squashes the information on the frequency axis and increasing $f_s$ will stretch the information on the frequency axis.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.