Shahabks / myprosody

A Python library for measuring the acoustic features of speech (simultaneous speech, high entropy) compared to ones of native speech.
https://shahabks.github.io/myprosody/
MIT License
236 stars 64 forks source link

mysp.myprosody(p,c) giving parselmouth.PraatError: Stray text after 'else'. error #22

Open bbrij87 opened 3 years ago

bbrij87 commented 3 years ago

Hello,

I could all functions up to mysp.myprosody(p,c) and this throws an error which is related to PRAAT file.

parselmouth.PraatError: Stray text after 'else'. Script line 332 not performed or completed: « else vowel1=vowel1+0 » Script not completed.

mysp.myprosody(p,c) Traceback (most recent call last): File "", line 1, in File "C:\Users\bbrij\AppData\Local\Programs\Python\Python39\lib\site-packages\myprosody__init__.py", line 369, in myprosody objects= run_file(sourcerun, -20, 2, 0.3, "yes",sound,path, 80, 400, 0.01, capture_output=True) parselmouth.PraatError: Stray text after 'else'. Script line 332 not performed or completed: « else vowel1=vowel1+0 » Script not completed.

I could run previous functions successfully.

mysp.myspsyl(p,c) number_ of_syllables= 121 mysp.mysppron(p,c) Pronunciation_posteriori_probability_score_percentage= :94.97

Here is the screenshot if it helps: image

bbrij87 commented 3 years ago

Update: I executed the script on remote online server and got different response but I assume issue is with /myprosody/dataset/essen/MLTRNL.praat file.

image

The line 302 in myprosody/myprosody.py doesn't return anything. image

bbrij87 commented 3 years ago

Any update?

hebo1982 commented 3 years ago

MLTRNL.praat.zip

@bbrij87

I repaired it.

You should replace the file 'myprosody/dataset/essen/MLTRNL.praat'.

AanchalA commented 1 year ago

@hebo1982 I replaced the old MLTRNL.praat with this new file and now it is giving a different error. I tried using with python version 3.9 but since that did not work, I also tried with 3.7, but that also did not solve my problem.

ERROR:root:Unknown symbol: « appendInfoLine:0.7733333333333333,tab$,' Script line 882 not performed or completed: « appendInfoLine:'avepauseduratin',tab$,'avelongpause',tab$,'speakingtot:2',tab$,'avenumberofwords',tab$,'articulationrate',tab$,'inpro',tab$,'f1norm',tab$,'mr',tab$,'q25',tab$,'q50',tab$,'q75', tab$, 'std',tab$,'fmax',tab$,'fmin',tab$,'vowelinx1',tab$,'vowelinx2',tab$,'formantmean',tab$,'formantstd',tab$,'nuofwrds:0',tab$,'npause',tab$,'ins',tab$,'fillerratio',tab$,'xx',tab$,xxx$,tab$,'totsco',tab$,xxban$,tab$,'speakingrate' » Script not completed. Traceback (most recent call last): File "/home/ubuntu/Aanchal/EDA-and-Feature-Engineering/prosody/prosody_features.py", line 464, in mysplev objects = run_file(sourcerun, -20, 2, 0.3, "yes", sound, path, 80, 400, 0.01, capture_output=True) parselmouth.PraatError: Unknown symbol: « appendInfoLine:0.7733333333333333,tab$,' Script line 882 not performed or completed: « appendInfoLine:'avepauseduratin',tab$,'avelongpause',tab$,'speakingtot:2',tab$,'avenumberofwords',tab$,'articulationrate',tab$,'inpro',tab$,'f1norm',tab$,'mr',tab$,'q25',tab$,'q50',tab$,'q75', tab$, 'std',tab$,'fmax',tab$,'fmin',tab$,'vowelinx1',tab$,'vowelinx2',tab$,'formantmean',tab$,'formantstd',tab$,'nuofwrds:0',tab$,'npause',tab$,'ins',tab$,'fillerratio',tab$,'xx',tab$,xxx$,tab$,'totsco',tab$,xxban$,tab$,'speakingrate' » Script not completed.

hebo1982 commented 1 year ago

@AanchalA

Cloud you show code help me reproduce this error?

The error like from praat script. You can debug praat.

AanchalA commented 1 year ago

Hey @hebo1982 This issue was occuring because I was using a smaller file (5 seconds). When I used another file (17 seconds), this error was gone, but the values for all the features was zero.

tyriaa commented 1 year ago

@AanchalA

Cloud you show code help me reproduce this error?

The error like from praat script. You can debug praat.

MLTRNL.praat.zip

@bbrij87

I repaired it.

You should replace the file 'myprosody/dataset/essen/MLTRNL.praat'.

Hey how did you fix it ?

Because that work for me but I have the same issue with mysplev()

gabrieltirado commented 7 months ago

@AanchalA Cloud you show code help me reproduce this error? The error like from praat script. You can debug praat.

MLTRNL.praat.zip @bbrij87 I repaired it. You should replace the file 'myprosody/dataset/essen/MLTRNL.praat'.

Hey how did you fix it ?

Because that work for me but I have the same issue with mysplev()

name 'pickle' is not defined: https://stackoverflow.com/questions/48477949/not-able-to-pip-install-pickle-in-python-3-6

jk6721189 commented 6 months ago

@AanchalA Cloud you show code help me reproduce this error? The error like from praat script. You can debug praat.

MLTRNL.praat.zip @bbrij87 I repaired it. You should replace the file 'myprosody/dataset/essen/MLTRNL.praat'.

Hey how did you fix it ?

Because that work for me but I have the same issue with mysplev()

It worked like charm post replacement of MLTRNL.praat(26.2KB) to MLTRNL.praat(26.1KB). thank you!

Kushwho commented 3 months ago

@tyriaa This is because this function has a sklearn.tree.tree dependency and it was removed from scikit-learn version 0.24.