3.94737

3.9 | 38 ratings Rate this file 192 downloads (last 30 days) File Size: 12.69 KB File ID: #2796

MATLAB Record GUI

by Jesse Hansen

 

29 Nov 2002 (Updated 04 Dec 2002)

No BSD License  

MATLAB Record GUI: Used to record, edit, and analyze speech or other sounds.

Download Now | Watch this File

File Information
Description

The program is intended to simplify the recording and basic editing of speech waveforms as well as to present the spectrogram and the time waveform in a side-by-side format for ease of analysis.

Getting Started:

Before you can do any recording through Record, you will need to connect a microphone or other sound source to the microphone input on your sound card. The next step is to ensure that your computer is set up to record from the microphone. On a Windows machine, you must select the microphone as the source in the Record Control window. The Record Control window can usually be accessed from a speaker icon in the system tray.

Running the program:

The program can be run by typing record at the MATLAB prompt or by opening the program in the MATLAB editor and selecting Run from the Debug menu

Recording:

Sound recording is initiated through the MATLAB graphical user interface (GUI) by clicking on the record button. The duration of the recording can be adjusted to be anywhere from 1 to 6 seconds. (These are the GUI defaults, but the code can be modified to record for longer durations if desired.)

Upon being clicked, the record button executes a function that reads in mono data from the microphone jack on the sound card and stores it a MATLAB vector.

Most of the important information in a typical voice waveform is found below a frequency of about 4 kHz. Accordingly, we should sample at a least twice this frequency, or 8 kHz. (Note that all sound cards have a built in pre-filter to limit the effects of aliasing.) Since there is at least some valuable information above 4 kHz, the Record GUI has a default sampling rate of 16 kHz (however, the waveforms portrayed in this document were sampled at 11.025 kHz).

Once recorded, the time data is normalized to maximum amplitude of 0.99 and displayed on the upper plot in the GUI window. In addition to the time domain waveform, a spectrogram is computed using MATLAB's built in specgram function (part of the signal processing toolbox).

Zooming in on the Waveform:

One can examine a region of interest in the waveform using the Zoom in button. When Zoom in is clicked, the cursor will change to a cross hair. Clicking the left mouse button and dragging a rectangle around the region of interest in the time domain waveform will select a sub-section of data.

Zooming out:

The Zoom out button will change the axis back to what it was before Zoom in was used. If you zoom in multiple times, zooming out will return you to the previous axis limits.

Listening to the Waveform:

The Play button uses MATLAB's sound function to play back (send to the speakers) the waveform that appears in the GUI. If you have zoomed in on a particular section of the waveform, only that portion of the waveform will be sent to the speakers.

Saving and Loading Data:

Save is used to write the waveform to a wave file. If zoomed in on segment of data, only that portion of the waveform will be saved.

Click Load to import any mono wave file into the Record GUI for analysis.

For a full description, see:
http://www.ele.uri.edu/~hansenj/projects/record/

Required Products Signal Processing Toolbox
MATLAB release MATLAB 5.3 (R11)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (42)
14 Jan 2003 yadong Wang

good

10 Nov 2003 Wolfe Harnett

very useful, Thank-you

11 Dec 2003 Matt D

Could not use the file because there are functions called from other toolboxes that were not listed and that I don't own.

The description says "Required Products: Signal Processing Toolbox" however the analoginput.m function from the Data Acquisition Toolbox is used as well as the getrect.m function from the Image Processing Toolbox.

07 Aug 2004 ahmad hamedi

hello
i had any problem about save sound
by'wavwrite' and play it
by'windows media player'.
please help me.
thanks.

07 Sep 2004 Astari Paramita

I have a question .. I'm trying to convert the sound file that I have (*.wav) so I can get its vector form. I need it to do the feature extraction and classification. Can you help me ? Or anyone can help me ? Waiting for your reply. Thank you.

10 Oct 2004 Tiw SIIT

This GUI is very useful for my project, speaker verification. I will apply to my presentation. Committes must love it.

