当前位置:网站首页>Matlab uses audiorecorder and recordblocking to record sound, play to play sound, and audiobook to save sound
Matlab uses audiorecorder and recordblocking to record sound, play to play sound, and audiobook to save sound
2022-07-02 01:29:00 【Hu Gang 2016】
Because I use now matlab yes 2018a, So you can't use abandoned wavreord and wavplay, Only use audiorecorder.
Fs=44800;% Microphone sampling rate
nBits=16;% Quantization Bits
nChannel=1;% Number of recording channels , You can set 1 perhaps 2
time=5;% Time of recording audio , The unit is seconds
recObj = audiorecorder(Fs, nBits, nChannel);
disp('Start speaking.')
% Start recording sound
recordblocking(recObj, time);
disp('End of Recording.');
% Playback recorded data
play(recObj);
% Get recording data
myRecording = getaudiodata(recObj);
% Draw recording data waveform
plot(myRecording);
% Store voice signals
filename = 'audiorecorder_data_1.wav';
audiowrite(filename, myRecording, Fs);
You can see that the size of the file generated by the recording is 438KB
It's calculated by :Fs * nBits / 8 * time * nChannel / 1024
namely :44800 * 16 / 8 * 5 * 1 / 1024 = 437.5KB
No matter how many words you say when recording , Even if you don't say a word , The size of the generated files is so large .
边栏推荐
- matlab 实现语音信号重采样和归一化,并播放比对效果
- 6-2 vulnerability exploitation - inevitable problems of FTP
- 机器学习基本概念
- [Maya] the error of importing Maya into Metahuman
- Load and domcontentloaded in JS
- About asp Net core uses a small detail of datetime date type parameter
- II Basic structure of radio energy transmission system
- KS006基于SSM实现学生成绩管理系统
- [Chongqing Guangdong education] Tianshui Normal University universe exploration reference
- Learning note 3 -- Key Technologies of high-precision map (Part 1)
猜你喜欢
How to compress video size while adding watermark with one click?
Recommend an online interface mock tool usemock
Basic concepts of machine learning
How does schedulerx help users solve the problem of distributed task scheduling?
Learn about servlets
The technology boss is ready, and the topic of position C is up to you
Have you stepped on the nine common pits in the e-commerce system?
[disease detection] realize lung cancer detection system based on BP neural network, including GUI interface
卷積神經網絡(包含代碼與相應圖解)
Infiltration records of CFS shooting range in the fourth phase of the western regions' Dadu Mansion
随机推荐
The first "mobile cloud Cup" empty publicity meeting, looking forward to working with developers to create a new world of computing!
I'll teach you to visit Amazon RDS for a year and build a MySQL cloud database (only 10 minutes, really fragrant)
matlab 实现语音信号重采样和归一化,并播放比对效果
6-2 vulnerability exploitation - inevitable problems of FTP
微信小程序中使用tabBar
[WesternCTF2018]shrine writeup
[IVX junior engineer training course 10 papers] 05 canvas and aircraft war game production
Design and control of multi rotor aircraft (VII) -- sensor calibration and measurement model
[IVX junior engineer training course 10 papers] 04 canvas and a group photo of IVX and me
6-3漏洞利用-SSH环境搭建
遊戲思考15:全區全服和分區分服的思考
[IVX junior engineer training course 10 papers to get certificates] 09 chat room production
Luogu p1775 stone merger (weakened version)
技术大佬准备就绪,话题C位由你决定
Exclusive delivery of secret script move disassembly (the first time)
GL Studio 5 installation and experience
What is commercial endowment insurance? Is commercial endowment insurance safe?
[rust web rokcet Series 2] connect the database and add, delete, modify and check curd
Two TVs
How does schedulerx help users solve the problem of distributed task scheduling?