Undefined function 'mtimes' for input arguments of type 'audiorecorder'.

1 vue (au cours des 30 derniers jours)
Shadi Ayyad
Shadi Ayyad le 21 Avr 2015
Commenté : Shadi Ayyad le 16 Mar 2016
I have downloaded the speaker recognition system that uses MFCC or WAVELET SUB BAND CODING methods written by "raghu ram". It is a great effort and it was so beneficial to me. I am using the code in a newer MATLAB version (R2014a), so I have replaced functions: wavread, wavplay and wavrecord by audioread, audioplayer and audiorecorder respectively.
Here is my problem: In the sound editor GUI, when I press in the "Record" button for a number of seconds, instantly a "recording finished" message appears in the interface, and an error appears in the command window. This is the error:
Undefined function 'mtimes' for input arguments of type 'audiorecorder'. Error in gui>bt_record_callback (line 115) signal=0.99*data/max(abs(data)); Error in gui_mainfcn (line 95) feval(varagin{:}); Error in gui (line 49) gui_mainfcn(gui_state, varagin{:}); Error while evaluating uicontrol callback
Note that, please, as I have said previously I have replaced wavrecord in line 113 by audiorecorder.
does any one has suggestions as a solution for my problem?
Thanks a lot. Regards. Shadi Ayyad.
  2 commentaires
Rui
Rui le 5 Jan 2016
Dear Shadi:
I am also working on the speaker reconganization project. Could you please send me the raghu ram codes.
Thanks very much
Rui
Shadi Ayyad
Shadi Ayyad le 16 Mar 2016
Of course Rui. This is the link of the code:
download it there. good luck.

Connectez-vous pour commenter.

Réponse acceptée

David Young
David Young le 21 Avr 2015
Presumably you replaced
data = wavrecord( ... );
by
data = audiorecorder( ... );
(I don't know what arguments were used.) If so, try this instead
audioRec = audiorecorder;
audioRec.recordblocking(5);
data = audioRec.getaudiodata;
That will record for a fixed time of 5 seconds. You probably want to replace the 5 with a variable holding the time to record for. Alternatively, you can record for an indefinite length of time and call the stop method from your GUI to stop recording. See the audiorecorder documentation for details
Note also that you can set all sorts of parameters in the call to audiorecorder - see the documentation.
It's also inefficient to create a new audiorecorder object each time you want to record something - ideally you'd call audiorecorder once only and then hold onto the audiorecorder object.
  2 commentaires
Shadi Ayyad
Shadi Ayyad le 22 Avr 2015
Thnaks. I will try it.
Shadi Ayyad
Shadi Ayyad le 14 Mai 2015
Thanks David Young, this method was successful to me. regards.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by