This question is closed. Reopen it to edit or answer.

How process.wav file or string handle?

1 view (last 30 days)
Mario Martos
Mario Martos on 23 May 2016
Commented: Stephen23 on 23 May 2016
I wanted to ask about a function that I want to do but do not know how you could read or load the .wav file that I draw or stored in a directory, and if not I introduce you to the input value ( ' youtube_url ' ) between me comillado could happen to quotes for processing ; on the other hand do not know if there is any way in matlab to extract the ID of a youtube link , or could process the following function as the extracted wav is with that ID corresponding Youtube link but with fs = 48.000
The function would look like or what you want to do:
function [] = principal (youtube_url); % If you do not introduce quotes I think I would not work ...
command = [ 'youtube-dl -x YouTube- --audio -format --id wav' youtube_url];
system (command);
audio_wav = audioread (fullfile (pwd [youtube_id '.wav'])); % Where here I want to read the extracted wav that has the name of the ID entered Youtube URL for later use or processing.
[Y, FS, NBITS] = audioread (youtube_id '.wav')% I do not know what to call that .wav
New = resample (Y, 441.480);
wavwrite (New, 44100, name '.wav');
An example of how it should be or be for an example of url:
function [] = principal ( '');
command = [ 'youtube-dl -x YouTube- --audio -format --id wav'];
system (command);
[Y, FS, NBITS] = audioread ( 'e4d0LOuP4Uw.wav');
audio_wav = audioread (fullfile (pwd [ 'e4d0LOuP4Uw.wav'])); % I do not know what to call that I have drawn wav.
New = resample (Y, 441,480);
wavwrite (New, 44100, 'name .wav');
I hope I explained well, thank you very much.

Answers (0)

Community Treasure Hunt

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

Start Hunting!