Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# Generates the entire pitch contour for the file, but only saves the
# labeled sections. Functionally the same as the commented-out code above.
# pitch_and_intensity._extractPIFile(join(wavPath, "bobby.wav"),
# join(pitchPath, "bobby_segments.txt"),
# praatEXE, 50, 350,
# forceRegenerate=True,
# tgFN=join(wavPath, "bobby_words.TextGrid"),
# tierName="word")
maryPitchData = pitch_and_intensity.extractPI(join(wavPath, "mary.wav"),
join(pitchPath, "mary.txt"),
praatEXE, 75, 450,
forceRegenerate=False)
maryPitchData = pitch_and_intensity.extractPI(join(wavPath, "mary.wav"),
join(pitchPath, "mary_interpolated.txt"),
praatEXE, 75, 450,
forceRegenerate=False,
pitchQuadInterp=True)
filteredFN = "mary_300hz_high_pass_filtered.wav"
maryFilteredPitchData = pitch_and_intensity.extractPitch(join(wavPath, filteredFN),
join(pitchPath, "mary_filtered.txt"),
praatEXE, 75, 450,
forceRegenerate=False)
# Generate pitch and intensity values for one file
pitch_and_intensity.generatePIMeasures(bobbyPitchData,
join(tgPath, "bobby_words.TextGrid"),
"word", doPitch=True,
# join(pitchPath, "bobby_segments.txt"),
# praatEXE, 50, 350,
# forceRegenerate=True,
# tgFN=join(wavPath, "bobby_words.TextGrid"),
# tierName="word")
# Generates the entire pitch contour for the file, but only saves the
# labeled sections. Functionally the same as the commented-out code above.
# pitch_and_intensity._extractPIFile(join(wavPath, "bobby.wav"),
# join(pitchPath, "bobby_segments.txt"),
# praatEXE, 50, 350,
# forceRegenerate=True,
# tgFN=join(wavPath, "bobby_words.TextGrid"),
# tierName="word")
maryPitchData = pitch_and_intensity.extractPI(join(wavPath, "mary.wav"),
join(pitchPath, "mary.txt"),
praatEXE, 75, 450,
forceRegenerate=False)
maryPitchData = pitch_and_intensity.extractPI(join(wavPath, "mary.wav"),
join(pitchPath, "mary_interpolated.txt"),
praatEXE, 75, 450,
forceRegenerate=False,
pitchQuadInterp=True)
filteredFN = "mary_300hz_high_pass_filtered.wav"
maryFilteredPitchData = pitch_and_intensity.extractPitch(join(wavPath, filteredFN),
join(pitchPath, "mary_filtered.txt"),
praatEXE, 75, 450,
forceRegenerate=False)