Does anybody know of a downloadable dictionary of English words with their syllables AND stress patterns? I want to do some analysis of rhythms in texts but haven't been able to find such a database. For instance, I'd want to be able to feed my script a line and have it tell me if it is iambic or not.

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

The links in the duplicate question give online resources that you can use for syllabification, stress, POS etc. Of course you still have to deal with ambiguously stressed words that could pose a problem, and poetic license (where the natural stress doesn't fit the meter but somehow it 'works').
–
MitchApr 12 '12 at 13:24

If you post this on a software development forum, instead of an English language forum, who knows? You might inspire someone to create an app for that.
–
J.R.Apr 12 '12 at 18:02

Strange that this was marked as a duplicate. The linked question doesn't ask about syllable or stress pattern specifically. It does mention pronunciation, but often pronunciation data doesn't include full information about syllables. And it was not clear from the answers which, if any, of the online resources mentioned included information on stress and syllable structure. I just added an answer there but maybe it belonged more to this question.
–
LarsHAug 26 '14 at 19:46