Read Text File and extract audio value
11 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I have a lot of txt files which was digitalised from .wav files. Is there any way that I can do to read and extract the audio values of 8khz. Thanks. A sample of the txt files is attached below. Thanks.
回答(1 个)
Gaurav Garg
2019-10-3
Hi,
I understand that you wish to extract audio from the given text file.
You can use importdata function to read the file into an array and sound function to extract audio from it.
A=importdata (‘Sample.txt’);
sound (A,8000);
The file attached by you contains ‘[‘ and ‘]’ in the beginning and end. importdata would store the file as a single cell in this case. So, ensure that you have removed ‘[‘, ‘]’ and then save the file again.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!