I am unfamiliar with current Python-specific libraries, so I am unaware if there is one that can sidestep this issue (I doubt it). You will need an instance of Praat that is connected to a GUI (otherwise you'll get a Cannot view or edit a Sound from batch error). The voice report is an editor command, and will therefore not be available in batch instances of Praat. E.g., to only get the mean pitch of a certain sound file as Python float: mean_pitch = (pitch, "Get mean", 0.0, 0.0, "Hertz") However, if you are interested in only a part of the voice report and want to get these as actual numeric variables (for example because you want to run some stats on all 100 files?), all of these things can be accessed independently from the Voice report functionality. ![]() Voice_report_str = (, "Voice report", 0.0, 0.0, 75, 600, 1.3, 1.6, 0.03, 0.45)įor some things a Python methods exist on the objects, for some other functionality you'll need to use until more work gets done on the library. Sound = parselmouth.Sound("the_north_wind_and_the_sun.wav") This is an open-source library I have been creating that allows accessing Praat from Python in a Python-intuitive way: import parselmouth I am no expert in writing Praat scripts, but converting this workflow seems reasonably straightforward.Īs for the other part of your question: doing this is Python is actually possible with the Parselmouth library. This works even in a batch version of Praat (i.e., without graphical user interface). ![]() ![]() Afterwards, selecting all 3 objects ( Sound, Pitch, PointProcess) and the action Voice report. Depending on your actual goal, it seems you can get the same 'Voice report' output outside of the Sound editor menu (opened with View & Edit): select a Sound object, analyze its pitch (select Sound, click Analyse periodicity > To Pitch.), and pulses (select Sound and Pitch objects, click To PointProcess (cc)).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |