Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How process.wav file or string handle?

조회 수: 1 (최근 30일)
Mario Martos
Mario Martos 2016년 5월 23일
댓글: Stephen23 2016년 5월 23일
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.

답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by