02 Nov 2004 nelle nelle  
02 Nov 2004 Jason Jason  
02 Nov 2004 Ahmeed Ahmeed  
02 Nov 2004 George George  
02 Nov 2004 Futterlon Futterlon  
08 Nov 2004 divya thejus  
11 Nov 2004 Michael S  
22 Nov 2004 Yan Luo

very nice program, help me much! thanks

28 Nov 2004 chow yt

I cannot run it on v6.51 and an error

"??? Undefined function or variable 'analoginput'.

Error in ==> C:\MATLAB6p5p1\work\record.m (init_sound)
On line 396 ==> ai = analoginput('winsound');

Error in ==> C:\MATLAB6p5p1\work\record.m
On line 130 ==> ai = init_sound(R_fs,R_samp_len);

??? Error while evaluating uicontrol Callback."

will show in the command window. Jesse any changes or suggestion to this problem?

17 Jan 2005 sourav ray  
01 Feb 2005 liu yong xiang

run this program on 6.5,I find only show a GUI without everything on the GUI panal.

06 Mar 2005 Boris Savary

Excellent : very usefull, user-friendly, works well.
But it will be a good thing that to have a kind of scale for the spectrogramm especially for novices...

29 May 2005 haky smoke  
24 Jun 2005 NARESH SHANBAG

THIS SITE REALLY GIVING GOOD INFORMATION

08 Jan 2006 Srikanth J

its very nice...

16 Feb 2006 tan jane

is v good. But can anyone know how to stop a (.wav) file while it is playing?? I have tried using the stop(player), it doesn't work. It will just hang up the whole system. So do anyone have the solution to this problem??

26 Feb 2006 Alon Konchitsky

It is very nice. Thank you. Just one short question, which I belive relates to Matlab or PC and less to this file. How do we record stereo from microphones? What is the wav file format? Is it interlaced (left right left right etc) or other fileformat?

Thanks,
Alon

01 Jun 2006 Jim Wilcox

How would you do this program if you didn't have the data acquisition toolbox?

30 Jul 2006 Julia P.

Thank's alot, it works fine.
But may be someone knows how to make recording not with time slider and "record" button, but with 2 buttons: "record" and "stop recording"?
Thank you in advance!

23 Oct 2006 xinyu ke

good

04 Jan 2007 Rajat Ranjan  
21 Feb 2007 Juan Ramon Beristain

I have not try it, however I read the whole think and looks good.

05 Mar 2007 Ahmad Mujaddid Amin

simple, usefull and user friendly. thanx before

11 Apr 2007 Nurul Bostanudin

simple program with good description. easy to understand.tq.

17 Jun 2007 Sona Patel

Wonderful! Simple yes, but it saved me the time of doing it!

09 Sep 2007 Jim yang

Nice work!

03 Oct 2007 waqas mehboob  
24 Dec 2007 zhang hongxia

Wonderful!Thank you,but if you may give an example, it's convenient and comprehensible!

22 Jan 2008 Fred Blon

But how do we do to recod a random length sound ?

11 Feb 2008 Toon Claes

Real great, thx a lot, this is really what I needed.

16 Feb 2008 alaa elhabbash  
23 Apr 2008 shaukat nawaz  
26 Jun 2008 geoffrey andrews

great job.bravo!

27 Jun 2008 syed shah hassan hassan shah

code for voice record in matlab

08 Aug 2009 Sunny

Excellent code...... VERY VERY Useful

29 Oct 2009 Milan Cajic  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
sound Jesse Hansen 22 Oct 2008 06:54:24
matlab gui Jesse Hansen 22 Oct 2008 06:54:24
audio Jesse Hansen 22 Oct 2008 06:54:24
record Jesse Hansen 22 Oct 2008 06:54:24
signal processing Jesse Hansen 22 Oct 2008 06:54:25
speech Jesse Hansen 22 Oct 2008 06:54:25
voice Jesse Hansen 22 Oct 2008 06:54:25
sound Vikram 12 Dec 2008 12:45:58
matlab gui Vaibhav chidrewar 27 Dec 2008 15:26:36
speech Vaibhav chidrewar 27 Dec 2008 15:26:42
signal processing Vaibhav chidrewar 27 Dec 2008 15:26:47
record astro mmi 04 Sep 2009 19:05:01
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com