%
% Plot the amplitude spectrum of a recorded speaker
% The spectrum was computed from speech recordings with 6 time windows of
% 3 seconds duration. The recordings were with a 44100 sampling rate. Here
% spectral means have been built, so that we have 480 frequency steps of
% about 8.33 Hz. Therefore the shown frequency bandwidth is 4000 Hz, which
% is the bandwidth used in digital telephone transmission.
%
% R. Brigola, May 2010
clear all;
start_time=cputime;
% Input: Speaker number in the data base, which was computed with m-file
% generate_speaker_db.m
N=17; % Number of speaker NN in data base
speaker='Single-Sided Amplitude Spectrum of Speaker NN'; % Insert Name NN
load speaker_fingerprint_db; % the amplitudes of speaker N are saved in the
% N-th row of the matrix db_matrix
% File names
input(1:480)=db_matrix(N,1:480); % 480 amplitudes, 8.33 Hz steps
peak1=0;
peak2=480; % number of stored amplitudes
% f spans the frequency axis
f=8.33*linspace(peak1,peak2,peak2-peak1);
% Plot single-sided amplitude spectrum of the speaker N
figure(1);plot(f,2*input(peak1+1:peak2)/peak2);
title(speaker)
xlabel('Frequency in Hz')
ylabel('Amplitude')
computation_time=cputime - start_time;