How to use the praatio.pitch_and_intensity.extractPI function in praatio

To help you get started, we’ve selected a few praatio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github timmahrt / praatIO / examples / get_pitch_and_formants.py View on Github external
# 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,
github timmahrt / praatIO / examples / get_pitch_and_formants.py View on Github external
#                               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)