I am using Googles this api :-
https://www.google.com/speech-api/v2/recognize?output=json&lang=\"+ language_code+\"&key=\"My key\"
Take a look at this question and answer.
You can give the API "speech context" hints, like this:
"speech_context": {
"phrases":["zero", "one", "two", ... "nine", "ten", "eleven", ... "twenty", "thirty,..., "ninety"]
}
I imagine this could work for other languages too, like German.
"speech_context": {
"phrases":["eins", "zwei", "drei", ..., "elf", "zwölf" ... ]
}
You may have to convert numbers (not digits) to words by yourself. As there is some logic in most languages (e.g. English, German), you can do this with an algorithmic approach.
See How to convert number to words in java