Take a look at
http://sourceforge.net/projects/skrybotdomowy/[
^]
Though that's for Polish language, I guess you won't find anything else more helpful: you get source code!
Some steps involved:
- Guess phonems from audiodata
- build words from list of hypothetically recognized phonems
- build phrases from list of hypothetically recognized words
You'll need a vocabulary of written words along with some phonetic annotation, and some statistics of occurrences of word combinations in the domain of your interest (medical, law, etc.).
As Persian is an Indoeuropean language, you are likely to face issues with the grammar: flected forms (form-forms; say-says-said-saying) are usually treated as different words, and you may end up with an extremely large vocabulary.