Facebook
From Social Bison, 1 Year ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 100
  1. EXPERIMENT NO 4
  2.  
  3. % Using ex overlapping rectangular window with frame duration 8.01ms, % calculate the energy of the speech sample "ITSTIME.wav". Analyze the % energy profile for different frames. Combine the energy of the different
  4.  
  5. X frames and plot along with the original speech signal.
  6.  
  7. % BIPASHA CHAMUAH
  8.  
  9. 190101007
  10.  
  11. clc;clear all;close all;
  12.  
  13. X to read data from a audio file "ITSTIME.wav"
  14.  
  15. [data, fs] = audioread("ITSTIME.wav");
  16.  
  17. X normalizing the data values
  18.  
  19. data = data/abs (max(data));
  20.  
  21. % setting frame duration to 8.815
  22.  
  23. fd = 0.01;
  24.  
  25. % framing the entire speech signal
  26.  
  27. frames framing (data, fs, fd);
  28.  
  29. Xextracting the size of the frames [r,c] size (frames);
  30.  
  31. setting the energy term to e initially ste = 0;
  32.  
  33. Xloop to determine Short-Term Energy (STE) for every frame
  34.  
  35. for 1-1 r
  36.  
  37. ste(i) sum(frames(1, ; ).^2);
  38.  
  39. end
  40.  
  41. % normalizing STE values ste ste/max(ste);
  42.  
  43. fsize= round(fd*fs);
  44.  
  45. x initializing the variable to generate the Short-Term Energy plot x combining all the values of STE to create the wave
  46.  
  47. ste_wave = 0;
  48.  
  49. for 11:length(ste)
  50.  
  51. 1 = length(ste_wave);
  52.  
  53. ste_wave (1 : 1+fsize) = ste(1);
  54.  
  55. end
  56.  
  57. plotting original signal
  58.  
  59. plot(data);
  60.  
  61. hold on
  62.  
  63. % overlapping STE curve over original plot(ste_wave, 'r', 'linewidth', 2);
  64.  
  65. title('Energy of Speech Signal');
  66.  
  67. xlabel('Time(s)');
  68.  
  69. ylabel('Amplitude"); legend (Original Signal', 'Energy Signal");
  70.  
  71. figure
  72.  
  73. % plotting four different frames with energy fr_1=32; % taking frame no. 32
  74.  
  75. subplot(1,2,1);
  76.  
  77. plot(frames (fr 1,:));
  78.  
  79. hold on;
  80.  
  81. title("Frame No. 1");
  82.  
  83. xlabel("Time(s)");
  84.  
  85. ylabel("Amplitude");
  86.  
  87. % designing energy level for frame 1 enrg 1v1 ste(fr_1);
  88.  
  89. for 11: C
  90.  
  91. WR (1) enrg 1v1;
  92.  
  93. end
  94.  
  95. plot (WR, 'r', 'linewidth',2);
  96.  
  97. hold off;
  98.  
  99. stating energy level for frame 1
  100.  
  101. dim [.15.0.3.3]; str['Energy of frame: num2str(enrg_lvl)];

Replies to Untitled rss

Title Name Language When
Re: Untitled Smelly Goose text 1 Year ago.