From 58b8a2f8f3e8236babeddb340879e9f083e465d8 Mon Sep 17 00:00:00 2001 From: Charles STELANDRE Date: Sun, 4 May 2025 16:51:25 +0200 Subject: [PATCH] Update README. --- README.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 1c7307f..c4e7ab9 100644 --- a/README.md +++ b/README.md @@ -3,25 +3,25 @@ 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 -├── 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. +* **[`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 for [`computeFormants.m`](./computeFormants.m) and [`computePitch.m`](./computePitch.m). +* **[`sound/`](./sound/)**: This folder contains audio files in `.wav` used as input for the analysis and vocoder scripts like `modulator22.wav` used for [`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. +* **[`chanvocoder.m`](./chanvocoder.m)**: This function implements a channel vocoder, which modulates a carrier signal with the spectral envelope of a modulator signal. Copied directly from : https://sethares.engr.wisc.edu/vocoders/channelvocoder.html ```matlab function y = chanvocoder(carrier, modul, chan, numband, overlap) % y = chanvocoder(carrier, modul, chan, numband, overlap) @@ -51,7 +51,7 @@ This repository contains MATLAB scripts for various speech analysis and synthesi % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ``` -* **[`computePitch.m`](./computePitch.m)**: This script calculates the average pitch from a data file generated by Praat's pitch listing tool. +* **[`computePitch.m`](./computePitch.m)**: This script calculates the average pitch from `.txt` data file generated by Praat's pitch listing tool. ```matlab function computePitch(filename) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -89,11 +89,11 @@ This repository contains MATLAB scripts for various speech analysis and synthesi % - power: the power spectrum % % Author: Guillaume Gibert - guillaume.gibert@ecam.fr - % - Minor adjustments + % - Minor adjustments: % Charles Stelandre - charles.stelandre@ecam.fr % % Date: 25/04/2022 - % - Revised : 01/05/2025 + % - 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. @@ -213,7 +213,7 @@ This repository contains MATLAB scripts for various speech analysis and synthesi ## Usage -To use these scripts, ensure you have MATLAB installed. You will likely need to navigate to the repository directory within the MATLAB environment. +To use these scripts, ensure you have MATLAB installed. You will 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). @@ -224,15 +224,15 @@ To use these scripts, ensure you have MATLAB installed. You will likely need to * **[`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)`. +* **[`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, Fs, 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). +* **[`chanvocoder.m`](./chanvocoder.m)** : This is a function called, such as [`record_vocoder.m`](./record_vocoder.m) or **[`vocoder.m`](./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. +* **Date:** The scripts have been created and revised on various dates, with the latest revisions in 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.