couldnt incorporate the .wav file

조회 수: 1 (최근 30일)
Gaurav Sharma
Gaurav Sharma 2018년 11월 22일
편집: Walter Roberson 2018년 11월 22일
I am trying to run some voices [.WAV] in the matlab but couldnt able to do that. Firstly, it wasnt takimg the folder of the sounds... now after provoding the path it is throwing some error.
"Index exceeds the number of array elements (51).
Error in train1 (line 25)
files = traindir('*.wav');"
can some one pls help me with this code. I want to run these code... it is my final project.
I am providing all the codes and the data set of .wav down below as an attchment.
  댓글 수: 1
KALYAN ACHARJYA
KALYAN ACHARJYA 2018년 11월 22일
See the link, answer form Walter Roberson sir.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2018년 11월 22일
traindir is aa variable there . traindir('*.wav') is a request to index the variable with index
[double('*'), double('.'), double('w'), double('a'), double('v')]
  댓글 수: 2
Gaurav Sharma
Gaurav Sharma 2018년 11월 22일
sorry sir, but I didn't get you. What should I need to do ?
I want to run the code, what changes should I make?
Walter Roberson
Walter Roberson 2018년 11월 22일
편집: Walter Roberson 2018년 11월 22일
files = dir(fullfile(traindir,'*.wav'));
and change
[y,Fs] = audioread(files(i).name);
to
[y,Fs] = audioread( fullfile(traindir, files(i).name));

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by