This library can count the syllables of persian text or words by converting the persian text to finglish format ( a slang used for writing persian words in english by their phonetics)
pip install git+https://github.com/salsina/Persian-syllable-counter#egg=persian_syllable_counter