How to convert data file to audio file
17 views (last 30 days)
Show older comments
Hello. everyone, any one know how to convert data file to audio file (.mp3 or .wav).? I know that matlab can convert audio file to data file. Thank you.
0 Comments
Answers (1)
Jan
on 3 Aug 2017
It depends on what a "data file" is. If you mean e.g. a MAT file, which contains a signal as a vector:
Data = load('File.mat');
FS = 8000; % Frequency
audiowrite('Sound.wav', Data.Y, FS);
Or maybe you mean a text file containing numbers? Then the actual question is how to import a text file.
5 Comments
See Also
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!