Skip to content
Permalink
Browse files

Update syllable_nuclei.py

  • Loading branch information...
drfeinberg committed Oct 8, 2019
1 parent e63abc9 commit 499aefb361abec341bcebd133699270d3d66f0d5
Showing with 4 additions and 3 deletions.
  1. +4 −3 syllable_nuclei.py
@@ -61,6 +61,7 @@



import math
import pandas as pd
import parselmouth

@@ -160,8 +161,8 @@ def speech_rate(filename):
querytime = validtime[time]
whichinterval = call(textgrid, "Get interval at time", 1, querytime)
whichlabel = call(textgrid, "Get label of interval", 1, whichinterval)
value = pitch.get_value_at_time(querytime) # this returns all NAN
if value != 'nan':
value = pitch.get_value_at_time(querytime)
if not math.isnan(value):
if whichlabel == "sounding":
voicedcount += 1
voicedpeak.append(validtime[time])
@@ -193,7 +194,7 @@ def speech_rate(filename):


def get_files():
files = glob('/test_voices/*.wav')
files = glob('test_voices/*.wav')
files.extend(glob('test_voices/*.mp3'))
files.extend(glob('test_voices/*.ogg'))
files.extend(glob('test_voices/*.aiff'))

0 comments on commit 499aefb

Please sign in to comment.
You can’t perform that action at this time.