Expected input to be one of these types: double, single Instead its type was audioDeviceReader.
24 次查看(过去 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);
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!