How to save recorded audio on computer

37 ビュー (過去 30 日間)
matija corak
matija corak 2015 年 2 月 1 日
回答済み: manishsahu sahu 2018 年 4 月 11 日
Hello. I want to know how to save audio that I record in matlab on my computer so I can later analyzed that, but firstly want to save it. I can't find that type of function. This is my part of program and I want to put that function somewhere after I record sound.
>> Fs = 1E+4;
>> nBits = 24;
>> nChannels = 1;
>> sig = audiorecorder(Fs, nBits, nChannels);
>> recordblocking(sig,5);
>> sigsound = getaudiodata(sig);
>> t = linspace(0, size(sigsound,1), size(sigsound,1))/Fs;
>> h=tftb_window(17,'hamming');
>> [tfr,t,f]=tfrsp(sigsound,1:length(sigsound),64,h,1);
>> mesh(tfr)

採用された回答

Star Strider
Star Strider 2015 年 2 月 1 日
編集済み: Star Strider 2015 年 2 月 1 日
Use the audiowrite function.
In your application, define your filename, then:
filename = ' ... ';
audiowrite(filename, sigsound, Fs)
Add other options to your audiowrite call as necessary. See the ‘Name-Value Pair Arguments’ section for details.
  2 件のコメント
matija corak
matija corak 2015 年 2 月 1 日
thanks again.
Star Strider
Star Strider 2015 年 2 月 1 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (1 件)

manishsahu sahu
manishsahu sahu 2018 年 4 月 11 日
thanks

カテゴリ

Help Center および File ExchangeSimulation, Tuning, and Visualization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by