Borrar filtros
Borrar filtros

音声データ(1次元デ​ータ)からデータを一​部を抽出する方法につ​いて

20 visualizaciones (últimos 30 días)
一秀 近藤
一秀 近藤 el 1 de Nov. de 2022
Comentada: 一秀 近藤 el 2 de Nov. de 2022
[x,fs]=audioread("output3.wav")
音声データからデータの一部を抜き取る方法を教えていただきたいです。(1~50000点など)
簡単な質問になりますがご教授のほどよろしくお願いします。

Respuestas (1)

Atsushi Ueno
Atsushi Ueno el 1 de Nov. de 2022
load handel.mat
audiowrite("output3.wav",y,Fs); % サンプル handel.mat の音声データをファイルに書き込んだ
clear y Fs
[x,fs] = audioread("output3.wav"); % 再度ファイルを読み取る
size(x) % このサンプル handel.mat の音声データは73113点の長さがある
ans = 1×2
73113 1
y = x(1:50000);
size(y) % データの一部(1~50000点)を抜き取った
ans = 1×2
50000 1
sound(y,fs); % 曲の途中で止まる事を確認できる
  1 comentario
一秀 近藤
一秀 近藤 el 2 de Nov. de 2022
わかりやすい回答ありがとうございました!参考にさせていただきます!

Iniciar sesión para comentar.

Categorías

Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!