Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

How process.wav file or string handle?

1 visualizzazione (ultimi 30 giorni)
Mario Martos
Mario Martos il 23 Mag 2016
Commentato: Stephen23 il 23 Mag 2016
Hello,
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.
or,
[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 ( 'https://www.youtube.com/watch?v=e4d0LOuP4Uw');
command = [ 'youtube-dl -x YouTube- --audio -format --id https://www.youtube.com/watch?v=e4d0LOuP4Uw wav'];
system (command);
[Y, FS, NBITS] = audioread ( 'e4d0LOuP4Uw.wav');
or,
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.

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by