MATLAB Answers

Read Text File and extract audio value

Benson Yong Zhi Lau 님이 질문을 제출함. 30 Sep 2019
최근 활동 Gaurav Garg 님이 답변함. 3 Oct 2019
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

Adam 30 Sep 2019
Have you tried the obvious things like
doc importdata
?

로그인 to comment.

태그

제품

답변 수: 1

Gaurav Garg 님의 답변 3 Oct 2019

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

로그인 to comment.



Translated by