Giter Site home page Giter Site logo

cminr-praatik's Introduction

CminR-Praatik

I wrote these Praat and R scripts for a doctoral seminar I teach at Université Paris Cité. My aim was to establish a consistent workflow to manually measure vowel formants.

Getting started

The easiest way to start with the programs is to use the demo files in the folder formantDemo :

Make sure Praat is installed on your computer

Download cp_formants.praatand the formantDemo folder

Edit list.txt and adapt the paths to your own directories

Run cp_formants.praat :

  • when prompted to load a file list, choose list.txt
  • when prompted to load the dictionary file, choose dico.txt
  • the annotion is on tier number 1 for this example
  • you should be able to see a GUI looking like this:

If you are a Praat user, the parameters in the GUI are self-explanatory. If the estimated formant tracks in red match the formants on the spectrogram, click Next. Otherwise, you can adjust the estimate by e.g. increasing or decreasing the maximum frequency (you can use the arrow keys on your keyboard to do this).

Output and analysis

For better results, your initial sound and TextGrid files should have consistent names with fields separated by underscores as in e.g. EN_spk01_reading.wav, FR_spk01_reading.wav, etc.

cp_formants.praat creates a folder called output that contains the estimated formant tracks.

When you run the R script cp_BuildTable.R you'll be prompted to load the list of formant files, then it'll split file names according to the underscores and ask you to provide generic names for the fields delimited by underscores. Say yes to the following 2 dialog boxes, and two new variables will be created in your R worskpace : dataList(a list object) and phonData, a dataframe containing formant values taken at temporal midpoint.

In order to make sure that everything went fine, type: head(phonData) and you should see the first lines of your dataframe. The R package phonR is a good option to analyze this dataframe.

The data in the dataList variable can be accessed as follows:

dataList[[1]]$data$F1Hz contains the F1 values for the 1st vowel in the dataset

dataList[[1]]$metadata$symbolASCII contains the symbol of the 1st vowel in the dataset

cminr-praatik's People

Contributors

emmanuelferragne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.