Updated all scripts. Added complete README file.

This commit is contained in:
Charles STELANDRE 2025-05-04 16:18:30 +02:00
parent 32d3e06436
commit 180dbf4a55
78 changed files with 1522 additions and 40 deletions

BIN
.DS_Store vendored

Binary file not shown.

241
README.md
View File

@ -1 +1,240 @@
Repository for SP 2
# Speech Analysis and Vocoder Repository
This repository contains MATLAB scripts for various speech analysis and synthesis tasks, including a channel vocoder implementation.
## Repository Contents
├── pictures
├── praat_data
├── sound
├── README.md
├── chanvocoder.m
├── computeFormants.m
├── computePitch.m
├── frequencySpectrum.m
├── record_vocoder.m
├── spectrogram.m
├── speech_analysis.m
├── vocoder.m
└── zeroPole.m
* **[`pictures/`](./pictures/)**: This folder contains images or figures generated by the scripts or used in documentation.
* **[`praat_data/`](./praat_data/)**: This folder contains data files in `.txt` extracted from Praat, a software for speech analysis. These files are used by scripts like [`computeFormants.m`](./computeFormants.m) and [`computePitch.m`](./computePitch.m).
* **[`sound/`](./sound/)**: This folder contains audio files (e.g., `.wav`) used as input for the analysis and vocoder scripts, such as `modulator22.wav` used in [`speech_analysis.m`](./speech_analysis.m) and `white_periodic.wav` used as a carrier signal in the vocoder. It also contains all expected results from the decimation, downsampling, and vocoding processes.
* **[`README.md`](./README.md)**: This file, providing an overview of the repository.
* **[`chanvocoder.m`](./chanvocoder.m)**: This function implements a channel vocoder, which modulates a carrier signal with the spectral envelope of a modulator signal.
```matlab
function y = chanvocoder(carrier, modul, chan, numband, overlap)
% y = chanvocoder(carrier, modul, chan, numband, overlap)
% The Channel Vocoder modulates the carrier signal with the modulation signal
% chan = number of channels (e.g., 512)
% numband = number of bands (<chan) (e.g., 32)
% overlap = window overlap (e.g., 1/4)
```
* **[`computeFormants.m`](./computeFormants.m)**: This script computes the average formant frequencies from a data file generated by Praat's formant listing tool.
```matlab
function computeFormants(filename)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function computeFormants(filename)
% ex.: computeFormants("./praat_data/infoFormants.txt")
%
% Task: To compute the average formants from a data set extracted from the formant
% listing tool of the Praat software.
%
% Inputs:
% -filename : String containing the directory of the file to read (.txt).
%
% Outputs:
%
%
% Author: Charles Stelandre - charles.stelandre@ecam.fr
% Date: 01/05/2025
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
```
* **[`computePitch.m`](./computePitch.m)**: This script calculates the average pitch from a data file generated by Praat's pitch listing tool.
```matlab
function computePitch(filename)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function computePitch(filename)
% ex.: computeFormants("./praat_data/infoPitch.txt")
%
% Task: To compute the average pitch from a data set extracted from the formant
% listing tool of the Praat software.
%
% Inputs:
% -filename : String containing the directory of the file to read (.txt).
%
% Outputs: -
%
%
% Author: Charles Stelandre - charles.stelandre@ecam.fr
% Date: 01/05/2025
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
```
* **[`frequencySpectrum.m`](./frequencySpectrum.m)**: This function computes and displays the power spectrum (linear and logarithmic scales) of an input signal.
```matlab
function [power, duration] = frequencySpectrum(signal, fs, pad)
%%%%%%%%%%%%%%%%%%
%function power = frequencySpectrum(signal, fs, pad)
%
% Task: Display the power spectrum (lin and log scale) of a given signal
%
% Input:
% - signal: the input signal to process
% - fs: the sampling rate
% -pad: boolean if true, signal is padded with 0 to the next power of 2 -> FFT instead of DFT
%
% Output:
% - power: the power spectrum
%
% Author: Guillaume Gibert - guillaume.gibert@ecam.fr
% - Minor adjustments
% Charles Stelandre - charles.stelandre@ecam.fr
%
% Date: 25/04/2022
% - Revised : 01/05/2025
%%%%%%%%%%%%%%%%%%
```
* **[`record_vocoder.m`](./record_vocoder.m)**: This script records audio for a specified duration and then applies the channel vocoder to the recorded signal.
```matlab
function record_vocoder()
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Task: To apply a vocoder on a recorded signal.
%
% Inputs: -
%
% Outputs: -
%
%
% Author: Improved using
% vocoder.m
% code by : Guillaume Gibert - guillaume.gibert@ecam.fr
%
% Modified by : Charles Stelandre - charles.stelandre@ecam.fr
%
% Date: 04/05/2025
%
% Notes : This code records an audio and applies a vocoder on this
% recording. Also plots the temporal plots and spectrograms. Problems
% occured to use the record() functions. An alternative involved using the
% recorder object.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
```
* **[`spectrogram.m`](./spectrogram.m)**: This function calculates and plots the spectrogram of a given time-domain signal.
```matlab
function spectrogram(signal, samplingFreq, step_size, window_size)
%%%%%%%%%%%%%%%%%%%%%%%
%function spectrogram(signal, samplingFreq, step_size, window_size)
% ex.: spectrogram(signal, samplingFreq, step_size, window_size)
%
% Task: Plot the spectrogram of a given signal
%
% Inputs:
% -signal: temporal signal to analyse
% -samplingFreq: sampling frequency of the temporal signal
% -step_size: how often the power spectrum will be computed in ms
% -window_size: size of the analysing window in ms
%
% Ouput: None
%
% author: Guillaume Gibert (guillaume.gibert@ecam.fr)
% date: 14/03/2023
%%%%%%%%%%%%%%%%%%%%%%%
```
* **[`speech_analysis.m`](./speech_analysis.m)**: This is the main script for analyzing a speech signal (`modulator22.wav`). It likely performs various analyses, including temporal plots and potentially frequency domain analysis.
```matlab
function speech_analysis()
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Task: To analyse the temporal and frequency plots of a signal.
%
% Inputs: -
%
% Outputs: -
%
%
% Author: Charles Stelandre - charles.stelandre@ecam.fr
%
% Date: 09/04/2025
%
% Notes : This is the main file for the analysis of a signal. The main
% signal is modulator22.wav, which is present in the "sound" folder. Sound
% functions "sound()" are commented at then of the script.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
```
* **[`vocoder.m`](./vocoder.m)**: This script likely serves as a high-level function or entry point for applying different types of vocoding techniques (though based on the presence of `chanvocoder.m`, it might specifically call the channel vocoder).
```matlab
function vocoder()
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Task: To create a vocoded version
%
% Inputs: -
%
% Outputs: -
%
%
% Author: Charles Stelandre - charles.stelandre@ecam.fr
%
% Date: 01/05/2025
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
```
* **[`zeroPole.m`](./zeroPole.m)**: This function visualizes the zeros and poles of a given filter (defined by its coefficients `a` and `b`) in the complex z-plane.
```matlab
function [Z, P] = zeroPole(a, b, plt)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function [Z, P] = zeroPole(a, b, plt)
% ex.: [Z, P] = zeroPole( [1 0 0.81], [1 0.5 -1], 1)
% ex.: [Z, P] = zeroPole( [1 -1.2 0.3], [0.1 0.0 0.0], 1)
%
% Task: To experiment with zeros and poles of filters
%
% Inputs:
% -a: vector of ak weights applied to previous outputs
% -b: vector of bm weights applied to previous inputs
% -plt: if different from 0, plot the zeros/poles
%
% Outputs:
%
%
% Author: Guillaume Gibert - guillaume.gibert@ecam.fr,
%
% - Minor adjustments :
% Charles Stelandre - charles.stelandre@ecam.fr
%
% Date: 09/04/2025
% - Revised: 01/05/2025
%
% Notes : A small adjustment was made to detect whenever the FIR or the IIR
% is used. Additionally, the poles and zeros labels were adjusted to be
% displayed correctly in the complex z-plane.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
```
## Usage
To use these scripts, ensure you have MATLAB installed. You will likely need to navigate to the repository directory within the MATLAB environment.
1. **Data Preparation:** Ensure the necessary audio files (`.wav`) are present in the [`sound/`](./sound/) folder and the Praat data files (`.txt`) are in the [`praat_data/`](./praat_data/) folder if you intend to run the analysis scripts.
2. **Running Scripts:** Open the desired `.m` file in the MATLAB editor and run it by pressing the "Run" button or by typing its name in the MATLAB command window (without the `.m` extension).
### Specific Instructions for Some Scripts:
* **[`computeFormants.m`](./computeFormants.m)**: Run this script with the path to your Praat formant data file as input, e.g., `computeFormants('./praat_data/infoFormants.txt')`.
* **[`computePitch.m`](./computePitch.m)**: Similarly, run this with the path to your Praat pitch data file, e.g., `computePitch('./praat_data/infoPitch.txt')`.
* **[`frequencySpectrum.m`](./frequencySpectrum.m)**: This is a function and needs to be called by another script or from the command line with a signal and sampling rate as inputs, e.g., `[power, duration] = frequencySpectrum(yourSignal, yourSamplingRate, true)`.
* **[`record_vocoder.m`](./record_vocoder.m)**: Run this script directly. It will prompt you to press a key to start recording audio, apply the vocoder, and play the result.
* **[`spectrogram.m`](./spectrogram.m)**: This is a function that needs to be called with a signal, sampling frequency, step size (in ms), and window size (in ms), e.g., `spectrogram(yourSignal, yourFs, 10, 30)`.
* **[`speech_analysis.m`](./speech_analysis.m)**: Run this script directly to perform analysis on the `modulator22.wav` file.
* **[`chanvocoder.m`](./chanvocoder.m)** and **[`vocoder.m`](./vocoder.m)**: These are likely functions called by other scripts, such as [`record_vocoder.m`](./record_vocoder.m).
* **[`zeroPole.m`](./zeroPole.m)**: This function can be called with the filter coefficients and a flag to plot (1) or not (0), e.g., `[Z, P] = zeroPole([1 -0.9], [1 0], 1)`.
## Relevant Information
* **Authors:** The scripts in this repository are primarily authored by Guillaume Gibert ([`guillaume.gibert@ecam.fr`](mailto:guillaume.gibert@ecam.fr)) and Charles Stelandre ([`charles.stelandre@ecam.fr`](mailto:charles.stelandre@ecam.fr)).
* **Date:** The scripts have been created and revised on various dates, with the latest revisions around May 2025.
* **Software:** These scripts are written for MATLAB. Ensure you have a compatible version installed.
* **Dependencies:** Some scripts might depend on specific toolboxes in MATLAB, such as the Signal Processing Toolbox and the Audio System Toolbox.
* **Praat:** Scripts like [`computeFormants.m`](./computeFormants.m) and [`computePitch.m`](./computePitch.m) rely on data exported from Praat ([http://www.fon.hum.uva.nl/praat/](http://www.fon.hum.uva.nl/praat/)), a free software for phonetic analysis.
This repository provides a set of tools for analyzing speech signals and experimenting with speech synthesis techniques like channel vocoding. Explore the individual scripts to understand their specific functionalities and how they can be used for your speech processing tasks.

39
computeFormants.m Normal file
View File

@ -0,0 +1,39 @@
function computeFormants(filename)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function computeFormants(filename)
% ex.: computeFormants("./praat_data/infoFormants.txt")
%
% Task: To compute the average formants from a data set extracted from the formant
% listing tool of the Praat software.
%
% Inputs:
% -filename : String containing the directory of the file to read (.txt).
%
% Outputs:
%
%
% Author: Charles Stelandre - charles.stelandre@ecam.fr
% Date: 01/05/2025
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
data = readtable(filename);
% Extract each column into variables named after the headers
Time_s = data.Time_s;
F1_Hz = data.F1_Hz;
F2_Hz = data.F2_Hz;
F3_Hz = data.F3_Hz;
F4_Hz = data.F4_Hz;
% Compute averages, handling missing or undefined values
mean_F1_Hz = mean(F1_Hz, 'omitnan');
mean_F2_Hz = mean(F2_Hz, 'omitnan');
mean_F3_Hz = mean(F3_Hz, 'omitnan');
mean_F4_Hz = mean(F4_Hz, 'omitnan');
% Display results
fprintf('Average F1_Hz: %.4f\n', mean_F1_Hz);
fprintf('Average F2_Hz: %.4f\n', mean_F2_Hz);
fprintf('Average F3_Hz: %.4f\n', mean_F3_Hz);
fprintf('Average F4_Hz: %.4f\n', mean_F4_Hz);

32
computePitch.m Normal file
View File

@ -0,0 +1,32 @@
function computePitch(filename)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function computePitch(filename)
% ex.: computeFormants("./praat_data/infoPitch.txt")
%
% Task: To compute the average pitch from a data set extracted from the formant
% listing tool of the Praat software.
%
% Inputs:
% -filename : String containing the directory of the file to read (.txt).
%
% Outputs:
%
%
% Author: Charles Stelandre - charles.stelandre@ecam.fr
% Date: 01/05/2025
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Read the table as text to handle '--undefined--'
data = readtable(filename, 'Delimiter', ' ', 'MultipleDelimsAsOne', true);
% Convert F0_Hz column to numeric, converting '--undefined--' to NaN
F0_Hz = str2double(string(data.F0_Hz)); % Converts '--undefined--' to NaN
Time_s = data.Time_s;
% Compute mean while omitting NaN values
mean_F0_Hz = mean(F0_Hz, 'omitnan');
% Display the result
fprintf('Average F0_Hz: %.4f\n', mean_F0_Hz);
end

View File

@ -12,9 +12,12 @@ function [power, duration] = frequencySpectrum(signal, fs, pad)
% Output:
% - power: the power spectrum
%
% Author: Guillaume Gibert - guillaume.gibert@ecam.fr
% - Minor adjustments
% Charles Stelandre - charles.stelandre@ecam.fr
%
% Guillaume Gibert, guillaume.gibert@ecam.fr
% 25/04/2022
% Date: 25/04/2022
% - Revised : 01/05/2025
%%%%%%%%%%%%%%%%%%
n = length(signal); % number of samples
@ -45,6 +48,7 @@ xticks(0:0.1*fs:n*fs);
xticklabels(0:0.1:n/fs);
xlabel('Time (s)');
ylabel('Amplitude (a.u.)');
title("Time plot")
subplot(1,3,2) % linear frequency plot
f = (0:n-1)*(fs/n); % frequency range
@ -52,15 +56,18 @@ plot(f,power, 'b*'); hold on;
plot(f,power, 'r');
xlabel('Frequency (Hz)')
ylabel('Power (a.u.)')
title("Linear Frequency Plot")
subplot(1,3,3) % log frequency plot
plot(f,10*log10(power/power(ind)));
xlabel('Frequency (Hz)')
ylabel('Power (dB)')
title("Logarithmic Frequency Plot")
hold off
figure;
plot(f,10*log10(power/power(ind)));
xlabel('Frequency (Hz)')
ylabel('Power (dB)')
title("Logarithmic Frequency Plot")

BIN
pictures/.DS_Store vendored Normal file

Binary file not shown.

BIN
pictures/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

BIN
pictures/1modulator.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

BIN
pictures/1temporalPlot.pdf Normal file

Binary file not shown.

BIN
pictures/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

BIN
pictures/2carrier.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

BIN
pictures/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

BIN
pictures/3vocoded.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

BIN
pictures/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 KiB

BIN
pictures/DFTLog.fig Normal file

Binary file not shown.

BIN
pictures/DFTLog.pdf Normal file

Binary file not shown.

BIN
pictures/DFTPlots copie.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

BIN
pictures/DFTPlots.fig Normal file

Binary file not shown.

BIN
pictures/DFTPlots.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
pictures/FFTLog.fig Normal file

Binary file not shown.

BIN
pictures/FFTLog.pdf Normal file

Binary file not shown.

BIN
pictures/FFTPlots copie.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

BIN
pictures/FFTPlots.fig Normal file

Binary file not shown.

BIN
pictures/FFTPlots.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
pictures/Imp_FIR.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
pictures/decim_down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
pictures/freq_decim.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
pictures/freq_decimated.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
pictures/plots_decim.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

32
praat_data/10finfo.txt Normal file
View File

@ -0,0 +1,32 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
0.776650 463.499297 565.423268 2661.611073 3077.680945
0.782900 475.963445 622.004661 2663.618605 3110.583247
0.789150 543.065399 554.739495 2682.958066 3119.463940
0.795400 589.017785 611.538961 2665.380736 3126.668212
0.801650 634.030333 669.996870 2659.239573 3123.774397
0.807900 623.230538 753.276509 2665.417846 3187.093200
0.814150 594.292510 834.962472 2651.115245 3211.991119
0.820400 624.663648 872.968547 2638.781941 3241.238161
0.826650 612.691750 928.737313 2631.696241 3269.092004
0.832900 625.194698 994.491938 2632.685439 3284.150896
0.839150 607.836646 1045.108842 2612.805165 3306.974801
0.845400 615.278930 1062.726200 2599.663173 3329.220114
0.851650 636.576244 1086.600395 2620.420010 3366.915831
0.857900 644.787655 1107.154136 2635.183513 3390.238997
0.864150 672.736919 1156.993024 2717.547364 3413.951917
0.870400 669.061549 1175.857408 2734.377458 3421.912067
0.876650 665.795305 1197.206271 2729.024133 3387.888239
0.882900 674.729514 1235.659484 2743.387511 3434.385425
0.889150 666.931663 1258.172153 2761.686180 3497.302691
0.895400 662.061867 1303.641313 2769.556694 3533.651904
0.901650 645.944305 1330.653301 2766.687092 3541.406159
0.907900 634.776595 1374.820538 2766.811613 3552.957028
0.914150 640.998121 1439.240242 2773.071748 3597.580596
0.920400 626.523139 1470.713011 2759.967510 3615.483760
0.926650 611.432148 1523.138290 2754.242254 3593.726226
0.932900 584.618495 1569.513582 2768.886483 3614.370531
0.939150 558.028076 1585.357271 2775.401594 3645.510014
0.945400 517.696912 1590.688088 2766.642249 3597.103757
0.951650 476.789393 1592.987327 2737.241607 3599.739538
0.957900 450.476442 1588.225542 2713.077446 3586.989034
0.964150 402.992634 1582.431260 2532.938248 3486.759317

14
praat_data/10pinfo.txt Normal file
View File

@ -0,0 +1,14 @@
Time_s F0_Hz
0.784150 98.253350
0.799150 97.552709
0.814150 95.835712
0.829150 95.258914
0.844150 95.298879
0.859150 95.676025
0.874150 95.792589
0.889150 97.046504
0.904150 99.624471
0.919150 102.763937
0.934150 105.520861
0.949150 107.363205
0.964150 109.092015

27
praat_data/11finfo.txt Normal file
View File

@ -0,0 +1,27 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
0.976650 284.176209 1663.365773 2676.141540 3141.348772
0.982900 291.242035 1652.145613 2596.050169 3665.846093
0.989150 293.689298 1672.979620 2542.949229 4100.332985
0.995400 295.641845 1702.049095 2574.035844 4157.561733
1.001650 296.322717 1700.679389 2631.827033 4176.942898
1.007900 300.027291 1694.180819 2658.952054 4253.823448
1.014150 304.325494 1709.392547 2677.092924 4138.289841
1.020400 309.987038 1719.715892 2655.048590 4202.935469
1.026650 310.021564 1719.513385 2614.658402 4251.306857
1.032900 307.716778 1722.265119 2444.324752 4252.180373
1.039150 311.320334 1720.846108 2619.907627 4184.409708
1.045400 309.143110 1695.147537 2655.066263 4340.932422
1.051650 312.957465 1692.356540 2609.498175 4352.153408
1.057900 315.368749 1693.299953 2490.275129 4208.545832
1.064150 314.552532 1675.502662 2564.712264 4084.978576
1.070400 318.256662 1689.046665 2656.910715 4185.740830
1.076650 316.535131 1687.830715 2668.172305 4218.815741
1.082900 320.225288 1709.774399 2786.920474 4254.426770
1.089150 331.326733 1797.310625 2844.341432 4295.260719
1.095400 320.142127 1715.993627 2835.714453 4248.892687
1.101650 313.492011 1675.214829 2812.651937 4210.033274
1.107900 315.544042 1756.728755 2810.144166 4292.930243
1.114150 314.166210 1812.985746 2923.744129 4233.779236
1.120400 308.207935 1888.471874 2951.726531 4259.174691
1.126650 301.915048 1940.838156 2792.002803 4184.999344
1.132900 301.012621 2002.610285 2398.068031 3938.893350

12
praat_data/11pinfo.txt Normal file
View File

@ -0,0 +1,12 @@
Time_s F0_Hz
0.979150 115.478127
0.994150 117.629430
1.009150 118.622549
1.024150 119.530397
1.039150 120.615663
1.054150 121.304736
1.069150 121.001508
1.084150 119.755923
1.099150 118.967399
1.114150 118.398594
1.129150 117.612365

19
praat_data/12finfo.txt Normal file
View File

@ -0,0 +1,19 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
1.257900 1252.215077 2475.848476 3780.425433 4995.816945
1.264150 1206.157557 2554.534963 4117.056291 4898.728604
1.270400 1185.484870 2212.142172 2788.252711 4386.571482
1.276650 1300.434731 1836.489362 2797.551143 4219.775423
1.282900 1326.834084 2003.820924 3085.211931 4039.169054
1.289150 1478.922632 2267.855178 3959.324372 4994.310648
1.295400 1471.869564 2544.514170 3997.095719 4832.824911
1.301650 1384.352532 2426.134503 3741.054484 4701.626035
1.307900 1229.250786 2442.243667 3885.217173 4978.528791
1.314150 673.763308 1871.087050 2611.508837 4084.589182
1.320400 832.629412 1926.124306 2759.111076 4160.392198
1.326650 790.088258 1960.312289 3287.503506 3916.303674
1.332900 1759.031691 2427.229513 3862.166398 4876.945996
1.339150 1828.178095 2661.152946 3968.323442 4985.048154
1.345400 519.614780 1923.238907 3001.716148 4123.470927
1.351650 1815.898814 2471.282844 3771.975868 4905.389218
1.357900 1843.491470 2549.265162 3848.239706 4885.512273
1.364150 1956.144374 2654.814719 4567.261512 4581.410999

45
praat_data/14finfo.txt Normal file
View File

@ -0,0 +1,45 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
1.370400 340.554842 1913.699306 2586.114294 4155.129285
1.376650 332.370963 1876.023181 2503.659298 3798.293574
1.382900 325.174372 1864.201248 2481.055258 3719.401141
1.389150 324.227331 1855.700882 2458.029897 3588.124101
1.395400 321.096106 1868.114136 2423.581246 3434.389426
1.401650 321.311204 1863.542985 2412.538433 3432.882166
1.407900 315.498972 1860.123381 2406.885176 3412.300295
1.414150 311.205043 1841.902828 2413.503808 3417.220075
1.420400 309.007608 1832.799411 2397.985664 3422.810659
1.426650 306.006112 1826.522960 2384.971977 3404.017294
1.432900 311.473114 1812.199243 2373.112245 3404.716157
1.439150 314.904745 1800.260632 2355.584174 3396.013499
1.445400 305.439285 1786.504066 2355.522967 3372.330495
1.451650 307.190717 1764.609068 2341.911299 3374.494561
1.457900 309.469440 1742.607377 2342.302944 3362.580159
1.464150 309.623161 1700.287483 2351.051282 3364.958917
1.470400 307.403925 1663.895146 2344.793015 3378.613504
1.476650 313.404514 1657.268239 2349.528442 3376.755130
1.482900 314.263692 1642.268565 2350.713843 3387.816697
1.489150 315.645482 1591.636196 2341.581224 3388.796912
1.495400 302.350742 1448.781613 2345.077212 3383.109967
1.501650 292.979981 1435.500006 2359.769787 3404.852244
1.507900 296.121270 1394.806698 2367.092466 3368.853125
1.514150 291.849821 1343.879965 2373.644887 3381.101593
1.520400 290.882979 1308.933500 2370.167500 3386.968734
1.526650 297.605559 1300.383445 2378.616623 3383.809680
1.532900 284.560958 1249.678340 2380.046866 3404.402042
1.539150 283.955184 1222.614048 2381.325159 3399.561200
1.545400 285.185762 1198.995931 2408.426846 3393.684423
1.551650 289.937759 1180.634241 2403.890850 3406.798539
1.557900 303.933642 1169.084143 2401.278049 3401.014631
1.564150 294.411381 1106.176458 2416.551526 3406.842590
1.570400 284.099299 1081.417632 2437.116815 3435.668717
1.576650 284.699331 1069.750436 2435.242932 3426.599098
1.582900 293.016230 1081.699032 2445.796976 3433.737288
1.589150 305.606060 1102.530254 2473.235588 3422.273001
1.595400 311.620456 1119.975416 2501.228626 3418.458646
1.601650 310.319466 1119.998757 2486.789184 3437.001665
1.607900 314.114160 1142.861598 2489.399157 3438.635264
1.614150 317.604748 1118.202210 2468.968348 3526.660578
1.620400 327.507710 1141.735573 2465.432724 3584.423058
1.626650 333.377846 1183.606569 2451.854895 3598.015631
1.632900 334.576127 1130.205053 2493.381442 3629.587293
1.639150 376.264527 1193.293173 2504.641155 3671.674065

20
praat_data/14pinfo.txt Normal file
View File

@ -0,0 +1,20 @@
Time_s F0_Hz
1.369150 111.356107
1.384150 107.069829
1.399150 103.359211
1.414150 101.294898
1.429150 101.033783
1.444150 100.338339
1.459150 99.543903
1.474150 99.328222
1.489150 99.114590
1.504150 98.933082
1.519150 99.333365
1.534150 99.635722
1.549150 100.042926
1.564150 100.091191
1.579150 99.970936
1.594150 99.688190
1.609150 99.714266
1.624150 99.107616
1.639150 98.174758

8
praat_data/16finfo.txt Normal file
View File

@ -0,0 +1,8 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
1.876650 349.057617 1685.948122 2320.344913 3523.280355
1.882900 328.821593 1652.221577 2243.903120 3381.454551
1.889150 348.763086 1620.350870 2188.493780 3404.238330
1.895400 350.308392 1596.602533 2130.222751 3457.787675
1.901650 346.583338 1539.983383 2082.018981 3447.609458
1.907900 1595.104156 1843.116561 3381.050815 5217.427389
1.914150 1017.899678 1565.296980 3116.779165 --undefined--

4
praat_data/16pinfo.txt Normal file
View File

@ -0,0 +1,4 @@
Time_s F0_Hz
1.879150 --undefined--
1.894150 102.144106
1.909150 98.520565

12
praat_data/17finfo.txt Normal file
View File

@ -0,0 +1,12 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
1.920400 347.840660 1442.430205 2305.869397 3498.338530
1.926650 379.375429 1429.883163 2297.560369 3682.605332
1.932900 407.738012 1500.441156 2122.206489 3807.024662
1.939150 384.666879 1549.990438 1887.528310 3374.872627
1.945400 377.556709 1569.909672 1868.898135 3344.095679
1.951650 387.014600 1600.356731 1907.567969 3529.248508
1.957900 385.895857 1642.427471 1968.669867 3535.808302
1.964150 383.395690 1698.022103 2112.927417 3345.065499
1.970400 383.843898 1750.946540 2249.104191 3428.508588
1.976650 375.969572 1795.876574 2310.975336 3474.999849
1.982900 372.514365 1854.441668 2450.996146 3489.842865

6
praat_data/17pinfo.txt Normal file
View File

@ -0,0 +1,6 @@
Time_s F0_Hz
1.924150 96.926104
1.939150 98.731804
1.954150 98.960087
1.969150 98.165212
1.984150 95.814807

27
praat_data/18finfo.txt Normal file
View File

@ -0,0 +1,27 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
1.995400 361.940773 1940.073513 2546.864708 3449.384949
2.001650 355.970070 1976.263999 2598.668502 3441.761069
2.007900 345.696589 2025.774336 2641.422657 3442.863960
2.014150 343.066816 2085.155225 2700.742071 3404.838642
2.020400 333.059472 2112.306938 2708.370085 3400.547462
2.026650 336.305141 2150.438912 2704.580716 3439.025820
2.032900 329.433439 2162.430025 2730.108811 3535.415541
2.039150 333.502488 2182.805905 2736.906103 3609.164084
2.045400 326.854166 2197.917891 2750.483982 3674.968356
2.051650 326.318782 2242.504673 2724.349728 3721.546127
2.057900 318.476535 2242.856363 2742.392650 3755.181218
2.064150 322.671792 2260.877089 2650.907029 3735.156797
2.070400 316.721134 2267.789513 2690.060882 3758.711451
2.076650 326.327984 2242.996076 2704.310115 3836.119416
2.082900 314.262541 2273.293027 2733.166258 3844.346358
2.089150 316.778255 2275.643227 2657.233247 3819.278659
2.095400 319.523243 2293.153677 2681.532152 3806.851847
2.101650 314.900018 2276.490287 2616.700421 3807.132200
2.107900 330.308120 2300.585015 2602.276722 3791.422504
2.114150 308.167615 2344.548632 2660.588099 3801.809544
2.120400 327.654708 2379.012233 2669.689398 3825.210476
2.126650 314.037425 2385.303380 2667.731728 3829.720938
2.132900 326.293305 2344.002478 2530.633977 3788.648526
2.139150 321.685162 2460.851347 2464.861892 3789.884092
2.145400 302.258533 2432.619336 2604.848790 3825.016949
2.151650 324.560957 2337.833024 2678.768450 3776.364906

12
praat_data/18pinfo.txt Normal file
View File

@ -0,0 +1,12 @@
Time_s F0_Hz
1.999150 92.717439
2.014150 89.489088
2.029150 85.887123
2.044150 81.987950
2.059150 78.772604
2.074150 75.486839
2.089150 72.517554
2.104150 70.271341
2.119150 68.618495
2.134150 67.191833
2.149150 65.430924

6
praat_data/1info.txt Normal file
View File

@ -0,0 +1,6 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
0.026650 1036.790752 1868.665234 2725.379192 4178.671519
0.032900 974.049368 2166.652594 2513.477738 3996.721480
0.039150 968.877629 1917.468277 2717.911715 3972.350504
0.045400 935.417099 1775.998855 2752.419306 3934.497286
0.051650 827.430974 1786.853761 2772.403169 3999.818948

18
praat_data/2finfo.txt Normal file
View File

@ -0,0 +1,18 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
0.082900 528.635880 1755.907757 2453.680755 3783.712973
0.089150 563.542316 1530.886989 2519.622993 3757.625755
0.095400 573.121306 1664.309703 2466.776668 3782.671256
0.101650 586.481690 1744.463516 2536.943123 3678.937034
0.107900 622.730228 1747.393690 2534.228956 3622.572718
0.114150 627.933368 1741.683779 2557.870846 3599.397290
0.120400 627.865611 1716.746132 2555.446761 3579.504354
0.126650 634.023935 1702.222256 2568.237481 3603.177135
0.132900 631.691833 1696.571558 2583.351077 3617.265153
0.139150 634.222744 1679.528812 2591.258168 3624.039108
0.145400 631.357162 1671.385996 2589.643845 3622.741612
0.151650 625.523863 1653.805012 2580.192824 3629.283785
0.157900 623.676952 1631.078694 2575.284080 3580.950806
0.164150 613.531641 1625.726657 2575.650659 3681.354021
0.170400 607.513025 1651.643404 2621.544124 3936.947898
0.176650 577.151302 1650.472062 2646.680291 4018.878211
0.182900 535.047729 1663.500181 2628.233734 4197.342034

8
praat_data/2pinfo.txt Normal file
View File

@ -0,0 +1,8 @@
Time_s F0_Hz
0.094150 111.737456
0.109150 102.414846
0.124150 99.180456
0.139150 94.492349
0.154150 91.631772
0.169150 90.453390
0.184150 89.272645

22
praat_data/3finfo.txt Normal file
View File

@ -0,0 +1,22 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
0.195400 432.529257 1638.407554 2594.257054 4249.934378
0.201650 663.876613 1601.202315 2701.285201 4186.900362
0.207900 805.036572 1889.358853 2810.007089 4129.921366
0.214150 946.381242 1857.988083 2777.248077 4132.311713
0.220400 903.866929 1913.461356 2752.874317 4133.027357
0.226650 836.625412 1788.879430 2674.583649 4147.240675
0.232900 981.165439 1808.319510 2907.907611 4364.812288
0.239150 1249.491045 1941.373711 2771.928909 4363.100719
0.245400 1218.771388 1728.119616 2650.537352 4326.825186
0.251650 1452.056609 2700.808246 4312.352433 5287.631787
0.257900 1493.345224 2686.959014 4288.672983 5265.523239
0.264150 1304.231036 1438.414731 2702.279164 4359.890014
0.270400 1481.682469 2516.501327 4029.340386 4881.932034
0.276650 1561.501338 2571.742666 4057.061386 4982.649051
0.282900 1625.059954 2589.690772 3830.159178 4983.329712
0.289150 1713.487502 2665.058185 4076.451159 5138.213822
0.295400 1386.120848 1838.756605 2705.515292 4296.363091
0.301650 1163.177919 2172.672983 2882.942015 4289.359500
0.307900 1279.168793 2365.294053 3750.826093 5231.092582
0.314150 1335.029062 2325.420128 3654.525009 4929.566494
0.320400 1281.060252 2345.164494 3829.782058 5370.069242

7
praat_data/5finfo.txt Normal file
View File

@ -0,0 +1,7 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
0.382900 1079.448335 2144.779522 3001.860863 4232.935230
0.389150 1100.862480 2306.429186 2714.864098 4309.563614
0.395400 1546.699631 2560.604357 4115.079522 5046.942636
0.401650 1497.545466 2571.292749 3816.164900 4847.873788
0.407900 1639.650602 2596.381917 3819.480884 4859.331312
0.414150 1569.853057 2578.299405 3899.354366 4905.738895

16
praat_data/6finfo.txt Normal file
View File

@ -0,0 +1,16 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
0.426650 381.328078 1863.719858 2589.465435 3878.215304
0.432900 381.768525 1876.127050 2564.804996 3723.552540
0.439150 384.518952 1894.128164 2532.535970 3434.014541
0.445400 388.658013 1927.898488 2532.746280 3562.660621
0.451650 390.997225 1979.943666 2558.325052 3432.898412
0.457900 391.360161 1992.040401 2551.616361 3357.988064
0.464150 393.969984 2009.050868 2555.203059 3406.401634
0.470400 406.067471 2037.129094 2565.363522 3455.471295
0.476650 417.348746 2085.053395 2592.676506 3514.994811
0.482900 421.680628 2117.218222 2599.248674 3517.328552
0.489150 423.383441 2137.549804 2582.121828 3483.931345
0.495400 421.669029 2166.888660 2549.609051 3448.950251
0.501650 418.204874 2181.798096 2520.782506 3435.788800
0.507900 412.613430 2204.261868 2479.922217 3432.456738
0.514150 405.907821 2215.344471 2450.042926 3395.476557

8
praat_data/6pinfo.txt Normal file
View File

@ -0,0 +1,8 @@
Time_s F0_Hz
0.424150 128.194230
0.439150 127.354158
0.454150 127.487028
0.469150 128.996038
0.484150 130.824527
0.499150 132.284378
0.514150 132.522110

18
praat_data/7finfo.txt Normal file
View File

@ -0,0 +1,18 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
0.526650 394.372770 1660.312821 2467.334865 3222.158014
0.532900 388.215270 1490.481650 2482.989134 3321.200403
0.539150 402.574335 1604.143899 2535.750734 3559.679055
0.545400 404.609309 1615.519597 2565.688050 3732.708061
0.551650 394.260601 1631.535657 2641.894211 3821.456156
0.557900 394.414659 1621.205957 2648.265225 3320.126859
0.564150 397.671461 1618.731123 2663.832246 2903.432497
0.570400 405.327669 1716.667382 2237.272726 2765.258763
0.576650 414.976161 1695.593561 2760.117852 3623.906017
0.582900 412.171735 1616.192420 2749.757084 4121.737479
0.589150 413.700398 1620.653246 2712.215792 4792.225076
0.595400 405.760555 1469.092448 2677.155283 2913.457453
0.601650 409.778051 1572.511222 2741.967306 4648.353092
0.607900 403.914585 1574.351413 2727.677200 4241.465876
0.614150 409.929706 1604.583491 2622.701891 2823.334548
0.620400 420.506631 1550.958563 2667.400363 4450.108109
0.626650 444.829742 1477.050515 2580.483499 4054.629526

8
praat_data/7pinfo.txt Normal file
View File

@ -0,0 +1,8 @@
Time_s F0_Hz
0.529150 133.962288
0.544150 140.355170
0.559150 144.431256
0.574150 147.031184
0.589150 147.802608
0.604150 146.685037
0.619150 144.091543

12
praat_data/8finfo.txt Normal file
View File

@ -0,0 +1,12 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
0.632900 533.259460 1517.607124 2679.217241 4088.598001
0.639150 503.580010 870.620008 2715.612045 4085.722945
0.645400 478.947521 768.344429 2726.002468 4091.824143
0.651650 458.203654 730.411258 2722.216995 3244.855998
0.657900 443.810927 769.325414 2772.134905 3683.588318
0.664150 421.265828 755.241206 2737.341134 3925.689226
0.670400 397.472958 723.773247 2687.084050 3541.046689
0.676650 393.276011 690.339737 2609.877656 3425.704907
0.682900 416.022095 630.780496 2434.182680 3227.044888
0.689150 440.628007 850.083506 2006.502694 3044.345315
0.695400 492.424139 1547.305133 2946.027474 4296.187948

6
praat_data/8pinfo.txt Normal file
View File

@ -0,0 +1,6 @@
Time_s F0_Hz
0.634150 140.218043
0.649150 134.786222
0.664150 128.593749
0.679150 121.129006
0.694150 112.215482

11
praat_data/9finfo.txt Normal file
View File

@ -0,0 +1,11 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
0.701650 503.131967 1639.557433 2957.642898 4210.696619
0.707900 428.854794 1406.082803 2874.045690 4336.301822
0.714150 406.191744 1320.770051 2828.221170 4390.135876
0.720400 390.076214 1335.431633 2764.833284 4215.729535
0.726650 376.224595 1516.771978 2601.430983 3759.746768
0.732900 405.736138 1727.848604 2279.711982 3603.717276
0.739150 420.478467 1882.901081 2266.681963 3549.966507
0.745400 456.515535 1879.264237 3299.578538 4262.305082
0.751650 485.638159 1599.476634 2878.735328 4087.221464
0.757900 435.200717 1708.938149 2910.306704 4104.284006

5
praat_data/9pinfo.txt Normal file
View File

@ -0,0 +1,5 @@
Time_s F0_Hz
0.709150 103.521776
0.724150 97.856668
0.739150 96.440780
0.754150 95.499326

350
praat_data/infoFormants.txt Normal file
View File

@ -0,0 +1,350 @@
Time_s F1_Hz F2_Hz F3_Hz F4_Hz
0.026650 1036.790752 1868.665234 2725.379192 4178.671519
0.032900 974.049368 2166.652594 2513.477738 3996.721480
0.039150 968.877629 1917.468277 2717.911715 3972.350504
0.045400 935.417099 1775.998855 2752.419306 3934.497286
0.051650 827.430974 1786.853761 2772.403169 3999.818948
0.057900 679.040060 1837.144758 2635.102613 3874.425936
0.064150 510.757882 1852.270429 2507.659956 3832.545081
0.070400 472.272368 1876.142993 2464.406771 3848.156842
0.076650 486.476541 1842.074181 2453.295445 3816.914848
0.082900 528.635880 1755.907757 2453.680755 3783.712973
0.089150 563.542316 1530.886989 2519.622993 3757.625755
0.095400 573.121306 1664.309703 2466.776668 3782.671256
0.101650 586.481690 1744.463516 2536.943123 3678.937034
0.107900 622.730228 1747.393690 2534.228956 3622.572718
0.114150 627.933368 1741.683779 2557.870846 3599.397290
0.120400 627.865611 1716.746132 2555.446761 3579.504354
0.126650 634.023935 1702.222256 2568.237481 3603.177135
0.132900 631.691833 1696.571558 2583.351077 3617.265153
0.139150 634.222744 1679.528812 2591.258168 3624.039108
0.145400 631.357162 1671.385996 2589.643845 3622.741612
0.151650 625.523863 1653.805012 2580.192824 3629.283785
0.157900 623.676952 1631.078694 2575.284080 3580.950806
0.164150 613.531641 1625.726657 2575.650659 3681.354021
0.170400 607.513025 1651.643404 2621.544124 3936.947898
0.176650 577.151302 1650.472062 2646.680291 4018.878211
0.182900 535.047729 1663.500181 2628.233734 4197.342034
0.189150 485.556124 1656.386471 2584.004851 4236.414613
0.195400 432.529257 1638.407554 2594.257054 4249.934378
0.201650 663.876613 1601.202315 2701.285201 4186.900362
0.207900 805.036572 1889.358853 2810.007089 4129.921366
0.214150 946.381242 1857.988083 2777.248077 4132.311713
0.220400 903.866929 1913.461356 2752.874317 4133.027357
0.226650 836.625412 1788.879430 2674.583649 4147.240675
0.232900 981.165439 1808.319510 2907.907611 4364.812288
0.239150 1249.491045 1941.373711 2771.928909 4363.100719
0.245400 1218.771388 1728.119616 2650.537352 4326.825186
0.251650 1452.056609 2700.808246 4312.352433 5287.631787
0.257900 1493.345224 2686.959014 4288.672983 5265.523239
0.264150 1304.231036 1438.414731 2702.279164 4359.890014
0.270400 1481.682469 2516.501327 4029.340386 4881.932034
0.276650 1561.501338 2571.742666 4057.061386 4982.649051
0.282900 1625.059954 2589.690772 3830.159178 4983.329712
0.289150 1713.487502 2665.058185 4076.451159 5138.213822
0.295400 1386.120848 1838.756605 2705.515292 4296.363091
0.301650 1163.177919 2172.672983 2882.942015 4289.359500
0.307900 1279.168793 2365.294053 3750.826093 5231.092582
0.314150 1335.029062 2325.420128 3654.525009 4929.566494
0.320400 1281.060252 2345.164494 3829.782058 5370.069242
0.326650 1722.394090 2751.823940 3890.237390 5228.951510
0.332900 1665.966719 2558.974111 3685.332967 5214.757743
0.339150 1016.646192 2326.841064 3843.156585 --undefined--
0.345400 931.176390 1849.690891 2592.281116 3920.181963
0.351650 811.714960 1735.529336 2839.501398 4224.216811
0.357900 688.165502 1885.470485 2982.284968 4397.415378
0.364150 704.302848 2153.596134 3184.549391 4735.130194
0.370400 1197.503454 2715.838387 3952.198973 4830.117604
0.376650 908.647038 1993.180039 3021.937509 4225.075180
0.382900 1079.448335 2144.779522 3001.860863 4232.935230
0.389150 1100.862480 2306.429186 2714.864098 4309.563614
0.395400 1546.699631 2560.604357 4115.079522 5046.942636
0.401650 1497.545466 2571.292749 3816.164900 4847.873788
0.407900 1639.650602 2596.381917 3819.480884 4859.331312
0.414150 1569.853057 2578.299405 3899.354366 4905.738895
0.420400 367.554652 1884.860880 2643.818782 3910.260073
0.426650 381.328078 1863.719858 2589.465435 3878.215304
0.432900 381.768525 1876.127050 2564.804996 3723.552540
0.439150 384.518952 1894.128164 2532.535970 3434.014541
0.445400 388.658013 1927.898488 2532.746280 3562.660621
0.451650 390.997225 1979.943666 2558.325052 3432.898412
0.457900 391.360161 1992.040401 2551.616361 3357.988064
0.464150 393.969984 2009.050868 2555.203059 3406.401634
0.470400 406.067471 2037.129094 2565.363522 3455.471295
0.476650 417.348746 2085.053395 2592.676506 3514.994811
0.482900 421.680628 2117.218222 2599.248674 3517.328552
0.489150 423.383441 2137.549804 2582.121828 3483.931345
0.495400 421.669029 2166.888660 2549.609051 3448.950251
0.501650 418.204874 2181.798096 2520.782506 3435.788800
0.507900 412.613430 2204.261868 2479.922217 3432.456738
0.514150 405.907821 2215.344471 2450.042926 3395.476557
0.520400 399.601706 2050.718893 2438.104632 3231.296103
0.526650 394.372770 1660.312821 2467.334865 3222.158014
0.532900 388.215270 1490.481650 2482.989134 3321.200403
0.539150 402.574335 1604.143899 2535.750734 3559.679055
0.545400 404.609309 1615.519597 2565.688050 3732.708061
0.551650 394.260601 1631.535657 2641.894211 3821.456156
0.557900 394.414659 1621.205957 2648.265225 3320.126859
0.564150 397.671461 1618.731123 2663.832246 2903.432497
0.570400 405.327669 1716.667382 2237.272726 2765.258763
0.576650 414.976161 1695.593561 2760.117852 3623.906017
0.582900 412.171735 1616.192420 2749.757084 4121.737479
0.589150 413.700398 1620.653246 2712.215792 4792.225076
0.595400 405.760555 1469.092448 2677.155283 2913.457453
0.601650 409.778051 1572.511222 2741.967306 4648.353092
0.607900 403.914585 1574.351413 2727.677200 4241.465876
0.614150 409.929706 1604.583491 2622.701891 2823.334548
0.620400 420.506631 1550.958563 2667.400363 4450.108109
0.626650 444.829742 1477.050515 2580.483499 4054.629526
0.632900 533.259460 1517.607124 2679.217241 4088.598001
0.639150 503.580010 870.620008 2715.612045 4085.722945
0.645400 478.947521 768.344429 2726.002468 4091.824143
0.651650 458.203654 730.411258 2722.216995 3244.855998
0.657900 443.810927 769.325414 2772.134905 3683.588318
0.664150 421.265828 755.241206 2737.341134 3925.689226
0.670400 397.472958 723.773247 2687.084050 3541.046689
0.676650 393.276011 690.339737 2609.877656 3425.704907
0.682900 416.022095 630.780496 2434.182680 3227.044888
0.689150 440.628007 850.083506 2006.502694 3044.345315
0.695400 492.424139 1547.305133 2946.027474 4296.187948
0.701650 503.131967 1639.557433 2957.642898 4210.696619
0.707900 428.854794 1406.082803 2874.045690 4336.301822
0.714150 406.191744 1320.770051 2828.221170 4390.135876
0.720400 390.076214 1335.431633 2764.833284 4215.729535
0.726650 376.224595 1516.771978 2601.430983 3759.746768
0.732900 405.736138 1727.848604 2279.711982 3603.717276
0.739150 420.478467 1882.901081 2266.681963 3549.966507
0.745400 456.515535 1879.264237 3299.578538 4262.305082
0.751650 485.638159 1599.476634 2878.735328 4087.221464
0.757900 435.200717 1708.938149 2910.306704 4104.284006
0.764150 467.261076 1898.871571 2937.417524 4303.138219
0.770400 473.838120 1976.476015 2943.236377 4894.986952
0.776650 463.499297 565.423268 2661.611073 3077.680945
0.782900 475.963445 622.004661 2663.618605 3110.583247
0.789150 543.065399 554.739495 2682.958066 3119.463940
0.795400 589.017785 611.538961 2665.380736 3126.668212
0.801650 634.030333 669.996870 2659.239573 3123.774397
0.807900 623.230538 753.276509 2665.417846 3187.093200
0.814150 594.292510 834.962472 2651.115245 3211.991119
0.820400 624.663648 872.968547 2638.781941 3241.238161
0.826650 612.691750 928.737313 2631.696241 3269.092004
0.832900 625.194698 994.491938 2632.685439 3284.150896
0.839150 607.836646 1045.108842 2612.805165 3306.974801
0.845400 615.278930 1062.726200 2599.663173 3329.220114
0.851650 636.576244 1086.600395 2620.420010 3366.915831
0.857900 644.787655 1107.154136 2635.183513 3390.238997
0.864150 672.736919 1156.993024 2717.547364 3413.951917
0.870400 669.061549 1175.857408 2734.377458 3421.912067
0.876650 665.795305 1197.206271 2729.024133 3387.888239
0.882900 674.729514 1235.659484 2743.387511 3434.385425
0.889150 666.931663 1258.172153 2761.686180 3497.302691
0.895400 662.061867 1303.641313 2769.556694 3533.651904
0.901650 645.944305 1330.653301 2766.687092 3541.406159
0.907900 634.776595 1374.820538 2766.811613 3552.957028
0.914150 640.998121 1439.240242 2773.071748 3597.580596
0.920400 626.523139 1470.713011 2759.967510 3615.483760
0.926650 611.432148 1523.138290 2754.242254 3593.726226
0.932900 584.618495 1569.513582 2768.886483 3614.370531
0.939150 558.028076 1585.357271 2775.401594 3645.510014
0.945400 517.696912 1590.688088 2766.642249 3597.103757
0.951650 476.789393 1592.987327 2737.241607 3599.739538
0.957900 450.476442 1588.225542 2713.077446 3586.989034
0.964150 402.992634 1582.431260 2532.938248 3486.759317
0.970400 293.461649 1643.485138 2680.264692 3232.017385
0.976650 284.176209 1663.365773 2676.141540 3141.348772
0.982900 291.242035 1652.145613 2596.050169 3665.846093
0.989150 293.689298 1672.979620 2542.949229 4100.332985
0.995400 295.641845 1702.049095 2574.035844 4157.561733
1.001650 296.322717 1700.679389 2631.827033 4176.942898
1.007900 300.027291 1694.180819 2658.952054 4253.823448
1.014150 304.325494 1709.392547 2677.092924 4138.289841
1.020400 309.987038 1719.715892 2655.048590 4202.935469
1.026650 310.021564 1719.513385 2614.658402 4251.306857
1.032900 307.716778 1722.265119 2444.324752 4252.180373
1.039150 311.320334 1720.846108 2619.907627 4184.409708
1.045400 309.143110 1695.147537 2655.066263 4340.932422
1.051650 312.957465 1692.356540 2609.498175 4352.153408
1.057900 315.368749 1693.299953 2490.275129 4208.545832
1.064150 314.552532 1675.502662 2564.712264 4084.978576
1.070400 318.256662 1689.046665 2656.910715 4185.740830
1.076650 316.535131 1687.830715 2668.172305 4218.815741
1.082900 320.225288 1709.774399 2786.920474 4254.426770
1.089150 331.326733 1797.310625 2844.341432 4295.260719
1.095400 320.142127 1715.993627 2835.714453 4248.892687
1.101650 313.492011 1675.214829 2812.651937 4210.033274
1.107900 315.544042 1756.728755 2810.144166 4292.930243
1.114150 314.166210 1812.985746 2923.744129 4233.779236
1.120400 308.207935 1888.471874 2951.726531 4259.174691
1.126650 301.915048 1940.838156 2792.002803 4184.999344
1.132900 301.012621 2002.610285 2398.068031 3938.893350
1.139150 306.617134 1607.748709 2506.669634 3775.407715
1.145400 312.633999 1803.107315 2577.930579 3755.341550
1.151650 364.081815 1958.283946 2807.315330 3844.647170
1.157900 572.932470 1788.427734 2773.263677 3877.490685
1.164150 598.867385 1711.946830 2387.286126 3834.045811
1.170400 638.576295 1882.531654 3313.195137 4517.423124
1.176650 1058.430571 2054.881662 3389.141253 4548.244513
1.182900 1252.939650 2201.848920 3407.431305 4422.780372
1.189150 1321.706426 2446.919688 3596.109861 4326.564458
1.195400 1167.151081 2394.520999 3446.598556 4443.341898
1.201650 1345.694133 2517.659899 3179.327024 4487.820674
1.207900 1286.529237 2460.558492 3201.885939 4508.818799
1.214150 1276.877312 2348.031925 3350.893385 4417.723098
1.220400 1340.015612 2464.093653 3474.274979 4320.652454
1.226650 1240.631667 2395.967053 3379.604708 4571.545304
1.232900 1201.726049 2232.544877 3511.185657 4618.777351
1.239150 1161.186988 2245.851754 3621.016348 4643.502579
1.245400 1348.898590 2484.098641 3556.664567 4633.340122
1.251650 1225.757338 2478.852358 3737.166662 4718.249928
1.257900 1252.215077 2475.848476 3780.425433 4995.816945
1.264150 1206.157557 2554.534963 4117.056291 4898.728604
1.270400 1185.484870 2212.142172 2788.252711 4386.571482
1.276650 1300.434731 1836.489362 2797.551143 4219.775423
1.282900 1326.834084 2003.820924 3085.211931 4039.169054
1.289150 1478.922632 2267.855178 3959.324372 4994.310648
1.295400 1471.869564 2544.514170 3997.095719 4832.824911
1.301650 1384.352532 2426.134503 3741.054484 4701.626035
1.307900 1229.250786 2442.243667 3885.217173 4978.528791
1.314150 673.763308 1871.087050 2611.508837 4084.589182
1.320400 832.629412 1926.124306 2759.111076 4160.392198
1.326650 790.088258 1960.312289 3287.503506 3916.303674
1.332900 1759.031691 2427.229513 3862.166398 4876.945996
1.339150 1828.178095 2661.152946 3968.323442 4985.048154
1.345400 519.614780 1923.238907 3001.716148 4123.470927
1.351650 1815.898814 2471.282844 3771.975868 4905.389218
1.357900 1843.491470 2549.265162 3848.239706 4885.512273
1.364150 1956.144374 2654.814719 4567.261512 4581.410999
1.370400 340.554842 1913.699306 2586.114294 4155.129285
1.376650 332.370963 1876.023181 2503.659298 3798.293574
1.382900 325.174372 1864.201248 2481.055258 3719.401141
1.389150 324.227331 1855.700882 2458.029897 3588.124101
1.395400 321.096106 1868.114136 2423.581246 3434.389426
1.401650 321.311204 1863.542985 2412.538433 3432.882166
1.407900 315.498972 1860.123381 2406.885176 3412.300295
1.414150 311.205043 1841.902828 2413.503808 3417.220075
1.420400 309.007608 1832.799411 2397.985664 3422.810659
1.426650 306.006112 1826.522960 2384.971977 3404.017294
1.432900 311.473114 1812.199243 2373.112245 3404.716157
1.439150 314.904745 1800.260632 2355.584174 3396.013499
1.445400 305.439285 1786.504066 2355.522967 3372.330495
1.451650 307.190717 1764.609068 2341.911299 3374.494561
1.457900 309.469440 1742.607377 2342.302944 3362.580159
1.464150 309.623161 1700.287483 2351.051282 3364.958917
1.470400 307.403925 1663.895146 2344.793015 3378.613504
1.476650 313.404514 1657.268239 2349.528442 3376.755130
1.482900 314.263692 1642.268565 2350.713843 3387.816697
1.489150 315.645482 1591.636196 2341.581224 3388.796912
1.495400 302.350742 1448.781613 2345.077212 3383.109967
1.501650 292.979981 1435.500006 2359.769787 3404.852244
1.507900 296.121270 1394.806698 2367.092466 3368.853125
1.514150 291.849821 1343.879965 2373.644887 3381.101593
1.520400 290.882979 1308.933500 2370.167500 3386.968734
1.526650 297.605559 1300.383445 2378.616623 3383.809680
1.532900 284.560958 1249.678340 2380.046866 3404.402042
1.539150 283.955184 1222.614048 2381.325159 3399.561200
1.545400 285.185762 1198.995931 2408.426846 3393.684423
1.551650 289.937759 1180.634241 2403.890850 3406.798539
1.557900 303.933642 1169.084143 2401.278049 3401.014631
1.564150 294.411381 1106.176458 2416.551526 3406.842590
1.570400 284.099299 1081.417632 2437.116815 3435.668717
1.576650 284.699331 1069.750436 2435.242932 3426.599098
1.582900 293.016230 1081.699032 2445.796976 3433.737288
1.589150 305.606060 1102.530254 2473.235588 3422.273001
1.595400 311.620456 1119.975416 2501.228626 3418.458646
1.601650 310.319466 1119.998757 2486.789184 3437.001665
1.607900 314.114160 1142.861598 2489.399157 3438.635264
1.614150 317.604748 1118.202210 2468.968348 3526.660578
1.620400 327.507710 1141.735573 2465.432724 3584.423058
1.626650 333.377846 1183.606569 2451.854895 3598.015631
1.632900 334.576127 1130.205053 2493.381442 3629.587293
1.639150 376.264527 1193.293173 2504.641155 3671.674065
1.645400 369.267496 1207.537509 2536.211315 3725.674563
1.651650 123.758027 1201.914015 2677.133222 3963.112531
1.657900 1232.902232 1875.214621 3008.033660 4280.097317
1.664150 1306.520652 1871.293919 3017.053350 4241.668901
1.670400 1358.872920 2080.903711 2912.700630 4304.866972
1.676650 1567.071542 2709.701070 4310.775984 --undefined--
1.682900 1182.916599 1845.102130 3057.007058 4321.313445
1.689150 1090.210513 1889.819116 2988.428752 4337.957152
1.695400 400.456127 1816.986368 2680.975340 3996.891135
1.701650 420.486462 1823.011405 2717.203286 3711.140085
1.707900 563.367101 1834.151971 2720.641051 3480.785607
1.714150 639.934574 1806.067897 2803.764210 3866.248174
1.720400 656.032580 1781.526877 2774.650660 4007.878937
1.726650 1760.372709 2750.571611 4142.174784 4931.577952
1.732900 1659.115909 2603.950826 3950.162289 4943.474323
1.739150 1702.259535 2714.866174 4126.514758 5134.369192
1.745400 1574.523173 2668.168618 4023.095316 5326.698446
1.751650 1488.170411 2748.095603 3992.420982 5213.921072
1.757900 530.174566 1606.959820 2542.212572 3893.645342
1.764150 643.729848 1659.844867 2704.608769 3978.737016
1.770400 667.503111 1779.794129 3061.578369 4390.466053
1.776650 597.867253 1568.202782 2845.155518 3925.953365
1.782900 679.259825 1587.795579 2687.632703 3646.760177
1.789150 735.395973 1630.662301 2523.394589 3769.776724
1.795400 774.942426 1754.807754 2776.001111 3805.136392
1.801650 804.762942 1754.626735 2635.491368 3859.247398
1.807900 800.789031 1635.269231 2686.391284 3932.431897
1.814150 757.556238 1608.932958 2610.467918 3744.675655
1.820400 678.677585 1580.914297 2479.429310 3684.668382
1.826650 630.826574 1770.893614 2423.264735 3521.701630
1.832900 697.205782 1754.274025 2670.523073 3543.698545
1.839150 599.486989 1768.283349 2692.769006 3802.886559
1.845400 610.618638 1932.824426 2797.411145 4141.404337
1.851650 1634.424016 2683.334551 4051.510668 5104.328166
1.857900 1465.733937 2607.299251 3857.910373 5042.961169
1.864150 477.822895 1746.323469 2486.843300 3697.553715
1.870400 302.812284 1795.618789 2386.710394 3608.336907
1.876650 349.057617 1685.948122 2320.344913 3523.280355
1.882900 328.821593 1652.221577 2243.903120 3381.454551
1.889150 348.763086 1620.350870 2188.493780 3404.238330
1.895400 350.308392 1596.602533 2130.222751 3457.787675
1.901650 346.583338 1539.983383 2082.018981 3447.609458
1.907900 1595.104156 1843.116561 3381.050815 5217.427389
1.914150 1017.899678 1565.296980 3116.779165 --undefined--
1.920400 347.840660 1442.430205 2305.869397 3498.338530
1.926650 379.375429 1429.883163 2297.560369 3682.605332
1.932900 407.738012 1500.441156 2122.206489 3807.024662
1.939150 384.666879 1549.990438 1887.528310 3374.872627
1.945400 377.556709 1569.909672 1868.898135 3344.095679
1.951650 387.014600 1600.356731 1907.567969 3529.248508
1.957900 385.895857 1642.427471 1968.669867 3535.808302
1.964150 383.395690 1698.022103 2112.927417 3345.065499
1.970400 383.843898 1750.946540 2249.104191 3428.508588
1.976650 375.969572 1795.876574 2310.975336 3474.999849
1.982900 372.514365 1854.441668 2450.996146 3489.842865
1.989150 364.158266 1883.175875 2490.212396 3481.391119
1.995400 361.940773 1940.073513 2546.864708 3449.384949
2.001650 355.970070 1976.263999 2598.668502 3441.761069
2.007900 345.696589 2025.774336 2641.422657 3442.863960
2.014150 343.066816 2085.155225 2700.742071 3404.838642
2.020400 333.059472 2112.306938 2708.370085 3400.547462
2.026650 336.305141 2150.438912 2704.580716 3439.025820
2.032900 329.433439 2162.430025 2730.108811 3535.415541
2.039150 333.502488 2182.805905 2736.906103 3609.164084
2.045400 326.854166 2197.917891 2750.483982 3674.968356
2.051650 326.318782 2242.504673 2724.349728 3721.546127
2.057900 318.476535 2242.856363 2742.392650 3755.181218
2.064150 322.671792 2260.877089 2650.907029 3735.156797
2.070400 316.721134 2267.789513 2690.060882 3758.711451
2.076650 326.327984 2242.996076 2704.310115 3836.119416
2.082900 314.262541 2273.293027 2733.166258 3844.346358
2.089150 316.778255 2275.643227 2657.233247 3819.278659
2.095400 319.523243 2293.153677 2681.532152 3806.851847
2.101650 314.900018 2276.490287 2616.700421 3807.132200
2.107900 330.308120 2300.585015 2602.276722 3791.422504
2.114150 308.167615 2344.548632 2660.588099 3801.809544
2.120400 327.654708 2379.012233 2669.689398 3825.210476
2.126650 314.037425 2385.303380 2667.731728 3829.720938
2.132900 326.293305 2344.002478 2530.633977 3788.648526
2.139150 321.685162 2460.851347 2464.861892 3789.884092
2.145400 302.258533 2432.619336 2604.848790 3825.016949
2.151650 324.560957 2337.833024 2678.768450 3776.364906
2.157900 322.595090 2205.076698 2605.939255 3771.185645
2.164150 364.563625 1913.813370 2616.796600 3776.412787
2.170400 361.730735 2426.268612 2550.610047 3768.333911
2.176650 332.381922 2236.219619 2639.560721 3768.386362
2.182900 329.196119 2384.048984 2678.182556 3843.893884
2.189150 331.505397 2410.549525 2650.235684 3840.871644
2.195400 297.146996 2468.226337 2646.145390 3936.541184
2.201650 367.329516 2497.564524 2583.270573 4106.510515

146
praat_data/infoPitch.txt Normal file
View File

@ -0,0 +1,146 @@
Time_s F0_Hz
0.034150 --undefined--
0.049150 --undefined--
0.064150 122.590951
0.079150 121.999012
0.094150 111.737456
0.109150 102.414846
0.124150 99.180456
0.139150 94.492349
0.154150 91.631772
0.169150 90.453390
0.184150 89.272645
0.199150 --undefined--
0.214150 --undefined--
0.229150 --undefined--
0.244150 --undefined--
0.259150 --undefined--
0.274150 --undefined--
0.289150 --undefined--
0.304150 --undefined--
0.319150 --undefined--
0.334150 --undefined--
0.349150 --undefined--
0.364150 --undefined--
0.379150 --undefined--
0.394150 --undefined--
0.409150 --undefined--
0.424150 128.194230
0.439150 127.354158
0.454150 127.487028
0.469150 128.996038
0.484150 130.824527
0.499150 132.284378
0.514150 132.522110
0.529150 133.962288
0.544150 140.355170
0.559150 144.431256
0.574150 147.031184
0.589150 147.802608
0.604150 146.685037
0.619150 144.091543
0.634150 140.218043
0.649150 134.786222
0.664150 128.593749
0.679150 121.129006
0.694150 112.215482
0.709150 103.521776
0.724150 97.856668
0.739150 96.440780
0.754150 95.499326
0.769150 96.330162
0.784150 98.253350
0.799150 97.552709
0.814150 95.835712
0.829150 95.258914
0.844150 95.298879
0.859150 95.676025
0.874150 95.792589
0.889150 97.046504
0.904150 99.624471
0.919150 102.763937
0.934150 105.520861
0.949150 107.363205
0.964150 109.092015
0.979150 115.478127
0.994150 117.629430
1.009150 118.622549
1.024150 119.530397
1.039150 120.615663
1.054150 121.304736
1.069150 121.001508
1.084150 119.755923
1.099150 118.967399
1.114150 118.398594
1.129150 117.612365
1.144150 --undefined--
1.159150 --undefined--
1.174150 --undefined--
1.189150 --undefined--
1.204150 --undefined--
1.219150 --undefined--
1.234150 --undefined--
1.249150 --undefined--
1.264150 --undefined--
1.279150 --undefined--
1.294150 --undefined--
1.309150 --undefined--
1.324150 --undefined--
1.339150 --undefined--
1.354150 --undefined--
1.369150 111.356107
1.384150 107.069829
1.399150 103.359211
1.414150 101.294898
1.429150 101.033783
1.444150 100.338339
1.459150 99.543903
1.474150 99.328222
1.489150 99.114590
1.504150 98.933082
1.519150 99.333365
1.534150 99.635722
1.549150 100.042926
1.564150 100.091191
1.579150 99.970936
1.594150 99.688190
1.609150 99.714266
1.624150 99.107616
1.639150 98.174758
1.654150 --undefined--
1.669150 --undefined--
1.684150 --undefined--
1.699150 --undefined--
1.714150 --undefined--
1.729150 --undefined--
1.744150 --undefined--
1.759150 --undefined--
1.774150 --undefined--
1.789150 --undefined--
1.804150 --undefined--
1.819150 --undefined--
1.834150 --undefined--
1.849150 --undefined--
1.864150 --undefined--
1.879150 --undefined--
1.894150 102.144106
1.909150 98.520565
1.924150 96.926104
1.939150 98.731804
1.954150 98.960087
1.969150 98.165212
1.984150 95.814807
1.999150 92.717439
2.014150 89.489088
2.029150 85.887123
2.044150 81.987950
2.059150 78.772604
2.074150 75.486839
2.089150 72.517554
2.104150 70.271341
2.119150 68.618495
2.134150 67.191833
2.149150 65.430924
2.164150 --undefined--
2.179150 --undefined--
2.194150 --undefined--

105
record_vocoder.m Normal file
View File

@ -0,0 +1,105 @@
function record_vocoder()
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Task: To apply a vocoder on a recorded signal.
%
% Inputs: -
%
% Outputs: -
%
%
% Author: Improved using
% vocoder.m
% code by : Guillaume Gibert - guillaume.gibert@ecam.fr
%
% Modified by : Charles Stelandre - charles.stelandre@ecam.fr
%
% Date: 04/05/2025
%
% Notes : This code records an audio and applies a vocoder on this
% recording. Also plots the temporal plots and spectrograms. Problems
% occured to use the record() functions. An alternative involved using the
% recorder object.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all
clc
duration = 3; % Recording duration in seconds
sr = 22050; % Sample rate (Hz)
nb_bands = 16;
overlap = 0.1;
numChannels = 1; % Mono recording
disp('Press any key to start recording for 3 seconds...');
pause;
% Create an audiorecorder object
recorder = audiorecorder(sr, nb_bands, numChannels);
disp('Recording...');
record(recorder, duration); % Start recording for the specified duration
pause(duration + 0.5); % Wait for the recording to finish (with a buffer)
disp('Recording finished!');
% Get the recorded audio data
modulator = getaudiodata(recorder);
sound(modulator,sr)
pause(duration);
% Remove the first tenth of a second
%modulator(1:floor(sr/10)) = [];
% Load carrier signal
carfile = 'sound/white_periodic.wav';
[carrier, sr2] = audioread(carfile);
if sr~=sr2, disp('your sampling rates dont match'); end
% Apply channel vocoder
nb_channels = floor(sr/15);
disp('Computing channel vocoder...');
robotic_voice = chanvocoder(carrier, modulator, nb_channels, nb_bands, overlap);
% Display time domain plots
figure;
subplot(2,1,1);
plot(robotic_voice);
title('Vocoded Sound');
xlabel('Time (samples)');
ylabel('Amplitude');
subplot(2,1,2);
plot(modulator);
title('Recorded Sound (Modulator)');
xlabel('Time (samples)');
ylabel('Amplitude');
% Play the robotic voice
disp('Playing vocoder...');
sound(robotic_voice,sr)
%pause(duration*2);
% temporal plots
figure;
subplot(3,1,1);
plot(modulator);
title("modulator")
ylabel('Amplitude (a.u.)');
subplot(3,1,2);
plot(carrier);
title("carrier")
ylabel('Amplitude (a.u.)');
subplot(3,1,3);
plot(robotic_voice);
title("Robotic voice")
ylabel('Amplitude (a.u.)');
xlabel('Time (sample)');
% spectrogram plots
step_size = 5; % In ms
window_size = 30; %In ms
spectrogram(modulator, sr, step_size, window_size);
spectrogram(carrier, sr, step_size, window_size);
spectrogram(robotic_voice, sr, step_size, window_size);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -23,7 +23,8 @@ t=0:1/samplingFreq:length(signal)/samplingFreq-1/samplingFreq;
plot(t, signal');
xlim([0 length(signal)/samplingFreq-1/samplingFreq]);
ylabel('amplitude (norm. unit)');
subplot(2,1,2);
xlabel('time (s)');
title(sprintf('Time plot of modulator22.wav, step size = %d, window size = %d', step_size, window_size)); subplot(2,1,2);
step = fix(step_size*samplingFreq/1000); % one spectral slice every step_size ms
window = fix(window_size*samplingFreq/1000); % window_size ms data window
fftn = 2^nextpow2(window); % next highest power of 2
@ -36,3 +37,4 @@ imagesc (t, f, log(S)); % display in log scale
set (gca, "ydir", "normal"); % put the 'y' direction in the correct direction
xlabel('time (s)');
ylabel('frequency (Hz)');
title("Spectrogram of modulator22.wav")

View File

@ -1,14 +1,31 @@
function speech_analysis()
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Task: To analyse the temporal and frequency plots of a signal.
%
% Inputs: -
%
% Outputs: -
%
%
% Author: Charles Stelandre - charles.stelandre@ecam.fr
%
% Date: 09/04/2025
%
% Notes : This is the main file for the analysis of a signal. The main
% signal is modulator22.wav, which is present in the "sound" folder. Sound
% functions "sound()" are commented at then of the script.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all
clc
% Construct the full file path
filepath = './sound/modulator22.wav';
filename='modulator22.wav';
filepath = strcat('./sound/',filename);
% Read the audio file
[y, Fs] = audioread(filepath);
disp(['Successfully read the audio file: ', filepath]);
disp(['Successfully read the audio file: ', filename]);
disp(['Sampling frequency (Fs): ', num2str(Fs), ' Hz']);
disp(['Number of samples: ', num2str(length(y))]);
@ -22,7 +39,6 @@ disp(['Number of samples: ', num2str(length(y))]);
disp('Playing the audio with double the sampling rate.');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Plot
t = (0:length(y)-1) / Fs; % Time in seconds
@ -31,25 +47,39 @@ figure;
plot(t, y);
xlabel('Time (seconds)');
ylabel('Amplitude');
title(['Temporal Variation of ', filepath]);
title(['Temporal Variation of ', filename]);
grid on;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Frequency Spectrum
%FFT
tic;
[yFFT, FFT_Time]=frequencySpectrum(y,Fs, 1);
disp(FFT_Time);
disp("FFT duration :"); disp(FFT_Time);
%DFT
tic
[yDFT, DFT_Time]=frequencySpectrum(y,Fs, 0);
disp(DFT_Time);
disp("DFT duration :"); disp(DFT_Time);
%Modify the padding to make the change.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Spectrogram
%% Spectrogram (Step Size = 5, Window Size = 50)
spectrogram(y, Fs, 5,50)
title('Spectrogram of modulator22.wav');
colorbar;
ylabel('Frequency (Hz)');
xlabel('Time (s)');
%% Spectrogram (Step Size = 30, Window Size = 50)
spectrogram(y, Fs, 30,50)
colorbar;
ylabel('Frequency (Hz)');
xlabel('Time (s)');
%% Spectrogram (Step Size = 5, Window Size = 5)
spectrogram(y, Fs, 5,5)
colorbar;
ylabel('Frequency (Hz)');
xlabel('Time (s)');
%% Spectrogram (Step Size = 30, Window Size = 5)
spectrogram(y, Fs, 1,50)
colorbar;
ylabel('Frequency (Hz)');
xlabel('Time (s)');
@ -65,7 +95,8 @@ xlabel('Time (s)');
desiredFreq = 4000; %in Hz
% --- Downsampling using downsample() ---
downsample_factor_ds = round(Fs / desiredFreq);
downsample_factor_ds = round(Fs / desiredFreq); % Same result as = 6 for 4000Hz
%downsample_factor_ds=6;
y_downsampled_ds = downsample(y, downsample_factor_ds);
Fs_downsampled_ds = Fs / downsample_factor_ds;
disp(['--- Downsampling using downsample() ---']);
@ -73,13 +104,13 @@ disp(['New sampling frequency (downsample): ', num2str(Fs_downsampled_ds), ' Hz'
disp(['Number of samples (downsample): ', num2str(length(y_downsampled_ds))]);
% --- Downsampling using decimate() ---
downsample_factor_dec = round(Fs / desiredFreq);
downsample_factor_dec = round(Fs / desiredFreq); % Same result as = 6 for 4000Hz
%downsample_factor_dec=6;
y_decimated = decimate(y, downsample_factor_dec);
Fs_decimated = Fs / downsample_factor_dec;
disp(['--- Downsampling using decimate() ---']);
disp(['New sampling frequency (decimate): ', num2str(Fs_decimated), ' Hz']);
disp(['Number of samples (decimate): ', num2str(length(y_decimated))]);
%% --- Plotting Downsampled Signals ---
figure;
subplot(3,1,1);
@ -137,18 +168,20 @@ desiredFilterFreq = 1000;
%% --- Low-pass FIR filter ---
order_fir = 30;
normalized_cutoff_fir = desiredFilterFreq / (Fs / 2);
y_fir_coeffs = fir1(order_fir, normalized_cutoff_fir, 'low'); % 'low' specifies a low-pass filter
y_fir_filtered = filter(y_fir_coeffs, 1, y); % Apply the FIR filter
%y_fir_coeffs = fir1(order_fir, normalized_cutoff_fir, 'low'); % 'low' specifies a low-pass filter
b_fir = fir1(order_fir, normalized_cutoff_fir, 'low'); % 'low' specifies a low-pass filter
a_fir = 1;
y_fir_filtered = filter(b_fir, a_fir, y); % Apply the FIR filter
figure;
freqz(y_fir_coeffs, 1, 512, Fs); % Plot the frequency response of the FIR filter
freqz(b_fir,a_fir, 512, Fs); % Plot the frequency response of the FIR filter
title('Frequency Response of FIR Low-Pass Filter');
% FIR filter stability check (always stable)
disp('--- FIR Filter Stability ---');
disp('FIR filters designed using fir1 are inherently stable.');
% % FIR filter stability check (always stable)
% disp('--- FIR Filter Stability ---');
% disp('FIR filters designed using fir1 are inherently stable.');
% --- Low-pass IIR filter (Butterworth) ---
%% --- Low-pass IIR filter (Butterworth) ---
order_iir = 8;
normalized_cutoff_iir = desiredFilterFreq / (Fs / 2);
[b_iir, a_iir] = butter(order_iir, normalized_cutoff_iir, 'low'); % 'low' specifies a low-pass filter
@ -157,29 +190,30 @@ y_iir_filtered = filter(b_iir, a_iir, y); % Apply the IIR filter
figure;
freqz(b_iir, a_iir, 512, Fs); % Plot the frequency response of the IIR filter
title('Frequency Response of IIR (Butterworth) Low-Pass Filter');
%{
% IIR filter stability check
disp('--- IIR Filter (Butterworth) Stability ---');
poles_iir = roots(a_iir);
magnitudes_iir = abs(poles_iir);
if all(magnitudes_iir < 1)
disp('The IIR (Butterworth) filter is stable (all poles are inside the unit circle).');
else
disp('The IIR (Butterworth) filter is NOT stable (some poles are outside or on the unit circle).');
disp('Poles magnitudes:');
disp(magnitudes_iir);
end
%}
% % FIR and IIR filter stability check
% disp('--- IIR Filter (Butterworth) Stability ---');
% poles_iir = roots(a_iir);
% magnitudes_iir = abs(poles_iir);
% if all(magnitudes_iir < 1)
% disp('The IIR (Butterworth) filter is stable (all poles are inside the unit circle).');
% else
% disp('The IIR (Butterworth) filter is NOT stable (some poles are outside or on the unit circle).');
% disp('Poles magnitudes:');
% disp(magnitudes_iir);
% end
zeroPole(a_iir, b_iir,1);
zeroPole(a_fir, b_fir,1);
%% --- Downsampling after filtering ---
downsample_factor_filtered = round(Fs / desiredFreq);
Fs_ds_filtered = Fs / downsample_factor_filtered;
%{
y_ds_fir_filtered = downsample(y_fir_filtered, downsample_factor_filtered);
disp(['--- Downsampling FIR filtered signal using downsample() ---']);
disp(['New sampling frequency (FIR filtered, downsample): ', num2str(Fs_ds_filtered), ' Hz']);
disp(['Number of samples (FIR filtered, downsample): ', num2str(length(y_ds_fir_filtered))]);
%}
y_ds_iir_filtered = downsample(y_iir_filtered, downsample_factor_filtered);
disp(['--- Downsampling IIR filtered signal using downsample() ---']);
disp(['New sampling frequency (IIR filtered, downsample): ', num2str(Fs_ds_filtered), ' Hz']);

79
vocoder.m Normal file
View File

@ -0,0 +1,79 @@
function vocoder()
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Task: To create a vocoded version
%
% Inputs: -
%
% Outputs: -
%
%
% Author: Charles Stelandre - charles.stelandre@ecam.fr
%
% Date: 01/05/2025
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all
clc
modfile = './sound/modulator22.wav';
carfile = ['./sound/white_periodic.wav'];
%outfile = 'vocodedsound.wav'
[modul, sr1] = audioread(modfile);
[carrier, sr2] = audioread(carfile);
if sr1~=sr2, disp('your sampling rates dont match'); end
y = chanvocoder(carrier, modul, 512, 16, 0.1);
%audiowrite(outfile, y, sr1);
sr = sr1; % Assuming sampling rates are the same or we proceed with the modulator's rate
% --- Play the modulator sound ---
disp('Playing the modulator sound...');
sound(modul, sr);
pause(length(modul)/sr + 0.5); % Add a small pause
% --- Play the vocoded sound ---
disp('Playing the vocoded sound...');
sound(y, sr);
% audiowrite(outfile, y, sr);
% --- Plot Temporal Variations ---
t_modul = (0:length(modul)-1) / sr;
plot(t_modul, modul);
title('Temporal Variation of Modulator');
xlabel('Time (s)');
ylabel('Amplitude');
t_carrier = (0:length(carrier)-1) / sr;
plot(t_carrier, carrier);
title('Temporal Variation of Carrier');
xlabel('Time (s)');
ylabel('Amplitude');
t_output = (0:length(y)-1) / sr;
plot(t_output, y);
title('Temporal Variation of Vocoded Output');
xlabel('Time (s)');
ylabel('Amplitude');
window_size = 30; % Example window size (20ms)
step_size = 5; % Example step size (10ms overlap)
spectrogram(modul, sr, step_size, window_size);
title('Spectrogram of Modulator');
colorbar;
ylabel('Frequency (Hz)');
xlabel('Time (s)');
spectrogram(carrier, sr, step_size, window_size);
title('Spectrogram of Carrier');
colorbar;
ylabel('Frequency (Hz)');
xlabel('Time (s)');
spectrogram(y, sr, step_size, window_size);
title('Spectrogram of Vocoded Output');
colorbar;
ylabel('Frequency (Hz)');
xlabel('Time (s)');
end

66
zeroPole.m Normal file
View File

@ -0,0 +1,66 @@
function [Z, P] = zeroPole(a, b, plt)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function [Z, P] = zeroPole(a, b, plt)
% ex.: [Z, P] = zeroPole( [1 0 0.81], [1 0.5 -1], 1)
% ex.: [Z, P] = zeroPole( [1 -1.2 0.3], [0.1 0.0 0.0], 1)
%
% Task: To experiment with zeros and poles of filters
%
% Inputs:
% -a: vector of ak weights applied to previous outputs
% -b: vector of bm weights applied to previous inputs
% -plt: if different from 0, plot the zeros/poles
%
% Outputs:
%
%
% Author: Guillaume Gibert - guillaume.gibert@ecam.fr,
%
% - Minor adjustments :
% Charles Stelandre - charles.stelandre@ecam.fr
%
% Date: 09/04/2025
% - Revised on :
% 01/05/2025
%
% Notes : A small adjustment was made to detect whenever the FIR or the IIR
% is used. Additionally, the poles and zeros labels were adjusted to be
% displayed correctly in the complex z-plane.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% zeros of the filter
Z = roots(b);
% poles of the filter
P = roots(a);
isFIR = (length(a) == 1 && a == 1);
% Print filter type
if isFIR
disp('Detected FIR filter (no feedback, all poles at origin).');
else
disp('Detected IIR filter (feedback present).');
end
% Stability check for IIR
if ~isFIR
if all(abs(P) < 1)
disp('IIR filter is stable (all poles inside unit circle).');
else
warning('IIR filter is NOT stable (some poles are outside the unit circle).');
disp('Pole magnitudes:');
disp(abs(P));
end
end
if (plt)
figure;
zplane(Z, P);
title('Zeros and poles of the transfer function');
legend('Zeros', 'Poles');
grid on;
figure;
impz(b, a);
title('Impulse response');
xlabel('Samples (n)');
grid on;
end