You must learn it from a real expert
The pronunciation rules for Middle High German, for instance (13th Century):
*w is pronounced as in current English
*ch is always "thick" like in
Bach*ei is pronounced as in current Dutch
*r is pronounced as in "proper" Swedish
*sp, st etc are pronounced as they are spelled
*diu (determined feminine article for third person singular) is pronounced as it is spelled
*h is pronounced something like
ch
*all wowels are short, except for the ones with an ^ over them