Difference between revisions of "Guide to lab computing"
From Phonlab
Jump to navigationJump to searchLine 4: | Line 4: | ||
* [[meas_formants]] -- a python script for reading a Praat textgrid and performing formant analysis on vowel tokens |
* [[meas_formants]] -- a python script for reading a Praat textgrid and performing formant analysis on vowel tokens |
||
− | |||
− | |||
− | <nowiki> |
||
− | #!/usr/bin/env python |
||
− | |||
− | # Measure formants. Read & input textgrids, call ifcformant on associated audio file, |
||
− | # and output measurements to a .meas file. |
||
− | |||
− | Usage = 'meas_formants speaker file1.TextGrid [file2.TextGrid] ... [fileN.TextGrid]' |
||
− | |||
− | import audiolabel |
||
− | import os, sys, subprocess |
||
− | import re |
||
− | import numpy as np |
||
− | |||
− | # Do minimal checking to ensure the script was called with appropriate |
||
− | # arguments. |
||
− | try: |
||
− | if not (sys.argv[1] == 'male&' & |
||
− | sys.argv[1] == 'female' or |
||
− | sys.argv[1] == 'child'): raise |
||
− | sys.argv[2] != None |
||
− | except: |
||
− | raise Exception('Usage: ' + Usage) |
||
− | </nowiki> |
Revision as of 11:37, 8 October 2013
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.
Sample scripts
- meas_formants -- a python script for reading a Praat textgrid and performing formant analysis on vowel tokens