Total members 11893 |It is currently Fri Nov 15, 2024 11:51 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Read sound(voice), plot its rate, add noise, save sound to file
matlab code
function voice();
% Part II: speech input
x= wavread('C:\Documents and Settings\pwd1.wav')
% plot the whole sequence
subplot(2,3,1);plot(x)

% Fs1 = 22050;
% plot the first 1000 samples of x
xx= wavread('C:\Documents and Settings\pwd1.wav',1000)
subplot(2,3,2);plot(xx)

% Part III: simple speech manipulation under MATLAB

%<play x>
wavplay(x,22050,'async')

%<play x at the half of sampling frequency>
wavplay(x,22050/2,'async')

%<play x at the doubled sampling frequency>
wavplay(x,22050*2,'async')

y=flipud(x)
wavplay(y,22050)

% apply a fine quantization to the speech signal
x1=round(x*100)*0.01
% the signal of quantization noise
subplot(2,3,3);plot(x1)

% plot the difference between x and x1
i=1:length(x);
subplot(2,3,4);plot(i,x,i,x-x1)

wavplay(x1,22050,'async')

x2=round(x*20)*0.05;
i=1:length(x);
% plot the difference between x and x2
subplot(2,3,5);plot(i,x,i,x-x2)
wavplay(x2,22050,'async')

% Part IV: speech output
% write vector x out as a wav file
wavwrite(x,'test.wav')

% write vector x out as an au file
auwrite(x,'test.au')




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : simple speech manipulation under MATLAB
 Text to speech in java     -  
 run .exe program in matlab     -  
 Matlab SVM training problem     -  
 read file in matlab     -  
 Matlab basics examples     -  
 MATLAB clear memory     -  
 help me How do I load image from my pc to matlab     -  
 naive Bayes classifier in MATLAB     -  
 particle swarm optimization matlab code     -  
 Support Vector Machine coding on Matlab...     -  



Topic Tags

Matlab Algorithms






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com