Effacer les filtres
Effacer les filtres

Question Regarding Digital Signal Processing - Voice Recording

2 vues (au cours des 30 derniers jours)
karthikeyan Reddy Thoomu
karthikeyan Reddy Thoomu le 18 Sep 2017
clear all
close all
clc
% Piece of code to Play Audio file
recobj=audiorecorder(8000,8,1,-1);%audiorecorder object with
samplerate,nbits,Number of channels & Device ID
disp('start speaking.') %waiting time to start speaking
recordblocking(recobj,5); %Recording voice for 5 seconds
disp('End of recording.'); % To stop end of recording
play(recobj); %command to play recorder object
y=getaudiodata(recobj); % store data in double-precision array
%plot(y) % Play back the record
% y1= y + rand(size(y)); %adding noise to Original Speech Signal
f=0.8;
n=6;
X1=fir1(n,f,'high'); %Fir High Pass Filter
X2=fir1(n,f,'low'); %Fir Low Pass Filter
X3=filter(X1,1,y); %Passing audio to designed High Pass Filter
X4=filter(X2,1,X3);
fvtool(X4,1); % Use to display designed Fir filter and it's Magnitude
Response
subplot(2,1,1)
plot(y) % Plotting Original Speech Signal
title('Original Speech Signal')
xlabel('Time')
ylabel('Amplitude')
subplot(2,1,2);
plot(X4) %Plotting Filtered speech signal
title('Filtered Speech Signal')
xlabel('Time')
ylabel('Amplitude')
I have this Piece of code working on voice Speech. I want to Quantize my original voice signal using Quantiz from syntax [index,quantized] = quantiz(samp,partition,codebook). when i try to ploty=getaudiodata(recobj);% store data in double-precision array vs quantized using stairs command to get quantized signal, i am getting error. How to do this?..
  3 commentaires
Walter Roberson
Walter Roberson le 19 Sep 2017
What error are you getting?
karthikeyan Reddy Thoomu
karthikeyan Reddy Thoomu le 19 Sep 2017
Dimensions did not match

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Single-Rate Filters dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by