Nancyk is entirely right: in speech there is never any doubt (except with some H-initial words). We use "an" before vowel sounds.

The written form "a FSH" comes from either writing it without saying it mentally to realize it's wrong; or just using the abbreviation in writing but mentally saying "a finite state hypothesis" (or whatever it was).


On origin of "a" vs "an", the earlier form is "an" (related to "one"), and the N was lost before a consonant - rather than being added before a vowel. Same with "mine" and "thine", which gave rise to alternatives "my" and "thy" in the Middle English period, originally on purely phonetic grounds, then grammaticalized.