音声データ(1次元データ)からデータを一部を抽出する方法について
Show older comments
[x,fs]=audioread("output3.wav")
音声データからデータの一部を抜き取る方法を教えていただきたいです。(1~50000点など)
簡単な質問になりますがご教授のほどよろしくお願いします。
Answers (1)
load handel.mat
audiowrite("output3.wav",y,Fs); % サンプル handel.mat の音声データをファイルに書き込んだ
clear y Fs
[x,fs] = audioread("output3.wav"); % 再度ファイルを読み取る
size(x) % このサンプル handel.mat の音声データは73113点の長さがある
y = x(1:50000);
size(y) % データの一部(1~50000点)を抜き取った
sound(y,fs); % 曲の途中で止まる事を確認できる
Categories
Find more on Measurements and Spatial Audio in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!