Skip to content

intensity track for previous/following phones #246

@seungsuklee

Description

@seungsuklee

I wanted to extract all syllable onset consonants between two vowels, and get the intensity contour for this VCV interval.

Since PolyglotDB doesn't seem to support more than one track for a queried list of phones, I decided to extract three tracks: one for the previous vowel, one for the consonant, and one for the following vowel, and merge these three tracks at a later step.

To do that, I did the following:

with CorpusContext(corpus_name) as c:
      q = c.query_graph(c.phone).filter( c.phone.label.not_in_(vowel_set),
                      c.phone.previous.subset == 'vowel',
                      c.phone.following.subset == 'vowel',
                      c.phone.begin == c.phone.syllable.begin
                  )
      q_onset = q.columns(
           ...
           c.phone.id.column.name('traj_id'),
           c.phone.label.column_name('onset'),
           c.phone.intensity.track.column_name('intensity')
      )
      q_onset.to_csv(...)

# to get the intensity track of the preceding vowel
with CorpusContext(corpus_name) as c:
      q = c.query_graph(c.phone).filter( c.phone.label.not_in_(vowel_set),
                      c.phone.previous.subset == 'vowel',
                      c.phone.following.subset == 'vowel',
                      c.phone.begin == c.phone.syllable.begin
                  )
      q_prev = q.columns(
            c.phone.id.column.name('traj_id'),
            c.phone.label.column_name('onset'),
            c.phone.previous.intensity.track.column_name('intensity_prev')
      )
      q_prev.to_csv(...)

# to get the intensity track of the preceding vowel
with CorpusContext(corpus_name) as c:
      q = c.query_graph(c.phone).filter( c.phone.label.not_in_(vowel_set),
                      c.phone.previous.subset == 'vowel',
                      c.phone.following.subset == 'vowel',
                      c.phone.begin == c.phone.syllable.begin
                  )
      # to get the intensity track of the following vowel  
      q_foll = q.columns(
            c.phone.id.column.name('traj_id'),
            c.phone.label.column_name('onset'),
            c.phone.following.intensity.track.column_name('intensity')
       )
      q_foll.to_csv(...)

However, once I ran this, to my surprise, the following vowel csv file contained intensity track of the <sil> token after the utterance that the queried consonant onset was in.
(There was no problem in the previous vowel csv though.)

To solve this issue, I just extracted the intensity contour of the entire syllable for onset consonants (and later took out the bits from the coda consonant for closed syllables), and the intensity contour of the preceding syllable.

It didn't seem very obvious to me why c.phone.following.intensity.track.column_name('intensity')
would extract intensity track of <sil>.
I'm posting the issue here as you may have a clear/easy answer.
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions