Chosen Solution

I recently replaced my ear speaker for iPhone 4 at&t but do NOT have service or a working sim card to make a test call… Is it possible to test the speaker another way?

Use stock iPhone App called Voice Memos. Make a 15-20 second memo. Then play the memo, tapping the Speaker button you can test the Earpiece Speaker.

get a Tango ,skype or Viber or any slimier app and try to call your friend who has the same app and you should be able to talk to your friend note : you need an internet connection to do that

Another solution: Voice Control on the iPhone 4. Even without a SIM or AT&T service, if you say something into the microphone, the voice will respond through the earpiece to say “no match found” or another message. Hold the home button down until the Voice Control screen appears and then say a command.