how i can fix this error in soundsc function

hi hope you are well
i am using matlab 2013
please please how i can fix this error
Error using soundsc (line 25) Audio data must be real and floating point.
in code for speech recognition that compares two sound and returns as result a "matching" or a "not matching

 채택된 답변

John D'Errico
John D'Errico 2013년 12월 22일

2 개 추천

Read the error message.
"Error using soundsc (line 25) Audio data must be real and floating point."
Walter left one thing out.
soundsc(real(double(YourData)))
Even better, figure out why your data is either not real or not double.
Was this really worth waiting for 9 hours?

추가 답변 (9개)

n
n 2013년 12월 22일

0 개 추천

still the same problem :(
n
n 2013년 12월 22일

0 개 추천

the audio data is already double but i don't know what reason of error :(
n
n 2013년 12월 22일

0 개 추천

please any one answer me :(
n
n 2013년 12월 22일

0 개 추천

thaaaaaaaank you soooo much Mr i really appreciate your helps
ok Mr i linked this code in matlab with vb.net so when i call it in vb this message appear
so please what is the problem it can be :(
n
n 2013년 12월 23일

0 개 추천

please where are you :(
this is a code
function test2 =test2()
clear;
[x,f]=audioread('C:\Users\TOSHIBA\father.wav');
extract=melcepst(x,f);
save( 'C:\Users\TOSHIBA\father.mat','extract');
[x1,f1]=audioread('C:\Users\TOSHIBA\color.wav');
extract2=melcepst(x1,f1);
save( 'C:\Users\TOSHIBA\color.mat','extract2');
Fid=fopen('C:\Users\TOSHIBA\path1.txt'); A=fscanf(Fid,'%u'); path=fscanf(Fid,'%s'); %path=mat2str(path); fclose=Fid;
[x,fsampling]=audioread(path); pause(5); x=fft(x); fp=100; fs=1000; wp=2*fp/fsampling; ws=2*fs/fsampling; [N,wn]=buttord(wp,ws,1,5); [b,a]=butter(N,wn); y=filter(b,a,x); soundsc((real(double(y))),fsampling)
[h,t]=impz(b,a); N1=size(h,1); n=1:N1;
extract=melcepst(y,fsampling); if(A==1) B1=importdata('C:\Users\TOSHIBA\father.mat'); d1=disteusq(extract,B1); result1=int64(sum(sum(d1))); if ((result1>=1517405)&&(result1<=3399480)) test='true'; else test='false'; end end if(A==2) B2=importdata('C:\Users\TOSHIBA\color.mat'); d2=disteusq(extract,B2); result2=int64(sum(sum(d2))); if ((result2>=521370)&&(result2<=668471)) test='true'; else test='false'; end end

댓글 수: 1

Where am I? In the middle of an extended power failure due to a large ice storm. 1/2 million people without power in below-freezing temperatures.

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

n
n 2013년 12월 23일
편집: Walter Roberson 2019년 11월 3일

0 개 추천

function test2 =test2()
clear;
[x,f]=audioread('C:\Users\TOSHIBA\father.wav');
extract=melcepst(x,f);
save( 'C:\Users\TOSHIBA\father.mat','extract');
[x1,f1]=audioread('C:\Users\TOSHIBA\color.wav');
extract2=melcepst(x1,f1);
save( 'C:\Users\TOSHIBA\color.mat','extract2');
Fid=fopen('C:\Users\TOSHIBA\path1.txt');
A=fscanf(Fid,'%u');
path=fscanf(Fid,'%s'); %path=mat2str(path); fclose=Fid;
[x,fsampling]=audioread(path);
pause(5);
x=fft(x);
fp=100;
fs=1000;
wp=2*fp/fsampling;
ws=2*fs/fsampling;
[N,wn]=buttord(wp,ws,1,5);
[b,a]=butter(N,wn);
y=filter(b,a,x);
soundsc((real(double(y))),fsampling)
[h,t]=impz(b,a);
N1=size(h,1);
n=1:N1;
extract=melcepst(y,fsampling);
if(A==1)
B1=importdata('C:\Users\TOSHIBA\father.mat');
d1=disteusq(extract,B1);
result1=int64(sum(sum(d1)));
if ((result1>=1517405)&&(result1<=3399480))
test='true';
else
test='false';
end
end
if(A==2)
B2=importdata('C:\Users\TOSHIBA\color.mat');
d2=disteusq(extract,B2);
result2=int64(sum(sum(d2)));
if ((result2>=521370)&&(result2<=668471))
test='true';
else
test='false';
end
end
end

댓글 수: 1

Image Analyst
Image Analyst 2013년 12월 23일
Is this the answer? You posted it as an "answer" to your original question. If it's not an answer/solution, then add it as a "Comment" to someone else's answer.

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

n
n 2013년 12월 23일

0 개 추천

no it is not answer , sorry this the code that has error
n
n 2013년 12월 24일

0 개 추천

please any one help me?? i am novice in matlab :(

댓글 수: 2

Image Analyst
Image Analyst 2013년 12월 24일
Please stop adding answers and make them comments instead. These are not answers. Anyway, you marked it as accepted so a lot of people probably aren't even bothering to look at this anymore, figuring you got it solved.
n
n 2013년 12월 24일
Aha , so sorry Mr. I didn't know this rule before , thanks for notify me .
my last helping request is the second error another of first one that solved , can i post it in another question or what ? :(

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

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

태그

질문:

n
n
2013년 12월 22일

편집:

2019년 11월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by