Audio Writing And Saving Location
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello Everyone,
i recorded my voice with below code and now i must get it for using another matlab code,
how can i get my voice as a mp3 or wav from matlab.
close all; clear all;
% get device information
dev = audiodevinfo;
% create recorder object
seskaydet = audiorecorder(44100, 16, 1);
% start recording
disp('start speaking');
% record(rec, 5); % will record for 5sec. for this command pause needs to be added
recordblocking(seskaydet, 2);
% stop recording
disp('Stop recording');
% Play recorded sound
play(seskaydet);
% get audio data
y = getaudiodata(seskaydet);
% plot the sound
plot(y);
0 comentarios
Respuestas (2)
Walter Roberson
el 31 de Dic. de 2018
audiowrite('OutputFileNameGoesHere.wav', y, 44100);
0 comentarios
Suleyman Serhani
el 31 de Dic. de 2018
1 comentario
Walter Roberson
el 31 de Dic. de 2018
If by "install directory" you mean the directory that MATLAB itself is installed in, then if you are using MS Windows, you would need to either Run As Administrator or else install MATLAB somewhere outside of the system Program Files directory. MS Windows blocks ordinary users from writing files into the Program Files directories.
You can specify a full path to save the file when you audiowrite it. For example,
audiowrite('C:\Users\suleyman\CS207\MATLAB\Assignmen3\OutFiles\OutputFileNameGoesHere.wav', y, 44100);
Ver también
Categorías
Más información sobre Audio and Video Data en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!