25/02/2020

Outline for today

  1. Purpose of group
  2. Our tools: Languages/software we will learn
  3. Examples of coding applications for speech
  4. Download R, RStudio, Praat
  5. Intro to RStudio
  6. Topics for the term

Purpose of this group

Purpose of this group

  • Develop skills that make it easier to do our job well as speech researchers
  • Create a community that comes together to make it easier to learn this stuff

Purpose of this group

Computer Coding: Writing something in a language a computer can understand in order to tell the computer to do a specific thing or set of things.

Why bother telling a computer what to do when we can just do it ourselves?

Purpose of this group

Why bother telling a computer what to do when we can just do it ourselves?

  • Automate repetitive tasks like…
    • opening/closing/saving files
  • Minimize human error in data preparation
    • Renaming things in a spreadsheet
  • Keep a careful log of how we did our analyses
    • Code = instructions
  • “Reproducible research”
  • Fun! (seriously!)

Our tools: Logistics

Project Website

Our tools: Languages & Software

First: Some terminology

Coding: Writing in a language a computer can understand

Scripting: A type of coding that tells a specific program exactly what actions to take

Programming: Writing code that serves to actually create another program (an app, software, etc)

Scripts: Text files containing code.

  • Scripting, coding, and programming are sometimes used interchangeably

First: Some terminology

Functions: A certain named format of code that outlines a procedure. Often this allows several lines of code to be executed with a single line of code (by using the name of the function)

  • For example, in Excel, you may use functions like =sum(2,2). sum() is the function that takes input (in this case, numbers), and performs an a specific action (adds them).

Calling: Invoke a function by using the name of the function and specifying parameters.

  • For example: I “call the sum function” when I type it out with its inputs and execute it in excel.

Our tools

  1. R and R Studio
  2. Praat

  • “R is a free software environment for statistical computing and graphics.”
  • Download here

Praat

  • “Doing phonetics by computer”: Praat is a powerful software program that also has its own specialized language for writing scripts
  • Praat = “Speech” in Dutch
  • Looks like it hasn’t been updated since 1995 but it has and it’s great
  • “World’s worst programming language”
    • don’t let the haters get you down
  • Download here

Examples of coding applications for speech research

1. Data preparation in

Example: Starbucks data

  1. Start with a data set you have in Excel
  2. “Read” it into R
  3. Do things to it like…
  • Instantly calculate means values

Let’s look together

1. Data preparation: Raw data