What part of speech is 'Hearing' in these sentences?

What is hearing in these sentences?

  1. Hearing the voice, the boy woke up.

  2. The boy woke up hearing the voice.


In a comment, John Lawler wrote:

It's a number of things.

It's a present participle, for one thing.

It's also a transitive verb form (it has a direct object the voice), with a missing subject, assumed to be the boy.

The participle clause (or phrase) hearing the voice functions as an adverb of circumstance and therefore can go at the beginning (with comma intonation) or at the end of the sentence.

What kind of answer were you looking for? Oh, and by the way, asking about parts of speech of individual words is not a good idea; concentrate on the constructions they're in – that's what grammar is about.