Skip to content

Memory issues when generating voice report in bulk #33

@kkawabat

Description

@kkawabat

OS: Ubuntu 18.04.4 LTS
python: 3.7.5

I am running the below function in a loop iterating over audio files between 10~60 seconds long.

def calc_voice_report(input_audio):
    sound = parselmouth.Sound(input_audio)
    pitch = sound.to_pitch()
    pulses = parselmouth.praat.call([sound, pitch], "To PointProcess (cc)")
    voice_report_str = \
        parselmouth.praat.call([sound, pitch, pulses], "Voice report", 0.0, 0.0, 75, 600, 1.3, 1.6, 0.03, 0.45)
    return voice_report_str

The resulting string is then parsed and saved into a csv.

After around 3k~8k files I ran into some sort of memory issue, either:

  • SIGFAULT 6
  • a parselmouth error stating that it's out of memory (did not save the error message will write it down if it happens again next time)
  • a computer freeze

I had similar issues running praat voice report in a praat script (using subprocess to call it from python) which makes me think there is a memory leak caused by the voice report module.

Is there a way to fully "clear" parselmouth of it's memory after a parselmouth.praat.call?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions