I don't know what's the problem, can somebody help me, i don't know the exact length of myspeech/myrecord since it varies on how fast i read

조회 수: 1 (최근 30일)

채택된 답변

Voss
Voss 2024년 1월 14일
Maybe you meant to name the variable returned by getaudiodata "mySpeech" instead of "y":
% y = getaudiodata(recObj);
mySpeech = getaudiodata(recObj);
  댓글 수: 8
Jane
Jane 2024년 1월 15일
@Voss Thank u for answering, I already figure it out. I just want to ask, what can I add in my code if I want to know the frequency and magnitude of mySpeech. Like, the frequency and magnitude will be shown in the command window like this:
Voss
Voss 2024년 1월 15일
For frequency content you can use fft or see this for some options: https://www.mathworks.com/matlabcentral/answers/160059-finding-the-frequency-value-of-a-signal
For magnitude you can use abs(mySpeech) or mean(abs(mySpeech)).

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

추가 답변 (1개)

Binaya
Binaya 2024년 1월 14일
Hi Jane,
It is my understanding that the variable passed in the "fft" function is not of correct datatype. "fft" functions expects datatypes of either double or single or int8 or int16 or int32 or uint8 or uint16 or uint32 or logical type.
Note - It is not clear what value mySpeech variable contains.
Please refer to the following MathWorks documentation for more information on the “fft” function:
I hope this helps!
Regards
Binaya

카테고리

Help CenterFile Exchange에서 Filter Analysis에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by