السلام عليكم
لو كان عندي ملف صوت من نوع raw
sampling rate = 8000 samples/sec for example
samples are signed 16-bit sample values
one sample takes 2 bytes
كيف يمكن قراءه هذا الملف ومعرفة عدد و معدل السامبلز
MyFile = fopen('myfile path')
MyFileData = fread(MyFile)
y = MyFileData / 8000
x= size(y)
هل من فكرة حول كيفية كتابة كود مناسب ؟؟؟ سواء بالماتلاب او بلغة سي ؟؟؟؟؟
[CENTER]السلام عليكم
اخي الافضل ان تعطينا ملف لنستطيع المساعدة
ويجب ان نعرف مصدر الملف ايضا "format "
لان ملفات raw هي ملفات binary لا تحتوي على معلومات header
[/center]
اخي الكريم … في المرفقات الملف المطلوب
[CENTER]ممكن هذا يساعدك
افترضت انه
channel واحدة
و يستخدم IEEE little-endian
fid = fopen('test.raw','r','ieee-le');
data=fread(fid,inf,'int16');
wavplay(int16(data), 8000);
سمعت صوت القطار
[/center]
[LEFT]Yes Dr.Article… it is train voice
I have used this code and got same sound
close all
clear all
fs = 8000;
Y = fopen('C:\*******\Desktop\PythonCodes est.raw', 'r');
data = fread(Y,'int16');
sound(data,fs)
[/left]
[LEFT]]Brother … Do you have idea how to figure out the number of samples and the minimum and maximum values , Also the average value of all samples of this file ???
[/left]