def test_getManipulatedParameters(self): twentyPercentMore = lambda x: (x * 1.20) filterFunc = None includeUnlabeledRegions = True duration_morph.getManipulatedParamaters(self.fromTGFN, self.tierName, twentyPercentMore, filterFunc, includeUnlabeledRegions)
filterFunc, includeUnlabeledRegions) duration_morph.changeDuration(fromWavFN, durationParams, stepList, outputName, outputMinPitch=minPitch, outputMaxPitch=maxPitch, praatEXE=praatEXE) # Increase duration of all segments by 20 percent twentyPercentMore = lambda x: (x * 1.20) outputName = "%s_20_percent_more" % fromName outputTG = join(outputPath, "%s.TextGrid" % outputName) outputImageFN = join(outputPath, "%s.png" % outputName) filterFunc = None includeUnlabeledRegions = True durationParams = duration_morph.getManipulatedParamaters(fromTGFN, tierName, twentyPercentMore, filterFunc, includeUnlabeledRegions) duration_morph.changeDuration(fromWavFN, durationParams, stepList, outputName, outputMinPitch=minPitch, outputMaxPitch=maxPitch, praatEXE=praatEXE)
durationParams = duration_morph.getMorphParameters(fromTGFN, toTGFN, tierName, filterFunc, includeUnlabeledRegions) morphedTG = duration_morph.textgridMorphDuration(fromTGFN, toTGFN) morphedTG.save(outputTG) duration_morph.changeDuration(fromWavFN, durationParams, stepList, outputName, outputMinPitch=minPitch, outputMaxPitch=maxPitch, praatEXE=praatEXE) # Increase duration of all segments by 20 percent twentyPercentMore = lambda x: (x * 1.20) outputName = "%s_20_percent_more" % fromName outputTG = join(outputPath, "%s.TextGrid" % outputName) outputImageFN = join(outputPath, "%s.png" % outputName) filterFunc = None includeUnlabeledRegions = True durationParams = duration_morph.getManipulatedParamaters( fromTGFN, tierName, twentyPercentMore, filterFunc, includeUnlabeledRegions) duration_morph.changeDuration(fromWavFN, durationParams, stepList, outputName, outputMinPitch=minPitch, outputMaxPitch=maxPitch, praatEXE=praatEXE)