Expected input to be one of these types: double, single Instead its type was audioDeviceReader.

조회 수: 47 (최근 30일)
Isn't the default output of audiodevicereader is double?
The error message - >> livedetection_lstm
Entering into while loop.
Error using dsp.STFT/step (line 251)
Expected input to be one of these types:
double, single
Instead its type was audioDeviceReader.
Error in dsp.STFT/parenReference (line 343)
Y = step(obj,u);
Error in extractFeatures (line 25)
Xcomp = stf(audioIn);
Error in livedetection_lstm (line 20)
features = extractFeatures(audioIn,16e3);

답변 (1개)

Srivardhan Gadila
Srivardhan Gadila 2021년 4월 15일
audioDeviceReader returns a System object, deviceReader, that reads audio samples using an audio input device in real time. You can refer to the docuementation of audioDeviceReader for more information.
However when you call deviceReader as follows: audioFromDevice = deviceReader() it returns one frame of audio samples, which is a matrix of of the following Data Types: single | double | int16 | int32 | uint8.

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by