forked from burakbayramli/books
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
BB
committed
Jan 4, 2020
1 parent
2c00939
commit fe403a9
Showing
239 changed files
with
4,699 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
|
||
SUPPLEMENTARY MATLAB MATERIAL FOR | ||
--------------------------------- | ||
|
||
DISCRETE-TIME SPEECH SIGNAL PROCESSING: Principles and Practice | ||
--------------------------------------------------------------- | ||
|
||
by Thomas F. Quatieri | ||
--------------------- | ||
|
||
Located in this Prentice Hall web site compartment are functions, scripts, workspaces, | ||
and data required by the MATLAB exercises in the text: Discrete-Time Speech Sign | ||
specific cases of a certain class of speech signal, i.e., the waveforms often can | ||
be replaced by other examples with similar characteristics that serve the instructive | ||
purpose of the exercise. | ||
|
||
Each chapter has its own directory structure. As an example, the directory | ||
for Chapter 13 consists of: | ||
|
||
chapter13/ | ||
--------- | ||
|
||
Backup and Data Directories: | ||
--------------------------- | ||
Back/ | ||
Data/ | ||
|
||
Workspaces: | ||
---------- | ||
ex11M1.mat | ||
ex11M2.mat | ||
|
||
Functions and Scripts: | ||
--------------------- | ||
amfm_sep.m | ||
gaussian_filt.m | ||
wigner.m | ||
specgram_speech.m | ||
cross.m | ||
stftm.m | ||
|
||
In addition, occasionally, readme files appear within the sub-directories. | ||
These readme files are in text format and describe or clarify contents of | ||
the sub-directory or a particular MATLAB exercise. | ||
|
||
Speech files in the Data directory are in both pcm and wav format (but are | ||
also included in the given workspaces). The sampling rate of each speech | ||
file is indicated in the file name. The Data directory for Chapter 13, | ||
for example, contains the required speech files: | ||
|
||
speech1_10k.wav speech_10k.wav | ||
speech1_10k.pcm speech_10k.pcm | ||
|
||
If the designated sampling is not supported by a desired platform, | ||
then in order to listen to the files, a change in sampling rate must | ||
be made (e.g., using MATLAB decimation and interpolation functions) | ||
for the particular platform. | ||
|
||
|
||
|
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions
6
Discrete_Time_Speech_SP_Quatieri/chapter10/Back/ex10_13_creaky.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
DIR_IN = 'Data/'; | ||
filename = 'silly_items.8k'; | ||
|
||
display = 1; | ||
[pitch, voicing] = fread_pitch_creaky([DIR_IN, filename], display); |
6 changes: 6 additions & 0 deletions
6
Discrete_Time_Speech_SP_Quatieri/chapter10/Back/ex10_13_diplo.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
DIR_IN = 'Data/'; | ||
filename = 'jazz_hour.8k'; | ||
|
||
display = 1; | ||
[pitch, voicing] = fread_pitch_diplo([DIR_IN, filename], display); |
6 changes: 6 additions & 0 deletions
6
Discrete_Time_Speech_SP_Quatieri/chapter10/Back/ex10_13_modulate.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
DIR_IN = 'Data/'; | ||
filename = 'NE1.mm.8k'; | ||
|
||
display = 1; | ||
[pitch, voicing] = fread_pitch_modulate([DIR_IN, filename], display); |
6 changes: 6 additions & 0 deletions
6
Discrete_Time_Speech_SP_Quatieri/chapter10/Back/ex10_13_speech1.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
DIR_IN = 'Data/'; | ||
filename = 'tfq.roy.8k'; | ||
|
||
display = 1; | ||
[pitch, voicing] = fread_pitch_creaky([DIR_IN, filename], display); |
71 changes: 71 additions & 0 deletions
71
Discrete_Time_Speech_SP_Quatieri/chapter10/Back/fread_pitch_creaky.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
|
||
function [pitch, voicing] = fread_pitch(filename, display) | ||
% | ||
% [pitch, voicing] = fread_pitch(filename, display) | ||
% | ||
% | ||
% read pitch and voicing as floats | ||
% | ||
% filename is input filename | ||
% display = 0:plot; 1:noplot | ||
% | ||
% | ||
% options | ||
% open file | ||
fid = fopen([filename '.pitch'],'r'); | ||
|
||
% write | ||
[data, count] = fread(fid, 'float'); | ||
|
||
add_frm = 10; | ||
add_on = add_frm*80; | ||
data = [data' zeros(1,add_frm*2)]; | ||
lgh = length(data); | ||
n = 1:2:lgh; | ||
pitch = data(n); | ||
% pitch = 10*data(n); | ||
n = 2:2:lgh; | ||
voicing = data(n); | ||
|
||
|
||
x = load24(filename); | ||
x = x/max(abs(x)); | ||
x = [x' zeros(1, add_on)]; | ||
lghx = length(x); | ||
x = [zeros(1, 160), x(1:lghx-160)]; | ||
lghx = length(x); | ||
lghx_ms = lghx/80; | ||
|
||
if display == 1 | ||
clf; | ||
subplot(311) | ||
plot((1:lghx)/8000, x) | ||
axis([ 0 lghx_ms/100 -1.25 1.25]) | ||
ylabel('Amplitude') | ||
title('(a)') | ||
grid | ||
|
||
n = (1:lgh/2); | ||
subplot(312) | ||
plot(n/100, pitch(1:lgh/2)) | ||
axis([0 lgh/2/100 0 450]) | ||
ylabel('Freq (Hz)') | ||
title('(b)') | ||
%title('PITCH') | ||
grid | ||
subplot(313) | ||
plot(n/100, voicing(1:lgh/2)) | ||
axis([ 0 lgh/2/100 0 1.5]) | ||
%title('VOICING') | ||
title('(c)') | ||
grid | ||
xlabel('Time (s)') | ||
ylabel('Probability') | ||
pause(.5) | ||
end; | ||
|
||
|
||
fclose(fid); | ||
|
||
|
||
|
71 changes: 71 additions & 0 deletions
71
Discrete_Time_Speech_SP_Quatieri/chapter10/Back/fread_pitch_diplo.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
|
||
function [pitch, voicing] = fread_pitch(filename, display) | ||
% | ||
% [pitch, voicing] = fread_pitch(filename, display) | ||
% | ||
% | ||
% read pitch and voicing as floats | ||
% | ||
% filename is input filename | ||
% display = 0:plot; 1:noplot | ||
% | ||
% | ||
% options | ||
% open file | ||
fid = fopen([filename '.pitch'],'r'); | ||
|
||
% write | ||
[data, count] = fread(fid, 'float'); | ||
|
||
add_frm = 10; | ||
add_on = add_frm*80; | ||
data = [data' zeros(1,add_frm*2)]; | ||
lgh = length(data); | ||
n = 1:2:lgh; | ||
pitch = data(n); | ||
% pitch = 10*data(n); | ||
n = 2:2:lgh; | ||
voicing = data(n); | ||
|
||
|
||
x = load24(filename); | ||
x = x/max(abs(x)); | ||
x = [x' zeros(1, add_on)]; | ||
lghx = length(x); | ||
x = [zeros(1, 160), x(1:lghx-160)]; | ||
lghx = length(x); | ||
lghx_ms = lghx/80; | ||
|
||
if display == 1 | ||
clf; | ||
subplot(311) | ||
plot((1:lghx)/8000, x) | ||
axis([ 0 lghx_ms/100 -1.25 1.25]) | ||
ylabel('Amplitude') | ||
title('(a)') | ||
grid | ||
|
||
n = (1:lgh/2); | ||
subplot(312) | ||
plot(n/100, pitch(1:lgh/2)) | ||
axis([0 lgh/2/100 0 175]) | ||
ylabel('Freq (Hz)') | ||
title('(b)') | ||
%title('PITCH') | ||
grid | ||
subplot(313) | ||
plot(n/100, voicing(1:lgh/2)) | ||
axis([ 0 lgh/2/100 0 1.5]) | ||
%title('VOICING') | ||
title('(c)') | ||
grid | ||
xlabel('Time (s)') | ||
ylabel('Probability') | ||
pause(.5) | ||
end; | ||
|
||
|
||
fclose(fid); | ||
|
||
|
||
|
71 changes: 71 additions & 0 deletions
71
Discrete_Time_Speech_SP_Quatieri/chapter10/Back/fread_pitch_modulate.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
|
||
function [pitch, voicing] = fread_pitch(filename, display) | ||
% | ||
% [pitch, voicing] = fread_pitch(filename, display) | ||
% | ||
% | ||
% read pitch and voicing as floats | ||
% | ||
% filename is input filename | ||
% display = 0:plot; 1:noplot | ||
% | ||
% | ||
% options | ||
% open file | ||
fid = fopen([filename '.pitch'],'r'); | ||
|
||
% write | ||
[data, count] = fread(fid, 'float'); | ||
|
||
add_frm = 10; | ||
add_on = add_frm*80; | ||
data = [data' zeros(1,add_frm*2)]; | ||
lgh = length(data); | ||
n = 1:2:lgh; | ||
pitch = data(n); | ||
% pitch = 10*data(n); | ||
n = 2:2:lgh; | ||
voicing = data(n); | ||
|
||
|
||
x = load24(filename); | ||
x = x/max(abs(x)); | ||
x = [x' zeros(1, add_on)]; | ||
lghx = length(x); | ||
x = [zeros(1, 160), x(1:lghx-160)]; | ||
lghx = length(x); | ||
lghx_ms = lghx/80; | ||
|
||
if display == 1 | ||
clf; | ||
subplot(311) | ||
plot((1:lghx)/8000, x) | ||
axis([ 0 lghx_ms/100 -1.25 1.25]) | ||
ylabel('Amplitude') | ||
title('(a)') | ||
grid | ||
|
||
n = (1:lgh/2); | ||
subplot(312) | ||
plot(n/100, pitch(1:lgh/2)) | ||
axis([0 lgh/2/100 0 650]) | ||
ylabel('Freq (Hz)') | ||
title('(b)') | ||
%title('PITCH') | ||
grid | ||
subplot(313) | ||
plot(n/100, voicing(1:lgh/2)) | ||
axis([ 0 lgh/2/100 0 1.5]) | ||
%title('VOICING') | ||
title('(c)') | ||
grid | ||
xlabel('Time (s)') | ||
ylabel('Probability') | ||
pause(.5) | ||
end; | ||
|
||
|
||
fclose(fid); | ||
|
||
|
||
|
71 changes: 71 additions & 0 deletions
71
Discrete_Time_Speech_SP_Quatieri/chapter10/Back/fread_pitch_speech1.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
|
||
function [pitch, voicing] = fread_pitch(filename, display) | ||
% | ||
% [pitch, voicing] = fread_pitch(filename, display) | ||
% | ||
% | ||
% read pitch and voicing as floats | ||
% | ||
% filename is input filename | ||
% display = 0:plot; 1:noplot | ||
% | ||
% | ||
% options | ||
% open file | ||
fid = fopen([filename '.pitch'],'r'); | ||
|
||
% write | ||
[data, count] = fread(fid, 'float'); | ||
|
||
add_frm = 10; | ||
add_on = add_frm*80; | ||
data = [data' zeros(1,add_frm*2)]; | ||
lgh = length(data); | ||
n = 1:2:lgh; | ||
pitch = data(n); | ||
% pitch = 10*data(n); | ||
n = 2:2:lgh; | ||
voicing = data(n); | ||
|
||
|
||
x = load24(filename); | ||
x = x/max(abs(x)); | ||
x = [x' zeros(1, add_on)]; | ||
lghx = length(x); | ||
x = [zeros(1, 160), x(1:lghx-160)]; | ||
lghx = length(x); | ||
lghx_ms = lghx/80; | ||
|
||
if display == 1 | ||
clf; | ||
subplot(311) | ||
plot((1:lghx)/8000, x) | ||
axis([ 0 lghx_ms/100 -1.25 1.25]) | ||
ylabel('Amplitude') | ||
title('(a)') | ||
grid | ||
|
||
n = (1:lgh/2); | ||
subplot(312) | ||
plot(n/100, pitch(1:lgh/2)) | ||
axis([0 lgh/2/100 0 175]) | ||
ylabel('Freq (Hz)') | ||
title('(b)') | ||
%title('PITCH') | ||
grid | ||
subplot(313) | ||
plot(n/100, voicing(1:lgh/2)) | ||
axis([ 0 lgh/2/100 0 1.5]) | ||
%title('VOICING') | ||
title('(c)') | ||
grid | ||
xlabel('Time (s)') | ||
ylabel('Probability') | ||
pause(.5) | ||
end; | ||
|
||
|
||
fclose(fid); | ||
|
||
|
||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
|
||
Speech equivalences: | ||
|
||
speech1_8k.pcm = tfq.roy.8k | ||
|
||
diplo1_8k.pcm = jazz_hour.8k | ||
creak1_8k.pcm = silly_items.8k | ||
modulated1_8k.pcm = NE1.mm.8k |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+720 Bytes
Discrete_Time_Speech_SP_Quatieri/chapter10/Data/silly_items.8k.pitch
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
DIR_IN = 'Data/'; | ||
filename = 'silly_items.8k'; | ||
|
||
display = 1; | ||
[pitch, voicing] = fread_pitch_creaky([DIR_IN, filename], display); |
Oops, something went wrong.