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

55 vues (au cours des 30 derniers jours)
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);

Réponses (1)

Srivardhan Gadila
Srivardhan Gadila le 15 Avr 2021
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.

Catégories

En savoir plus sur Audio I/O and Waveform Generation dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by