برای شرح اینکه نحوه خواندن یک فایل صوتی در متلب چگونه است پس تا پایان این مطلب با ما همراه باشید.
صدا با استفاده از تابع audioread که عملکرد اصلی آن به شرح زیر است در Matlab خوانده می شود.
audioread(filename);
نام فایل در این مورد یک متغیر Matlab است که حاوی رشته ای (آرایه ای از کاراکترها) است که کل نام فایل صوتی را که باید خوانده شود از جمله هر پسوند فایل (مانند mp3، wav و غیره) را تعریف می کند.
که در آن y آرایه یا ماتریس داده های صوتی نمونه برداری شده و Fs فرکانس نمونه برداری از صدای ورودی است. audioread قادر به خواندن فرمت های نشان داده شده در جدول زیر است.
در این مثال، نام فایل ‘exampleAudio.wav’ است، فایلی که باید در آن خوانده شود (نام فایل باید از نوع رشته Matlab باشد) و بنابراین با گیومه های منفرد محدود می شود. نام فایل میتواند یک رشته Matlab باشد که میتواند شامل یک مسیر (تعریف شده در قالب سیستم عامل شما) به هر مکانی روی هارد دیسک شما باشد. به عنوان مثال، نام فایل می تواند مسیر های زیر باشد.
‘c:\mydirectory\mysubdirectory\exampleAudio.wav’ (on windows) ‘~/mydirectory/mysubdirectory/exampleAudio.wav’ (on OSX/Unix/Linux)
در این مطلب نحوه خواندن یک فایل صوتی در متلب را سعی کردیم به ساده ترین نحو بیان نماییم. در صورت هر گونه سوال در این خصوص می توانید با کارشناسان سایت پردازش صوت و تصویر در میان بگذارید .
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.