how to import an audio file ?

조회 수: 237 (최근 30일)
jérôme TAÏEB
jérôme TAÏEB 2018년 9월 29일
댓글: Marcus Niklasson 2021년 12월 7일
Hi,
I would like to write that in the command windows:
load handel.mat
filename = 'handel.mp3';
audiowrite(filename,y,Fs);
clear y Fs
[y,Fs] = audioread('handel.mp3');
but i don't know to import my audio file 'handel.mp3' from my hard disk to Matlab.
Can you help me?
thanks

채택된 답변

Stephen23
Stephen23 2018년 9월 29일
편집: Stephen23 2018년 9월 29일
Use audioread. Why do you think that your code is not working? What do you expect to happen?

추가 답변 (1개)

jérôme TAÏEB
jérôme TAÏEB 2018년 9월 29일
편집: jérôme TAÏEB 2018년 9월 29일
the problem is the path of the audio file.
Does Matlab recognize the path of the audio file on the hard disk?
for example,in the following line:
[y,Fs] = audioread('handel.mp3')
if path of 'handel.mp3' is for example C:/Users/chemin1/chemin2,must i write:
[y,Fs] = audioread('C:/Users/chemin1/chemin2/handel.mp3')?
  댓글 수: 1
Marcus Niklasson
Marcus Niklasson 2021년 12월 7일
audioread("C:/Users/chemin1/chemin2/handel.mp3")

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

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by