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

24 visualizaciones (últimos 30 días)
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);

Respuestas (1)

Srivardhan Gadila
Srivardhan Gadila el 15 de Abr. de 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.

Categorías

Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by