how to import an audio file ?

239 vues (au cours des 30 derniers jours)
jérôme TAÏEB
jérôme TAÏEB le 29 Sep 2018
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

Réponse acceptée

Stephen23
Stephen23 le 29 Sep 2018
Modifié(e) : Stephen23 le 29 Sep 2018
Use audioread. Why do you think that your code is not working? What do you expect to happen?

Plus de réponses (1)

jérôme TAÏEB
jérôme TAÏEB le 29 Sep 2018
Modifié(e) : jérôme TAÏEB le 29 Sep 2018
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 commentaire
Marcus Niklasson
Marcus Niklasson le 7 Déc 2021
audioread("C:/Users/chemin1/chemin2/handel.mp3")

Connectez-vous pour commenter.

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by