Difference between revisions of "EGG-D800"

From Phonlab
Jump to navigationJump to search
Line 51: Line 51:
   
 
(rate, d) = scipy.io.wavfile.read(wav)
 
(rate, d) = scipy.io.wavfile.read(wav)
ch1 = d[0::2,0] # audio; even samples of first channel
+
audio = d[0::2,0] # even samples of first channel
ch2 = d[0::2,1] # lx; even samples of second channel
+
lx = d[0::2,1] # even samples of second channel
ch3 = d[1::2,0] # p2; odd samples of first channel
+
p2 = d[1::2,0] # odd samples of first channel
ch4 = d[1::2,1] # p1; even samples of second channel
+
p1 = d[1::2,1] # even samples of second channel
 
rate /= 2 # effective sample rate is half the original rate (one quarter of the EGG-D800's total rate)
 
rate /= 2 # effective sample rate is half the original rate (one quarter of the EGG-D800's total rate)

Revision as of 15:05, 3 February 2016

The Phonology Lab has an EGG-D800 electroglottograph from Laryngograph for performing EGG and aerodynamic studies. It has two pressure transducers to complement the microphone and EGG signals. Consult with Susan Lin for permission to use this system.


Data acquisition workflow

The standard way to acquire EGG and aerodynamic data is to run a configuration utility for the EGG-D800 and then record with any audio recording software. Postprocessing of the output file is required when aerodynamic channels are included in the recording.

At present the EGG-D800 is supported on Windows systems only.

Install and configure the EGG-D800

The first step is to install the EGG-D800 and configure it with the eggrec utility.

  1. Attach the EGG-D800 to the host Windows computer with a USB cable. It will automatically install as a USB Audio device.
  2. Audio and EGG signals are always acquired by the EGG-D800. If you also require aerodynamic signals, use the aero parameter to turn on the pressure transducers:
 eggrec --aero

Try eggrec --help for additional detail on how to use eggrec.

In our experience the EGG-D800 will automatically be installed as the default input audio device. If it is not the default it will be necessary to use the Windows mixer to make it the default, or you will have to select the EGG-D800 as the input device in your recording software.

Make a recording

Once the EGG-D800 has been configured you can make a recording with any audio recorder you wish. The important thing is to make sure the recording parameters match the data stream coming from the EGG-D800. Normally this means you should record two channels of 16-bit audio at 48,000 samples/sec. For example, to record with the sox alias rec:

 rec -c 2 -b 16 -r 48000 somefile.wav

This command creates a new file named somefile.wav with the correct format.

It is very important that you record in stereo and that the sample rate be half the EGG-D800's total data rate (its default total rate: 96,000 samples/sec).

Postprocessing

No postprocessing is necessary if you did not enable the aerodynamic channels of the EGG-D800. Your output .wav file contains two channels, with the microphone signal in the first (left) channel and the EGG signal in the second (right) channel. The sample rate for each channel is normally 48,000 samples/sec.

If the aerodynamic channels were enabled, then your output .wav file contains two channels, with the microphone signal interleaved with the P2 signal in the first (left) channel, and the EGG signal interleaved with the P1 signal in the second (right) channel. The audio/EGG signals are the even-numbered samples in their channels, and the aerodyanmic signals are the odd-numbered samples. The effective sample rate for each of the signals is normally 24,000 samples/sec.

Use the eggsep utility to separate each of the signals into separate files. This command separates somefile.wav into somefile.audio.wav, somefile.lx.wav, somefile.p1.wav, and somefile.p2.wav:

 eggsep somefile.wav

eggsep also has a seek mode that searches a directory tree for .wav files and attempts to separate the signals. By default it will not attempt to separate signals that have already been separated by eggsep. This means you can keep all your acquisitions in a single parent directory and safely run eggsep in seek mode in that directory after every acquisition session:

 eggsep --seek C:\myacqdir

And if you want to deinterleave the signals yourself in Python you can use numpy array indexing:

   import numpy as np
   import scipy.io.wavfile
   (rate, d) = scipy.io.wavfile.read(wav)
   audio = d[0::2,0] # even samples of first channel
   lx = d[0::2,1]    # even samples of second channel
   p2 = d[1::2,0]    # odd samples of first channel
   p1 = d[1::2,1]    # even samples of second channel
   rate /= 2         # effective sample rate is half the original rate (one quarter of the EGG-D800's total rate)