필터 지우기
필터 지우기

Question Regarding Digital Signal Processing - Voice Recording

조회 수: 1 (최근 30일)
karthikeyan Reddy Thoomu
karthikeyan Reddy Thoomu 2017년 9월 18일
편집: Walter Roberson 2017년 9월 19일
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
Walter Roberson
Walter Roberson 2017년 9월 19일
What error are you getting?
karthikeyan Reddy Thoomu
karthikeyan Reddy Thoomu 2017년 9월 19일
Dimensions did not match

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio Processing Algorithm Design에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by