Guide to lab computing

From Phonlab
Jump to navigationJump to search

Storage

All Lab workstations automatically mount shared disk space as the guest user. This shared space is often referred to as the PDrive since it is mounted as drive letter P: on Windows. Files on the PDrive are backed up nightly as part of the server backup.

Space on the PDrive is limited, and it's not a great location for large files that are part of your active workflow (e.g. video files straight from the camcorder that you are editing). Once you are done with your editing you might copy your compressed presentation files (e.g. .mpeg) to the PDrive.

If you want to back up some of these large files that are not on the PDrive you can use Amazon storage (AWS).

Notes on a preliminary exploration of Box.

Printing

The Lab printer is a Xerox Phaser 3250 and is located in room 50. Lab workstations are set up to print to this printer automatically. You can choose '2-sided' (default), '1-sided', or '2-sided 2-up' when you print. Follow the setup instructions if you would like to print from your own computer.

For troubleshooting see the printer manual.

The Berkeley Phonetics Machine

The Berkeley Phonetics Machine is a virtual machine with phonetic software preinstalled.

Sample scripts and snippets

  • get_dur -- a very simple script for reading label durations from a Praat textgrid
  • meas_formants -- a Python script for reading a Praat textgrid and performing formant analysis on vowel tokens
  • output formatting in Python -- a Python snippet for creating readable and maintainable output format and header strings in your scripts
  • ffmpeg reference -- a reference page describing scriptable ways to use ffmpeg for creating video stimuli

Tools and libraries

The tools and libraries listed here are available on the department server. Some may also be available for other platforms.

Local tools

  • ifcformant -- a command line tool for extracting formant measurements, as described in Ueda, Yuichi; Hamakawa, Tomoya; Sakata, Tadashi; Hario, Syota Hario; Watanabe, Akira (2007) A real-time formant tracker based on the inverse filter control method, Acoustical Science and Technology of the Acoustical Science of Japan 28(4), 271-4. We are grateful to Yuichi Ueda for providing the C code which implements the algorithm. The user interface is provided by a Python wrapper around the authors' C code and was written by Ronald Sprouse.

    Lab members can contact Ronald Sprouse for copies of ifcformant compiled for OS X, Windows, or Linux systems. Unfortunately we do not have permission to distribute the C code or compiled versions of this tool to the public.

    For detailed usage information, run: ifcformant --help
  • convertlabel -- a command line tool for converting between Praat textgrids, ESPS label files, and Wavesurfer label files. You can also scale or shift timepoints in the label file by a specified amount. Written by Ronald Sprouse.

    For detailed usage information, run: convertlabel --help
  • ultracomm -- a command line tool for configuring and acquiring ultrasound data from an Ultrasonix Tablet system.
  • ultrasession.py -- a Python script for running ultracomm and simultaneously acquiring audio and ultrasound synchronization signals.

Local libraries

  • audiolabel -- a Python library for reading and writing Praat textgrids, ESPS label files, Wavesurfer label files, and time-aligned tabular data. Special access methods for retrieving labels at specified times or by matching label content. Written by Ronald Sprouse, and available on [github]. See meas_formants for a sample script that uses this library. The audiolabel_demo walks you through many of the steps executed in meas_formants.
  • SoundLabel.pm -- a Perl library for reading and writing Praat textgrids, ESPS label files, and Wavesurfer label files, written by Ronald Sprouse. Old and clunky API. You are encouraged to write scripts that use audiolabel instead.

Handy third-party tools

  • pyalign -- a command line tool for automatically aligning phones to an audio file based on an orthographic transcription of the audio.

Running Matlab

This section describes various ways to run Matlab on the department server:

As a terminal-based application

To run matlab as a terminal-based application (also with no splash screen at startup), use:

matlab -nodesktop -nosplash

This runs the default matlab installation, Optionally, you can run a specific installed version:

/opt/matlab/2010a/bin/matlab -nodesktop -nosplash

As an X11 client

To run matlab as an X11 client:

Mathworks does not officially support running Matlab as an X11 client from a remote machine, and currently this technique works only for the 2010a version.

  1. Start up your local X Server.
  2. Connect to the server with X tunneling enabled.
    • For Windows, use putty. When connecting with putty, under 'Putty configuration', make sure to select SSH, X11, Enable X11 forwarding.
    • For Mac, connect using ssh's -X switch, e.g.
      ssh -X username@linguistics.berkeley.edu
  3. Check to make sure that X tunneling is enabled in your ssh session by checking the value of the $DISPLAY environment variable, which should return something like localhost:10.0. To check, give the command:
    echo $DISPLAY
  4. Run matlab:
    matlab
    Currently, the default matlab version isn't working correctly as an X11 client, and you may need to use the 2010a version, which still works:
    /opt/matlab/2010a/bin/matlab